talentrydev / monitoring-bundle
Symfony bundle integrating talentrydev/monitoring library
6.0.0
2024-08-16 07:47 UTC
Requires
- php: ^8.1
- ext-json: *
- ext-sockets: *
- symfony/console: ^6.3
- symfony/framework-bundle: ^6.3
- symfony/yaml: ^6.3
- talentrydev/monitoring: ^4.0.0
Requires (Dev)
- phpunit/phpunit: ^9.0
- squizlabs/php_codesniffer: ^3.5
- symfony/monolog-bundle: ^3.4
README
This is a Symfony bundle used for integrating talentrydev/monitoring library into a Symfony project.
Installing
- Run:
composer require talentrydev/monitoring-bundle
- Add the MonitoringBundle to your kernel's
registerBundles
method:
return [
//...
new \Talentry\MonitoringBundle\MonitoringBundle();
];
Configuring
The bundle exposes the following configuration options:
Option | Type | Default value | Description |
---|---|---|---|
enabled | boolean | true | Set to false to disable monitoring bundle |
namespace | string | Production | Namespace for publishing metrics |
statsdProtocol | string | standard | StatsD protocol (see below for more details) |
statsdHost | string | localhost | StatsD server host |
statsdPort | integer | 8125 | StatsD server port |
queue | string | null | Queueing strategy to use (see below for more details) |
redisHost | string | localhost | Host of the redis instance |
redisPort | integer | 6379 | Port of the redis instance |
statsdProtocol
may be eitherdatadog
(for datadog extension of StatsD protocol) orstandard
(for standard StatsD protocol)queue
may be eitherredis
,memory
ornull
(default). By setting this value toredis
ormemory
the metrics will be queued using the selected strategy and will only be published once thety:monitoring:push-queued-metrics
command has been executed.
Example configuration
- To configure the bundle to use the standard StatsD protocol, with StatsD agent listening on
10.10.10.10
, port8125
:
monitoring:
statsdHost: 10.10.10.10
- To configure the bundle to use the redis queue, add the following to
config.yml
:
monitoring:
queue: redis