Merge lp:~ben-kaehne/charm-helpers/nagios-status-fix into lp:charm-helpers

Proposed by Benjamin Kaehne
Status: Merged
Merged at revision: 728
Proposed branch: lp:~ben-kaehne/charm-helpers/nagios-status-fix
Merge into: lp:charm-helpers
Diff against target: 12 lines (+1/-1)
1 file modified
charmhelpers/contrib/charmsupport/nrpe.py (+1/-1)
To merge this branch: bzr merge lp:~ben-kaehne/charm-helpers/nagios-status-fix
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
charmers Pending
Review via email: mp+313918@code.launchpad.net

Description of the change

Fixes bug lp#1631170 - nagios check marks services as not running when they are

To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

Can you confirm that using -e does what we want under both Trusty (upstart) and Xenial (systemd)?

review: Needs Information
Revision history for this message
Jill Rouleau (jillrouleau) wrote :

Sorry for the delay in responding. Testing with percona-cluster, this option gives the expected/desired behaviour on xenial. (/usr/local/lib/nagios/plugins/check_status_file.py is looking for any instance of OK, CRITICAL, WARNING, UNKNOWN in the result.)

https://pastebin.canonical.com/184202/

Revision history for this message
Stuart Bishop (stub) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charmhelpers/contrib/charmsupport/nrpe.py'
2--- charmhelpers/contrib/charmsupport/nrpe.py 2016-09-06 06:25:17 +0000
3+++ charmhelpers/contrib/charmsupport/nrpe.py 2016-12-30 00:02:42 +0000
4@@ -370,7 +370,7 @@
5 cronpath = '/etc/cron.d/nagios-service-check-%s' % svc
6 cron_file = ('*/5 * * * * root '
7 '/usr/local/lib/nagios/plugins/check_exit_status.pl '
8- '-s /etc/init.d/%s status > '
9+ '-e -s /etc/init.d/%s status > '
10 '/var/lib/nagios/service-check-%s.txt\n' % (svc,
11 svc)
12 )

Subscribers

People subscribed via source and target branches