Version: v0.10.1 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2016 License: MIT Imports: 14 Imported by: 0


Telegraf plugin: phpfpm

Get phpfpm stat using either HTTP status page or fpm socket.



  • tags: pool=poolname

Measurement names:

  • phpfpm

Measurement field:

  • accepted_conn
  • listen_queue
  • max_listen_queue
  • listen_queue_len
  • idle_processes
  • active_processes
  • total_processes
  • max_active_processes
  • max_children_reached
  • slow_requests

Example output

Using this configuration:

  # An array of address to gather stats about. Specify an ip on hostname
  # with optional port and path. ie localhost,, etc.
  # We can configure in three modes:
  #   - unixsocket: the string is the path to fpm socket like
  #      /var/run/php5-fpm.sock
  #   - http: the URL has to start with http:// or https://
  #   - fcgi: the URL has to start with fcgi:// or cgi://, and socket port must present
  # If no servers are specified, then default to
  urls = ["http://localhost/status", "", "fcgi://"]

When run with:

./telegraf -config telegraf.conf -input-filter phpfpm -test

It produces:

* Plugin: phpfpm, Collection 1
> phpfpm,pool=www accepted_conn=13i,active_processes=2i,idle_processes=1i,listen_queue=0i,listen_queue_len=0i,max_active_processes=2i,max_children_reached=0i,max_listen_queue=0i,slow_requests=0i,total_processes=3i 1453011293083331187
> phpfpm,pool=www2 accepted_conn=12i,active_processes=1i,idle_processes=2i,listen_queue=0i,listen_queue_len=0i,max_active_processes=2i,max_children_reached=0i,max_listen_queue=0i,slow_requests=0i,total_processes=3i 1453011293083691422
> phpfpm,pool=www3 accepted_conn=11i,active_processes=1i,idle_processes=2i,listen_queue=0i,listen_queue_len=0i,max_active_processes=2i,max_children_reached=0i,max_listen_queue=0i,slow_requests=0i,total_processes=3i 1453011293083691658


When using unixsocket, you have to ensure that telegraf runs on same host, and socket path is accessible to telegraf user.



Package fcgi implements the FastCGI protocol. Currently only the responder role is supported. The protocol is defined at



View Source
const (
	PF_POOL                 = "pool"
	PF_PROCESS_MANAGER      = "process manager"
	PF_ACCEPTED_CONN        = "accepted conn"
	PF_LISTEN_QUEUE         = "listen queue"
	PF_MAX_LISTEN_QUEUE     = "max listen queue"
	PF_LISTEN_QUEUE_LEN     = "listen queue len"
	PF_IDLE_PROCESSES       = "idle processes"
	PF_ACTIVE_PROCESSES     = "active processes"
	PF_TOTAL_PROCESSES      = "total processes"
	PF_MAX_ACTIVE_PROCESSES = "max active processes"
	PF_MAX_CHILDREN_REACHED = "max children reached"
	PF_SLOW_REQUESTS        = "slow requests"


This section is empty.


func NewClient

func NewClient(h string, args ...interface{}) (fcgi *conn, err error)


This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL