Closed andrewhowdencom closed 7 years ago
Yo this isn't done yet. I'll delete this comment when it is. However, I wanted to write the merge commit message early -- each commit has it's own state, but there's some overall ideas I wanted to express with the PR.
This looks fine to me. Just let me know when ready to merge.
Sorry my notifications seem wonky, so I read the issues, PR, etc all out of order :)
Holaa
I've finished messing with this. Testing it got the following output:
# HELP phpfpm_accepted_connections_total Total number of accepted connections
# TYPE phpfpm_accepted_connections_total counter
phpfpm_accepted_connections_total 42
# HELP phpfpm_active_max_processes Maximum active process count
# TYPE phpfpm_active_max_processes counter
phpfpm_active_max_processes 3
# HELP phpfpm_active_processes Active process count
# TYPE phpfpm_active_processes gauge
phpfpm_active_processes 1
# HELP phpfpm_idle_processes Idle process count
# TYPE phpfpm_idle_processes gauge
phpfpm_idle_processes 2
# HELP phpfpm_listen_queue_connections Number of connections that have been initiated but not yet accepted
# TYPE phpfpm_listen_queue_connections gauge
phpfpm_listen_queue_connections 0
# HELP phpfpm_listen_queue_length_connections The length of the socket queue, dictating maximum number of pending connections
# TYPE phpfpm_listen_queue_length_connections gauge
phpfpm_listen_queue_length_connections 0
# HELP phpfpm_listen_queue_max_connections Max number of connections the listen queue has reached since FPM start
# TYPE phpfpm_listen_queue_max_connections counter
phpfpm_listen_queue_max_connections 0
# HELP phpfpm_max_children_reached_total Number of times the process limit has been reached
# TYPE phpfpm_max_children_reached_total counter
phpfpm_max_children_reached_total 0
# HELP phpfpm_scrape_failures_total Number of errors while scraping php_fpm
# TYPE phpfpm_scrape_failures_total counter
phpfpm_scrape_failures_total 0
# HELP phpfpm_slow_requests_total Number of requests that exceed request_slowlog_timeout
# TYPE phpfpm_slow_requests_total counter
phpfpm_slow_requests_total 0
# HELP phpfpm_total_processes Total process count
# TYPE phpfpm_total_processes gauge
phpfpm_total_processes 3
# HELP phpfpm_up able to contact php-fpm
# TYPE phpfpm_up gauge
phpfpm_up 1
I think *_processes
could use some love, but this is all I have time for a the minute, and I wanted to get it mergeable.
<3 for patience.
@andrewhowdencom thanks! merging as is. we can address other metrics in a different PR.
Currently, the metrics appear to be fashioned after the PHP status page. While this is easy for those used to consuming the PHP status page to understand, it is not as easy for consumers of Prometheus to understand.
This work revises the metric names such that they are expressed in a more expected way to prometheus, such that users who are familiar with Prometheus but not with PHP are able to query PHP for state, and make some judgements as to its health.