From 33a559f1447ae7041b8d32382f473b68e37cd53a Mon Sep 17 00:00:00 2001 From: Jason Mcintosh Date: Thu, 20 Mar 2014 16:37:38 -0500 Subject: [PATCH] one more fix... --- scripts/api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/api.py b/scripts/api.py index bf2b6fc..959fcaf 100755 --- a/scripts/api.py +++ b/scripts/api.py @@ -66,13 +66,14 @@ def check_queue(self, filters=None): def _send_data(self, queue): '''Send the queue data to Zabbix.''' args = 'zabbix_sender -c {0} -k {1} -o {2}' + return_code = 0 for item in ['memory', 'messages', 'messages_unacknowledged', 'consumers']: key = '"rabbitmq[{0},queue_{1},{2}]"' key = key.format(queue['vhost'], item, queue['name']) value = queue.get(item, 0) #print "Executing ", args.format(self.conf, key, value) - return subprocess.call(args.format(self.conf, key, value), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - #return 0 + return_code |= subprocess.call(args.format(self.conf, key, value), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + return return_code def check_aliveness(self): '''Check the aliveness status of a given vhost.'''