Merge ~nick-moffitt/content-cache-charm:nagios-fixes into content-cache-charm:master

Proposed by Nick Moffitt
Status: Merged
Approved by: Nick Moffitt
Approved revision: 497d81a3804ee72abfbea3779e580d334ffdcdbb
Merged at revision: d9d48a032bd1be95e7cb602640f06cd6b0bd42bd
Proposed branch: ~nick-moffitt/content-cache-charm:nagios-fixes
Merge into: content-cache-charm:master
Diff against target: 22 lines (+4/-0)
1 file modified
reactive/content_cache.py (+4/-0)
Reviewer Review Type Date Requested Status
Joel Sing (community) +1 Approve
Review via email: mp+366278@code.launchpad.net

Commit message

Allow per-location http results (401 etc)

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
Joel Sing (jsing) wrote :

LGTM, but see comments.

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

Change successfully merged at revision d9d48a032bd1be95e7cb602640f06cd6b0bd42bd

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/reactive/content_cache.py b/reactive/content_cache.py
2index f6a9f5f..460f120 100644
3--- a/reactive/content_cache.py
4+++ b/reactive/content_cache.py
5@@ -283,6 +283,8 @@ def configure_nagios():
6 cmd = '/usr/lib/nagios/plugins/check_http -I 127.0.0.1 -H {site}' \
7 ' -p {port}{tls} -j {method} -u {url}{path}{token}' \
8 .format(site=site, port=frontend_port, method=method, url=url, path=path, token=token, tls=tls)
9+ if 'nagios-expect' in loc_conf:
10+ cmd = '{cmd} --expect="{expected}"'.format(cmd=cmd, expected=loc_conf['nagios-expect'])
11 nrpe_setup.add_check(check_name, '{} site listen check'.format(site), cmd)
12
13 # Cache layer check
14@@ -290,6 +292,8 @@ def configure_nagios():
15 cmd = '/usr/lib/nagios/plugins/check_http -I 127.0.0.1 -H {site}' \
16 ' -p {cache_port} -j {method} -u {url}{path}{token}' \
17 .format(site=site, cache_port=cache_port, method=method, url=url, path=path, token=token)
18+ if 'nagios-expect' in loc_conf:
19+ cmd = '{cmd} --expect="{expected}"'.format(cmd=cmd, expected=loc_conf['nagios-expect'])
20 nrpe_setup.add_check(check_name, '{} cache check'.format(site), cmd)
21
22 if backend_port:

Subscribers

People subscribed via source and target branches