Netdata: phpfpm for multiple websites

Created on 5 May 2019  路  3Comments  路  Source: netdata/netdata

Hello,

we had a look at the phpfpm plugin and it would be great for our need.
So far we have multiple phpfpm processes running, each per vhost for apache.

The configuration example only mentions one URL to configure:

local:
  url     : 'http://localhost/status'

but we would need to monitor one url per vhost. Any idea how to do that?

Thanks,
Thomas

OS: CentOS 7
php-fpm versions : 7.1, 7.2, 7.3

aredocs areexternapython question

All 3 comments

The config file in /etc/netdata/orig/python.d/phpfm.conf has much better info:

# ----------------------------------------------------------------------
# JOBS (data collection sources)
#
# The default JOBS share the same *name*. JOBS with the same name
# are mutually exclusive. Only one of them will be allowed running at
# any time. This allows autodetection to try several alternatives and
# pick the one that works.
#
# Any number of jobs is supported.
#
# All python.d.plugin JOBS (for all its modules) support a set of
# predefined parameters. These are:
#
# job_name:
#     name: myname            # the JOB's name as it will appear at the
#                             # dashboard (by default is the job_name)
#                             # JOBs sharing a name are mutually exclusive
#     update_every: 1         # the JOB's data collection frequency
#     priority: 60000         # the JOB's order on the dashboard
#     penalty: yes            # the JOB's penalty
#     autodetection_retry: 0  # the JOB's re-check interval in seconds
#
# Additionally to the above, PHP-FPM also supports the following:
#
#     url: 'URL'       # the URL to fetch nginx's status stats
#                      # Be sure and include ?full&status at the end of the url
#
# if the URL is password protected, the following are supported:
#
#     user: 'username'
#     pass: 'password'
#

# ----------------------------------------------------------------------
# AUTO-DETECTION JOBS
# only one of them will run (they have the same name)

localhost:
  name : 'local'
  url  : "http://localhost/status?full&json"

localipv4:
  name : 'local'
  url  : "http://127.0.0.1/status?full&json"

localipv6:
  name : 'local'
  url  : "http://[::1]/status?full&json"

Modifying the README...

yo @Kofl you can define any number of jobs, details in the module configuration file

Here is example for two instances:

local:
  url: 'http://127.0.0.1/status'

remote:
  url: 'http://10.0.0.1/status'

Awesome, thanks, that did it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kachkaev picture kachkaev  路  3Comments

BecomeBamboo picture BecomeBamboo  路  3Comments

ktsaou picture ktsaou  路  3Comments

gino picture gino  路  3Comments

ibnesayeed picture ibnesayeed  路  3Comments