diff --git a/bots/check-rabbitmq-consumers b/bots/check-rabbitmq-consumers index d0103d3..fd3661b 100755 --- a/bots/check-rabbitmq-consumers +++ b/bots/check-rabbitmq-consumers @@ -5,9 +5,7 @@ import time import optparse from collections import defaultdict import os - -sys.path.append(os.path.join(os.path.dirname(__file__), '..')) -from zulip_tools import check_output +import subprocess states = { 0: "OK", @@ -35,7 +33,7 @@ parser.add_option('--min-threshold', (options, args) = parser.parse_args() -output = check_output(['/usr/sbin/rabbitmqctl', 'list_consumers'], shell=False) +output = subprocess.check_output(['/usr/sbin/rabbitmqctl', 'list_consumers'], shell=False) consumers = defaultdict(int) diff --git a/bots/check-rabbitmq-queue b/bots/check-rabbitmq-queue index d29bc20..7f54d9f 100755 --- a/bots/check-rabbitmq-queue +++ b/bots/check-rabbitmq-queue @@ -4,9 +4,7 @@ import sys import re import time import os - -sys.path.append(os.path.join(os.path.dirname(__file__), '..')) -from zulip_tools import check_output +import subprocess WARN_THRESHOLD = 50 CRIT_THRESHOLD = 100 @@ -19,7 +17,7 @@ states = { } re = re.compile(r'(\w+)\t(\d+)') -output = check_output(['/usr/sbin/rabbitmqctl', 'list_queues'], shell=False) +output = subprocess.check_output(['/usr/sbin/rabbitmqctl', 'list_queues'], shell=False) status = 0 max_count = 0