integer-net/magento2-health-check
最新稳定版本:1.1.0
Composer 安装命令:
composer require integer-net/magento2-health-check
包简介
Magento 2 Health Check
README 文档
README
Installation
Using composer
When this package is installed into a Magento 2 project (with the default magento/magento-composer-installer plugin present), it will auto install the required files into the pub/ directory of Magento 2
composer require integer-net/magento2-health-check
Manual
Copy the file src/health_check.php into your Magento 2 directory into pub/ (replace the original health_check.php from Magento 2)
Configuration
The health check can be configured by creating the file pub/check/config.php. All configuration options can be found in the provided default configuration, which will be installed into pub/check/config.dist.php.
When a config.php is present, it will be loaded instead of the config.dist.php.
The contents of the file should look like this:
<?php declare(strict_types=1); use IntegerNet\Healthcheck\Configuration; return (new Configuration) // Default timezone: Europe/Berlin // ->setTimezone('Antarctica/Troll') // Default output format: Configuration::FORMAT_PLAIN // Available output formats: Configuration::FORMAT_JSON & Configuration::FORMAT_PLAIN // ->setOutputFormat(Configuration::FORMAT_JSON) ->testProductionMode(/* enabled: true */) ->testDatabaseConnections(/* enabled: true, connections: ['default', 'erp'] */) ->testCacheAvailability(/* enabled: true, caches: ['configuration', 'full_page'] */) ->testIndexerTriggersExist(/* enabled: true, indexers: ['catalogsearch_fulltext', 'catalogrule_rule'] */) ->testCronjobsAreRunning(/* enabled: true, */ groups: [ ['group' => 'index', 'maxOffset' => 5], // 'maxOffset' in minutes since last run ['group' => 'default', 'maxOffset' => 5], ['group' => 'consumers', 'maxOffset' => 5], ]) ;
See config.dist.php for a list of all possible configurations and their parameters
Output format
Allowed formats: plain, json
The default output format can be changed by using the method setOutputFormat in the configuration file (pub/check/config.php) or by setting the environment variable HEALTHCHECK_OUTPUT_FORMAT.
Example usage:
HEALTHCHECK_OUTPUT_FORMAT=plain php pub/health_check.php
Supported checks
- Production mode is set
- Database availability
- Cache backend availability (if backend is not 'file')
- Indexer triggers exist in database
- Cronjobs are running (per group)
- Search backend/engine availability
- Queue backend availability (if amqp is used)
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2025-11-19