Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpfpm collector: add last_collected_secs health check #5836

Merged
merged 2 commits into from Apr 11, 2019

Conversation

@ilyam8
Copy link
Member

ilyam8 commented Apr 11, 2019

Summary

Fixes: #5820

ssia

Component Name

/collectors/python.d.plugin/phpfpm

/health/health.d

Additional Information
Copy link
Contributor

paulkatsoulakis left a comment

The change looks good.
However, could you provide a short description on how it was tested that it works?

@ilyam8

This comment has been minimized.

Copy link
Member Author

ilyam8 commented Apr 11, 2019

it was not tested, it is a simple health check to ensure the service is up and running. We use it a for a lot of services, examples:

lgz@mbp[health.d](master)grep last_collected_secs *

apache.conf:template: apache_last_collected_secs
apcupsd.conf:template: apcupsd_last_collected_secs
couchdb.conf:template: couchdb_last_collected_secs
fping.conf:template: fping_last_collected_secs
fronius.conf:template: fronius_last_collected_secs
httpcheck.conf:template: httpcheck_last_collected_secs
lighttpd.conf:template: lighttpd_last_collected_secs
memcached.conf:template: memcached_last_collected_secs
mongodb.conf:template: mongodb_last_collected_secs
mysql.conf:template: mysql_last_collected_secs
named.conf:template: named_last_collected_secs
netfilter.conf:   alarm: netfilter_last_collected_secs
nginx.conf:template: nginx_last_collected_secs
nginx_plus.conf:template: nginx_plus_last_collected_secs
portcheck.conf:template: portcheck_last_collected_secs
postgres.conf:template: postgres_last_collected_secs
redis.conf:template: redis_last_collected_secs
retroshare.conf:template: retroshare_last_collected_secs
squid.conf:template: squid_last_collected_secs
stiebeleltron.conf:template: stiebeleltron_last_collected_secs
tcp_resets.conf:   alarm: ipv4_tcphandshake_last_collected_secs
udp_errors.conf:   alarm: ipv4_udperrors_last_collected_secs
web_log.conf:template: last_collected_secs

It is copy/paste

# make sure nginx is running
template: nginx_last_collected_secs
on: nginx.requests
calc: $now - $last_collected_t
units: seconds ago
every: 10s
warn: $this > (($status >= $WARNING) ? ($update_every) : ( 5 * $update_every))
crit: $this > (($status == $CRITICAL) ? ($update_every) : (60 * $update_every))
delay: down 5m multiplier 1.5 max 1h
info: number of seconds since the last successful data collection
to: webmaster

what i did:

  • copied nginx.conf
  • fixed template and on parts
@ilyam8

This comment has been minimized.

Copy link
Member Author

ilyam8 commented Apr 11, 2019

phpfpm collector has chart with phpfpm.requests context (health on part)

'requests': {
'options': [None, 'PHP-FPM Requests', 'requests/s', 'requests', 'phpfpm.requests', 'line'],
'lines': [
['requests', None, 'incremental']
]
},

so it will work

Copy link
Contributor

paulkatsoulakis left a comment

Haven't tested the change personally, team is confident the change is not breaking anything, approved.

@cakrit
cakrit approved these changes Apr 11, 2019
@ilyam8 ilyam8 merged commit 1e2cafc into netdata:master Apr 11, 2019
12 checks passed
12 checks passed
Header rules - netdata No header rules processed
Details
Pages changed - netdata 2 new files uploaded
Details
Redirect rules - netdata No redirect rules processed
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
LGTM analysis: C/C++ No new or fixed alerts
Details
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No code changes detected
Details
Mixed content - netdata No mixed content detected
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
license/cla Contributor License Agreement is signed.
Details
netlify/netdata/deploy-preview Deploy preview ready!
Details
@spinitron

This comment has been minimized.

Copy link

spinitron commented Apr 11, 2019

Thank you @ilyam8 !

@ilyam8 ilyam8 deleted the ilyam8:phpfm_last_sec_collected_check branch Apr 12, 2019
EnzoAkira added a commit to EnzoAkira/netdata that referenced this pull request Aug 19, 2019
EnzoAkira added a commit to EnzoAkira/netdata that referenced this pull request Sep 6, 2019
EnzoAkira added a commit to EnzoAkira/netdata that referenced this pull request Sep 13, 2019
EnzoAkira added a commit to EnzoAkira/netdata that referenced this pull request Sep 20, 2019
EnzoAkira added a commit to EnzoAkira/netdata that referenced this pull request Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.