Merge lp:~brad-marshall/charm-helpers/remove-neutron-gateway-checks into lp:charm-helpers

Proposed by Brad Marshall
Status: Merged
Merged at revision: 491
Proposed branch: lp:~brad-marshall/charm-helpers/remove-neutron-gateway-checks
Merge into: lp:charm-helpers
Diff against target: 22 lines (+7/-5)
1 file modified
charmhelpers/contrib/charmsupport/nrpe.py (+7/-5)
To merge this branch: bzr merge lp:~brad-marshall/charm-helpers/remove-neutron-gateway-checks
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
Review via email: mp+277935@code.launchpad.net

Commit message

Skip the nrpe checks for a couple of specific init scripts from neutron-gateway

Description of the change

Skip the nrpe checks for a couple of specific init scripts from neutron-gateway

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

lgtm

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 2015-10-30 06:43:01 +0000
3+++ charmhelpers/contrib/charmsupport/nrpe.py 2015-11-19 01:00:25 +0000
4@@ -337,11 +337,13 @@
5 upstart_init = '/etc/init/%s.conf' % svc
6 sysv_init = '/etc/init.d/%s' % svc
7 if os.path.exists(upstart_init):
8- nrpe.add_check(
9- shortname=svc,
10- description='process check {%s}' % unit_name,
11- check_cmd='check_upstart_job %s' % svc
12- )
13+ # Don't add a check for these services from neutron-gateway
14+ if svc not in ['ext-port', 'os-charm-phy-nic-mtu']:
15+ nrpe.add_check(
16+ shortname=svc,
17+ description='process check {%s}' % unit_name,
18+ check_cmd='check_upstart_job %s' % svc
19+ )
20 elif os.path.exists(sysv_init):
21 cronpath = '/etc/cron.d/nagios-service-check-%s' % svc
22 cron_file = ('*/5 * * * * root '

Subscribers

People subscribed via source and target branches