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
1diff --git a/hooks/hooks.py b/hooks/hooks.py
2index 577fbff..b95c327 100755
3--- a/hooks/hooks.py
4+++ b/hooks/hooks.py
5@@ -622,7 +622,7 @@ def configure_nrpe():
6 wanted_checks.append(checkfile)
7
8 # Nagios config file
9- tmpl_data["description"] = "%s %s" % (check_details["desc"], hostname)
10+ tmpl_data["description"] = "%s for %s on %s" % (check_details["desc"], mirror["name"], hostname)
11 tmpl_data["check_command"] = "check_nrpe!%s_%s" % (check, mirror["name"])
12 tmpl_data["servicegroup"] = conf.nagios_servicegroup()
13 if check_details["type"] == "critical":
14@@ -633,6 +633,8 @@ def configure_nrpe():
15 tmplfile = "nagios-config.tmpl"
16 file_from_template(tmplfile, configpath, tmpl_data)
17 wanted_checks.append(checkfile)
18+ else:
19+ log("CHARM: No role assigned to {}; not configuring Nagios checks".format(hostname))
20
21 # Clear out any old role checks
22 # Making (fairly) sure we only touch files we manage

Subscribers

People subscribed via source and target branches