Merge ~pjdc/ubuntu-mirror-charm/+git/ubuntu-mirror-charm:separate-nagios-checks-by-role into ubuntu-mirror-charm:master

Proposed by Paul Collins
Status: Merged
Approved by: Thomas Cuthbert
Approved revision: 06d0948b6f8f448717cbbc22809b67f75dc461d4
Merged at revision: 8f29538c905cd862a21dc0cd7bf4917a1c2b841c
Proposed branch: ~pjdc/ubuntu-mirror-charm/+git/ubuntu-mirror-charm:separate-nagios-checks-by-role
Merge into: ubuntu-mirror-charm:master
Diff against target: 22 lines (+3/-1)
1 file modified
hooks/hooks.py (+3/-1)
Reviewer Review Type Date Requested Status
Thomas Cuthbert (community) Approve
Canonical IS Reviewers Pending
Review via email: mp+381082@code.launchpad.net

Commit message

include mirror name (e.g. "archive.ubuntu.com") in the service description

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Thomas Cuthbert (tcuthbert) wrote :

+1

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 8f29538c905cd862a21dc0cd7bf4917a1c2b841c

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/hooks/hooks.py b/hooks/hooks.py
index 577fbff..b95c327 100755
--- a/hooks/hooks.py
+++ b/hooks/hooks.py
@@ -622,7 +622,7 @@ def configure_nrpe():
622 wanted_checks.append(checkfile)622 wanted_checks.append(checkfile)
623623
624 # Nagios config file624 # Nagios config file
625 tmpl_data["description"] = "%s %s" % (check_details["desc"], hostname)625 tmpl_data["description"] = "%s for %s on %s" % (check_details["desc"], mirror["name"], hostname)
626 tmpl_data["check_command"] = "check_nrpe!%s_%s" % (check, mirror["name"])626 tmpl_data["check_command"] = "check_nrpe!%s_%s" % (check, mirror["name"])
627 tmpl_data["servicegroup"] = conf.nagios_servicegroup()627 tmpl_data["servicegroup"] = conf.nagios_servicegroup()
628 if check_details["type"] == "critical":628 if check_details["type"] == "critical":
@@ -633,6 +633,8 @@ def configure_nrpe():
633 tmplfile = "nagios-config.tmpl"633 tmplfile = "nagios-config.tmpl"
634 file_from_template(tmplfile, configpath, tmpl_data)634 file_from_template(tmplfile, configpath, tmpl_data)
635 wanted_checks.append(checkfile)635 wanted_checks.append(checkfile)
636 else:
637 log("CHARM: No role assigned to {}; not configuring Nagios checks".format(hostname))
636638
637 # Clear out any old role checks639 # Clear out any old role checks
638 # Making (fairly) sure we only touch files we manage640 # Making (fairly) sure we only touch files we manage

Subscribers

People subscribed via source and target branches