From a1b74e9fd7f927a8832d7af1b91ce5898f9b0278 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Tue, 19 Mar 2013 15:04:28 -0400 Subject: [PATCH] Tighten rabbitmq thresholds and page_admins (imported from commit 373014bf75346286b55b0ea7d370b21de49ffa33) --- bots/check-rabbitmq-queue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bots/check-rabbitmq-queue b/bots/check-rabbitmq-queue index 79f3bd1..ae77951 100755 --- a/bots/check-rabbitmq-queue +++ b/bots/check-rabbitmq-queue @@ -5,13 +5,13 @@ import subprocess import re import time -from os import path +from os import path, environ sys.path.append(path.join(path.dirname(__file__), '../tools')) from humbug_tools import check_output -WARN_THRESHOLD = 100 -CRIT_THRESHOLD = 200 +WARN_THRESHOLD = 50 +CRIT_THRESHOLD = 100 states = { 0: "OK", @@ -27,6 +27,9 @@ status = 0 max_count = 0 warn_queues = [] +if not environ['USER'] in ['root', 'rabbitmq']: + print "This script must be run as the root or rabbitmq user" + for line in output.split("\n"): line = line.strip() m = re.match(line)