adgoal/statsd-client-bundle
Symfony bundle for monitoring via StatsD/Graphite using statsd-php-client. Provides a StatsD service/factory, Monolog handler, metric collectors (visitors, auth, SQL verbs, memory), and CLI commands to aggregate and flush metrics.
This bundle helps you to monitor your application.
It uses statsd-php-client as Client for the etsy/Statsd API.
It Includes
$this->get('statsd')
->increment('log.error')
->gauge('log.rate', 25)
->flush();
Monitoring what is happening in your production Symfony2 application, with StatsD and Graphite.
Within this bundle you could use ready-to-go monitor for
Monolog
Amount of visitor
Logged vs Anonymous user
SQL: Verbs used (amount of select/set/update/upgrade/delete) (this feature is not suggested, please use a server monitor tool eg. nagios, munin)
Amount of PHP ram used
You could create your own using the Factory and the Service.
If debug mode is enabled no packet are sent over the udp socket, and you could see what's going on reading the syslog with tail -f /var/log/syslog
Mar 19 00:48:11 liuggio nginx: statsd-open
Mar 19 00:48:11 liuggio nginx: statsd-write "tvision.visitor:1|tvision.memory:43520|tvision.user.anonymous:1|tvision.query.start:1|tvision.query.insert:1|c" 118 Bytes
Mar 19 00:48:11 liuggio nginx: statsd-close
Note: by default in dev environment debug is true.
With a proper config file, your StatsD server will receive in a single upd packet:
prefix.visitor:1|c # Increment visitor
prefix.user.anonymous:1|c # The visitor is not logged
prefix.log.app.error.user_action:1 # Stats by monolog with $this->get('logger')->error('user_action')
prefix.memory:4480|g # The php memory peak was 4480 MB
prefix.exception.exception.500:1|c # Exception occurred, the Exception code was 500
prefix.query.insert:1|c # Query Insert
prefix.query.select:1|c # Query Select
see this blog post to install Easy install statsd graphite with vagrant.
StatsD is a simple daemon for easy stats aggregation
Graphite is a Scalable Realtime Graphing
https://www.google.com/search?q=tcp+vs+udp
See CONTRIBUTING.md
https://github.com/liuggio/StatsDClientBundle/graphs/contributors
How can I help you explore Laravel packages today?