Difference between revisions of "Plugin:Pinba"
(→Synopsis: Explain the example config.) |
|||
Line 63: | Line 63: | ||
{{DEFAULTSORT:Pinba}} | {{DEFAULTSORT:Pinba}} | ||
+ | [[Category:Plugins]] |
Latest revision as of 01:58, 12 March 2020
Pinba plugin | |
---|---|
Type: | read |
Callbacks: | config, init, read, shutdown |
Status: | supported |
First version: | 4.10 |
Copyright: | 2007–2009 Antony Dovgal 2010 Phoenix Kayo 2010 Florian octo Forster |
License: | GPLv2 |
Manpage: | collectd.conf(5) |
List of Plugins |
Description
The Pinba plugin receives and dispatches timing values from Pinba, a profiling extension for PHP.
The Pinba extension is an extension for the PHP interpreter which collects runtime information about PHP scripts and sends a single UDP packet at the end of execution to a configured address. The Pinba plugin listens for such UDP packets, parses them and aggregates the statistics. Once per interval, the daemon queries those statistics and dispatches them to the write plugins.
Currently, the plugin provides the following information:
- Requests (executions) per second
- Average running time
- Amount printed (bytes per second)
- User and system resource usage
- Peak memory usage
Timing information in form of custom tags is currently not supported.
In order to get meaningful and interesting statistics, it is possible to group the statistics by the webserver's hostname (via gethostname(2)), the virtual server's name and the script's name. Grouping is done by views. It is possible to account for an UDP packet twice, for example in a per-host and a per-vhost statistic.
Synopsis
<Plugin pinba> Address "::0" Port "30002" # Per-vhost statistic <View "www.example.com-search"> Server "www.example.com" Script "/search.php" </View> # Per-webserver statistics <View "www-a.example.com-search"> Host "www-a" Server "www.example.com" Script "/search.php" </View> <View "www-b.example.com-search"> Host "www-b" Server "www.example.com" Script "/search.php" </View> </Plugin>
The above example assumes that you have website www.example.com which is served by two webservers, www-a and www-b using some form of load-balancing. The first view will gather statistics for the search script on both webservers, showing what the user experiences. The second and third view collect the same information, but only for one webserver each. This information may be interesting for an administrator, for example to judge whether load-balancing is working correctly.
Example graph
None yet. Add one now!