Merge lp:~tribaal/charms/trusty/rabbitmq-server/nagios-check-critical-to-unknown into lp:~openstack-charmers-archive/charms/trusty/rabbitmq-server/next

Proposed by Chris Glass
Status: Merged
Merged at revision: 126
Proposed branch: lp:~tribaal/charms/trusty/rabbitmq-server/nagios-check-critical-to-unknown
Merge into: lp:~openstack-charmers-archive/charms/trusty/rabbitmq-server/next
Diff against target: 12 lines (+1/-1)
1 file modified
scripts/check_rabbitmq_queues.py (+1/-1)
To merge this branch: bzr merge lp:~tribaal/charms/trusty/rabbitmq-server/nagios-check-critical-to-unknown
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+279232@code.launchpad.net

Description of the change

This simple branch changes the nagios probe for queue size from emitting a CRITICAL to emitting an UNKNOWN when the data file scanned exists but does not (yet) contain relevant information.

This change will slightly alter the nagios alert's behavior in the following way, *if* the nagios service is related before the file has been populated (behavior is unchanged if that connections takes more than ~3 minutes on average):

- Once the charm is connected, if the file is not populated yet, the nagios probe will switch to unknown instead of critical (triggering a soft alert instead of a hard one).
- If the file is populated fast enough, no behavior changes.
- Should the charm stop populationg the file at some point in the future, nagios will switch to a soft alert for the duration set by the admin, retrying until enough time elapses to switch to a hard alert.

This makes the behavior consistent with nagios documentation, and further makes mojo tests run reliably (since in the case of mojo tests, the nagios checks might be run before rabbitmq has had a chance to populate the data file).

To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #14749 rabbitmq-server-next for tribaal mp279232
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/14749/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #13752 rabbitmq-server-next for tribaal mp279232
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/13752/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #8069 rabbitmq-server-next for tribaal mp279232
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/13619620/
Build: http://10.245.162.77:8080/job/charm_amulet_test/8069/

127. By Chris Glass

Nothing, just a kick of the build bot.

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #15275 rabbitmq-server-next for tribaal mp279232
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/15275/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #14248 rabbitmq-server-next for tribaal mp279232
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/14248/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #8244 rabbitmq-server-next for tribaal mp279232
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/8244/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/check_rabbitmq_queues.py'
2--- scripts/check_rabbitmq_queues.py 2014-05-07 09:52:24 +0000
3+++ scripts/check_rabbitmq_queues.py 2015-12-11 08:14:52 +0000
4@@ -49,7 +49,7 @@
5 ((l_vhost, l_queue), (int(t_warning), int(t_critical)))
6 for l_vhost, l_queue, t_warning, t_critical in limits)
7 if not (stats_collated):
8- yield 'No Queues Found', 'No Vhosts Found', None, "CRIT"
9+ yield 'No Queues Found', 'No Vhosts Found', None, "UNKNOWN"
10 # Go through the stats and compare again limits, if any.
11 for l_vhost, l_queue in sorted(stats_collated):
12 m_all = stats_collated[l_vhost, l_queue]

Subscribers

People subscribed via source and target branches