2017 © Pedro Peláez
 

symfony-bundle statsd-client-bundle

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

image

liuggio/statsd-client-bundle

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

  • Monday, November 7, 2016
  • by liuggio
  • Repository
  • 11 Watchers
  • 158 Stars
  • 299,761 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 32 Forks
  • 11 Open issues
  • 22 Versions
  • 6 % Grown

The README.md

StatsD Client Bundle

Total Downloads Latest Stable Version Build Status, (*1)

This bundle helps you to monitor your application., (*2)

It uses statsd-php-client as Client for the etsy/Statsd API., (*3)

It Includes, (*4)

  • a Service, a Factory and an Entity callable by the DIC
  • a Monolog Handler
  • a series of Collectors in order to aggregate your personal data.
  • a series of Commands in order to execute data also from cli.

Simple usage!

``` php $this->get('statsd') ->increment('log.error') ->gauge('log.rate', 25) ->flush();, (*5)


## Check out the documentation * [Installation and Usage](https://github.com/liuggio/StatsDClientBundle/blob/master/Resources/doc/installation.md) * [Advanced usage](https://github.com/liuggio/StatsDClientBundle/blob/master/Resources/doc/advanced.md) ## Articles * [Article: ServerGrove - Interesting Symfony Bundles: StatsDClientBundle](http://blog.servergrove.com/2012/10/09/interesting-symfony-bundles-statsdclientbundle) * [Article : Install Stats.d / Graphite on a debian server in order to monitor a Symfony2 application (1/2) ](http://www.elao.com/blog/linux/install-stats-d-graphite-on-a-debian-server-to-monitor-a-symfony2-application-12.html) * [Article : Monitor your Symfony2 application via Stats.d and Graphite (2/2) ](http://www.elao.com/blog/symfony-2/monitor-your-symfony2-application-via-stats-d-and-graphite-22.html) * [Slide : Building OpenSky with Symfony2 by Jonathan H. Wage](https://speakerdeck.com/jwage/building-opensky-with-symfony2) ## Abstract 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. ### On dev env the data are not pushed to the socket but to syslog. 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` ```log 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., (*6)

One UDP packet to rule them all

With a proper config file, your StatsD server will receive in a single upd packet:, (*7)

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

Vagrant StatSD and Graphite

see this blog post to install Easy install statsd graphite with vagrant., (*8)

StatsD

StatsD is a simple daemon for easy stats aggregation, (*9)

Graphite

Graphite is a Scalable Realtime Graphing, (*10)

The Client send data with UDP (faster)

https://www.google.com/search?q=tcp+vs+udp, (*11)

Contribution

See CONTRIBUTING.md, (*12)

Contributors

https://github.com/liuggio/StatsDClientBundle/graphs/contributors, (*13)

The Versions

07/11 2016

dev-master

9999999-dev

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

21/12 2015

v1.6.9

1.6.9.0

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

13/05 2015

2.0.x-dev

2.0.9999999.9999999-dev

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

01/04 2015

v1.6.8

1.6.8.0

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

30/03 2015

v1.6.7

1.6.7.0

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

18/03 2015

v1.6.6

1.6.6.0

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

25/10 2013

v1.6.5

1.6.5.0

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

25/10 2013

dev-composer_alias

dev-composer_alias

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

10/06 2013

v1.6.4

1.6.4.0

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

22/04 2013

v1.6.3

1.6.3.0

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

22/04 2013

v1.6.1

1.6.1.0

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

27/03 2013

v1.4.4

1.4.4.0

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

25/03 2013

v1.4.2

1.4.2.0

Provides a statsd client and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

25/01 2013

v1.2.4

1.2.4.0

Provides statsd cliend and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

07/12 2012

v1.2.3

1.2.3.0

Provides statsd cliend and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

13/11 2012

v1.2.2

1.2.2.0

Provides statsd cliend and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

08/11 2012

v1.2.0

1.2.0.0

Provides statsd cliend and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

02/11 2012

v1.2.0-RC2

1.2.0.0-RC2

Provides statsd cliend and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

02/11 2012

v1.2.0-RC1

1.2.0.0-RC1

Provides statsd cliend and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

25/09 2012

v1.0.4

1.0.4.0

Provides statsd cliend and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony statsd graphite monitor

21/09 2012

v1.0.2

1.0.2.0

Provides statsd cliend and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

symfony statsd graphite monitor

19/09 2012

v1.0.0

1.0.0.0

Provides statsd cliend and simple ready-to-use support for #Symfony2 Application

  Sources   Download

MIT

The Requires

 

symfony statsd graphite monitor