Symfony 2 monitoring bundle based on Test class
- Test class based
- Application management & chaining (via json exposition)
- Dashboard
If you use composer, add MonitorBundle bundle as a dependency to the composer.json of your application
"require": {
...
"snide/monitor-bundle": "dev-master"
...
},
Add SnideMonitorBundle to your application kernel.
// app/AppKernel.php
<?php
// ...
public function registerBundles()
{
$bundles = array(
// ...
new Snide\MonitorBundle\SnideMonitorBundle(),
);
}
The bundle needs to copy the resources necessary to the web folder. You can use the command below:
php app/console assets:install
To define tests services, add "snide_monitor.test" tag like this :
<service id="acme_demo.redis" class="Snide\Monitoring\Test\Redis" public="false">
<tag name="snide_monitor.test" />
<argument>Redis local instance</argument>
<argument>127.0.0.1</argument>
<argument>6379</argument>
</service>
You can add application reference & define its api URL (Example : /dashboard.json). Your application now monitor other applications & tests appear on your dashboard.
snide_monitor:
timer: XX # Dashboard will be refreshed every XX seconds
repository:
type: yaml # only Yaml type is defined
application:
filename: /path/to/your/yaml/save/file.yml