承接 govigilant/magento2-healthchecks 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

govigilant/magento2-healthchecks

Composer 安装命令:

composer require govigilant/magento2-healthchecks

包简介

A Magento 2 module that exposes application health information compatible with Vigilant.

README 文档

README

Banner

Vigilant Magento Healthchecks

Analysis Total downloads

A module that adds healthchecks to any Magento 2 application and integrates seamlessly with Vigilant.

Features

This package providers an API endpoint to check the health of your Magento 2 store. It returns two types of checks, health checks and metrics. Healthchecks are checks that indicate whether a specific part of your application is functioning correctly, while metrics provide numeric values that give insights on health over time. Vigilant can use these metrics to notify you of spikes or quickly increasing metrics.

Installation

Install the package via Composer:

composer require govigilant/magento2-healthchecks

After installation, enable the module and run the usual Magento maintenance commands:

bin/magento module:enable Vigilant_MagentoHealthchecks
bin/magento setup:upgrade

Configuration

Create an integration with access to the Health Endpoint resource in your Magento admin panel and use the access token as bearer token to access the health endpoint.

You can also disable individual checks or metrics from Stores → Configuration → General → Vigilant Healthchecks by using the new multiselects under Checks & Metrics. Disabled entries are skipped entirely when the health payload is generated.

Usage

Adding Custom Checks and Metrics

Create checks by extending \Vigilant\HealthChecksBase\Checks\Check and implementing the run() method to return a ResultData instance containing the type, status, message, and any optional data payload. Metrics extend \Vigilant\HealthChecksBase\Checks\Metric and implement measure() to return a MetricData object with a numeric value and unit. Register your implementations by wiring them into Vigilant\MagentoHealthchecks\HealthCheckRegistry inside your module's etc/di.xml:

<type name="Vigilant\MagentoHealthchecks\HealthCheckRegistry">
    <arguments>
        <argument name="checks" xsi:type="array">
            <item name="my_custom_check" xsi:type="object">Vendor\Module\Checks\MyCustomCheck</item>
        </argument>
        <argument name="metrics" xsi:type="array">
            <item name="my_custom_metric" xsi:type="object">Vendor\Module\Checks\Metrics\MyCustomMetric</item>
        </argument>
    </arguments>
</type>

Accessing the Health Endpoint

Once installed, the health check endpoint is available with your configured bearer token at:

POST /rest/V1/vigilant/health

Or using curl:

curl -X POST "YOUR_URL_HERE/rest/V1/vigilant/health" \
  -H "Authorization: Bearer YOUR_BEARER_TOKEN" \
  -H "Content-Type: application/json"

Available Checks

Check Description
CacheCheck Performs a write/read/delete probe against the configured cache backend to verify it stores data correctly.
SearchEngineCheck Connects to the configured Elasticsearch/OpenSearch cluster and reports its cluster health status.
DatabaseCheck Runs a lightweight query to ensure the primary Magento database connection is reachable.
MessageQueueCheck Validates AMQP connections when configured or falls back to inspecting the database queue tables for failures.
CronCheck Ensures the cron heartbeat has been updated within the configured time window, indicating cron is running.
RedisCheck Discovers Redis-backed caches/sessions from deployment config and pings each server to confirm connectivity.
DebugModeCheck Warns when the application is running in developer mode to avoid leaking sensitive debug output in production.

Available Metrics

Metric Description
MemoryUsageMetric Reports overall system memory usage percentage to track saturation.
CpuLoadMetric Captures the current CPU load average to highlight processor spikes.
DiskUsageMetric Measures disk space consumption of the configured filesystem.
IndexerMetric (invalid) Counts indexers currently marked as invalid and awaiting reindex.
IndexerMetric (working) Counts indexers that are actively running.
IndexerMetric (valid) Counts indexers that are up-to-date and valid.
IndexerWorkingMinutesMetric Tracks the longest-running indexer by reporting its time in the working state in minutes.

Development Environment

A ready-to-use Docker-based development environment lives in devenv/. Ensure Docker is running, then start the stack: docker compose -f devenv/docker-compose.yml up --build.

This will create a Magento 2 application on port 8080 with this module installed. Access the Magento admin panel at http://localhost:8080/admin (default credentials: admin / Admin123!).

Quality

Run the quality checks:

composer quality

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

govigilant/magento2-healthchecks 适用场景与选型建议

govigilant/magento2-healthchecks 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「magento」 「healthchecks」 「vigilant」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 govigilant/magento2-healthchecks 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 govigilant/magento2-healthchecks 我们能提供哪些服务?
定制开发 / 二次开发

基于 govigilant/magento2-healthchecks 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 26
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-26