Merge ~xavpaice/charm-nrpe:machine-id into ~nrpe-charmers/charm-nrpe:master

Proposed by Xav Paice
Status: Merged
Merged at revision: a07b7518d6ff9f87023a9839e1385b2a1bc2fa6c
Proposed branch: ~xavpaice/charm-nrpe:machine-id
Merge into: ~nrpe-charmers/charm-nrpe:master
Diff against target: 19 lines (+2/-0)
1 file modified
hooks/nrpe_helpers.py (+2/-0)
Reviewer Review Type Date Requested Status
Alvaro Uria (community) Approve
Review via email: mp+332126@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alvaro Uria (aluria) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/hooks/nrpe_helpers.py b/hooks/nrpe_helpers.py
2index 5cb71fe..b6bae09 100644
3--- a/hooks/nrpe_helpers.py
4+++ b/hooks/nrpe_helpers.py
5@@ -4,6 +4,7 @@ import subprocess
6
7 from charmhelpers.core.services import helpers
8 from charmhelpers.core import hookenv
9+import os
10
11
12 class Monitors(dict):
13@@ -128,6 +129,7 @@ class MonitorsRelation(helpers.RelationContext):
14 'target-id': self.principal_relation.nagios_hostname(),
15 'monitors': self.get_monitors(),
16 'private-address': address,
17+ 'machine_id': os.environ['JUJU_MACHINE_ID'],
18 }
19 return relation_info
20

Subscribers

People subscribed via source and target branches