From collectd Wiki
< Plugin:cURL-JSON
Revision as of 18:11, 17 December 2011 by Pavel (talk | contribs) (* Add info about types used (i use gauges for types).)

Jump to: navigation, search

You can use cURL-JSON plugin plugin to collect stats from php-fpm instances. The example of config is below.


LoadPlugin curl_json
<Plugin curl_json>
<URL "">
  Instance "fpm"
  <Key "accepted conn">
      Type "http_requests"
  <Key "listen queue len">
      Type "listen_queue"
  <Key "active processes">
      Type "active_processes"
  <Key "total processes">
      Type "total_processes"

Please note that the metod used to access php-fpm stats is not FastCGI but HTTP. So you need to configure your web-server to pass such requests to php-fpm instance.


You'll need to create a custom types.db and add these types:

# types.db
http_requests      count:COUNTER:0:134217728
listen_queue       value:GAUGE:0:65535
active_processes   value:GAUGE:0:65535
total_processes    value:GAUGE:0:65535

Type `http_requests' usually already present in the default types, however. See `TypesDB' configuration option in collectd config file for locations of default and custom `types.db' files.


  • Add chart examples.