Categories
PHP

Let’s monitor your PHP applications with Pinba

Do you know Pinba? It’s a great tool and you really should use it on your LAMP platform.

Pinba is a realtime monitoring/statistics server for PHP using MySQL as a read-only interface.

It accumulates and processes data sent over UDP by multiple PHP processes and displays statistics in a nice human-readable form of simple “reports“, also providing read-only interface to the raw data in order to make possible generation of more sophisticated reports and stats.

With Pinba extension users also can measure particular parts of the code using timers with arbitrary tags.

Pinba is not a debugging tool in a common sense, since you’re not supposed to do debugging on production servers, but its main goal is to help developers to monitor performance of PHP scripts, locate bottlenecks in realtime and direct developers’ attention to the code that really needs it.

Here is a sample graph :

Pinba graphs

I’m proud to announce that Pinba is now available on Dotdeb for Debian 6.0 “Squeeze”. Once you read the Pinba features and usage, you’ll want to install those two packages :

  • pinba-mysql-engine : a custom MySQL engine to store all the gathered data efficiently. It has to be installed with the latest mysql-server packages.
  • php5-pinba : the PHP extension you’ll use to accumulate data and timers directly from your PHP scripts.

I hope you enjoy it.

14 replies on “Let’s monitor your PHP applications with Pinba”

Salut Gui,

Tout d’abord merci pour le boulot 😉

Dans les dépendances de pinba-mysql-engine, mysql-server-5.1.54-0.dotdeb.1 est requis, mais il n’est pas présent lors d’un apt-get, alors que sur le dépot, il date du 17/12.

# apt-cache show mysql-server |grep Version
Version: 5.1.54-0.dotdeb.0
# cat /etc/debian_version
6.0
# grep dotdeb /etc/apt/sources.list
deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all
deb http://php53.dotdeb.org stable all
deb-src http://php53.dotdeb.org stable all

Merci.

This is a great tool! Thank you.

The problem is that there are no graphical tools to display Pinba statistics, you must write your own scripts using RRDTool, There are some examples at pinba.org.

If only there was a munin plugin…

@ForLoop : statsd is a very powerful tool to gather metrics, but Pinba has a lot of built-in features / algorithms that leads to out-of-the-box useful results. It’s up to you to use the tool that fits your needs.

Comments are closed.