SiteStatusCheckerBundle
, (*1)
Symfony2 bundle to perform site status, relying on LiipMonitorBundle
. It's specifically made for ping services, like the one from New Relic., (*2)
Installation
Require it in composer:, (*3)
composer require albertofem/sitestatuschecker-bundle dev-master
Install it:, (*4)
composer update albertofem/sitestatuschecker-bundle
Add it to your bundles:, (*5)
$bundles = array(
...,
new \Liip\MonitorBundle\LiipMonitorBundle(),
new \AFM\Bundle\SiteStatusCheckerBundle\SiteStatusCheckerBundle()
);
If you want to run the tests:, (*6)
./vendor/bin/phpunit
Usage
Please referer to the bundle documentation: https://github.com/liip/LiipMonitorBundle, (*7)
site_status_checker:
token: my_secure_token
Register the controller in your routes:
status_checker:
resource: "@SiteStatusCheckerBundle/Resources/config/routing.yml"
prefix: /status
This will create a route under your prefix: /status/check/{token}
which will return appropiate response codes:, (*8)
-
403
: invalid token. Body content: KO
-
200
: all checks performed correctly. Body content: OK
-
500
: some checks are failling. Body content: KO