Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
one more fix...
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmcintosh committed Mar 20, 2014
1 parent 8611dea commit 33a559f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.'''
Expand Down

0 comments on commit 33a559f

Please sign in to comment.