Deregister event queues when done in our Nagios scripts.

(imported from commit a1f73403163323e1dd9eda2f5269e94c60abdd1a)
This commit is contained in:
Tim Abbott
2013-11-19 17:51:06 -05:00
parent ca8225cf47
commit 630cfd72f1
3 changed files with 12 additions and 5 deletions

View File

@@ -144,11 +144,13 @@ while msg_to_send not in msg_content:
msg_content = [m['content'] for m in messages]
if options.nagios:
if time_diff.seconds > 3:
report('WARNING', time_diff)
if time_diff.seconds > 6:
report('CRITICAL', time_diff)
print zulip_recipient.deregister(queue_id)
if options.nagios:
if time_diff.seconds > 3:
report('WARNING', time_diff)
if time_diff.seconds > 6:
report('CRITICAL', time_diff)
if options.munin:
print "sendreceive.value %s" % total_seconds(time_diff)