Merge lp:~caio1982/capomastro/nagios-hostname-fix-1496338 into lp:~ubuntuone-hackers/capomastro/charm

Proposed by Caio Begotti
Status: Merged
Approved by: Daniel Manrique
Approved revision: 70
Merged at revision: 71
Proposed branch: lp:~caio1982/capomastro/nagios-hostname-fix-1496338
Merge into: lp:~ubuntuone-hackers/capomastro/charm
Diff against target: 12 lines (+1/-1)
1 file modified
hooks/nrpe-external-master-relation-changed (+1/-1)
To merge this branch: bzr merge lp:~caio1982/capomastro/nagios-hostname-fix-1496338
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Review via email: mp+272539@code.launchpad.net

Commit message

Fix the sitename option of the charm so it's correctly used by the Nagios check, instead of having a hardcoded (legacy) hostname there.

Description of the change

Fix the sitename option of the charm so it's correctly used by the Nagios check, instead of having a hardcoded (legacy) hostname there.

This has been tested on Wendigo, the verify phase of the Mojo spec is happy about it too.

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

Looks good to me, even though I'm not awesome with nagios. Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/nrpe-external-master-relation-changed'
2--- hooks/nrpe-external-master-relation-changed 2015-02-19 00:59:50 +0000
3+++ hooks/nrpe-external-master-relation-changed 2015-09-28 00:38:52 +0000
4@@ -22,7 +22,7 @@
5 # check for the actual web page being available or not
6 export t_nagios_service_description="Capomastro build server"
7 export t_nagios_command_name="check_${t_nagios_context}_capomastro_app"
8- export t_nagios_command="/usr/lib/nagios/plugins/check_http -I ${private_address} -p ${port} -u / -e '302 FOUND' -u / -d 'http://capomastro/accounts/login/'"
9+ export t_nagios_command="/usr/lib/nagios/plugins/check_http -I ${private_address} -p ${port} -H ${sitename} -u / -e '302 FOUND' -u / -d 'http://${sitename}/accounts/login/'"
10
11 cheetah fill --env -p templates/nrpe_command_file.tmpl > /etc/nagios/nrpe.d/${t_nagios_command_name}.cfg
12 cheetah fill --env -p templates/nrpe_service_file.tmpl > /var/lib/nagios/export/service_${t_nagios_hostname}_${t_nagios_command_name}.cfg

Subscribers

People subscribed via source and target branches