PHPackages                             tourze/health-check-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tourze/health-check-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

tourze/health-check-bundle
==========================

Symfony应用程序健康检查组件，支持SQL检查、内置扩展检查等多种健康状态监控功能

0.1.4(6mo ago)0115MITPHPCI passing

Since Apr 9Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/tourze/health-check-bundle)[ Packagist](https://packagist.org/packages/tourze/health-check-bundle)[ RSS](/packages/tourze-health-check-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (36)Versions (7)Used By (0)

Health Check Bundle
===================

[](#health-check-bundle)

[English](README.md) | [中文](README.zh-CN.md)

\[[![PHP Version](https://camo.githubusercontent.com/4883291edef152ad80d59b65451be6f0083f4769323f1b629347b99a203f27ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f6865616c74682d636865636b2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/4883291edef152ad80d59b65451be6f0083f4769323f1b629347b99a203f27ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f6865616c74682d636865636b2d62756e646c652e7376673f7374796c653d666c61742d737175617265)\] () \[[![License](https://camo.githubusercontent.com/0b6d2d97eb5a409ffc69bf3f79a8fa55d9118e960c423fbb53f5a8b7530132b9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f746f75727a652f6865616c74682d636865636b2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/0b6d2d97eb5a409ffc69bf3f79a8fa55d9118e960c423fbb53f5a8b7530132b9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f746f75727a652f6865616c74682d636865636b2d62756e646c652e7376673f7374796c653d666c61742d737175617265)\] () \[[![Build Status](https://camo.githubusercontent.com/90e11779a7d32c879499771ac6f873870309ea8f14685b11086beb7986b28555/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f746f75727a652f6865616c74682d636865636b2d62756e646c652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/90e11779a7d32c879499771ac6f873870309ea8f14685b11086beb7986b28555/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f746f75727a652f6865616c74682d636865636b2d62756e646c652f6d61737465722e7376673f7374796c653d666c61742d737175617265)\] () \[[![Code Coverage](https://camo.githubusercontent.com/f5fa92c78252d38fe629d44f4bfe6e0b384f9c542bab9591a5c0d7e864328d2c/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f6865616c74682d636865636b2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/f5fa92c78252d38fe629d44f4bfe6e0b384f9c542bab9591a5c0d7e864328d2c/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f6865616c74682d636865636b2d62756e646c652e7376673f7374796c653d666c61742d737175617265)\] ()

A concise and efficient health check bundle for Symfony, supporting various check types for service monitoring and automated operations.

Features
--------

[](#features)

- Custom SQL health checks with flexible configuration
- Built-in checks for directory permissions, disk usage, PHP extensions, etc.
- Cron expression support for scheduled checks
- Summary and visualization of check results
- Easily extensible with custom checkers

Installation
------------

[](#installation)

```
composer require tourze/health-check-bundle
```

Quick Start
-----------

[](#quick-start)

1. Register the bundle in your Symfony project:

    - Auto-discovery or add to `config/bundles.php`:

    ```
    HealthCheckBundle\HealthCheckBundle::class => ['all' => true],
    ```
2. Configure database connection and ensure the `health_sql_checker` table is created.
3. Run health checks:

    ```
    php bin/console health-check:run
    ```
4. Review the summary output in the terminal.

Advanced Usage
--------------

[](#advanced-usage)

### Custom Health Checkers

[](#custom-health-checkers)

Create custom health checkers by implementing the `CheckInterface`:

```
