request_data = requests.get("http://127.0.0.1:15672/api/" + component ,auth=(username,password))
if request_data.status_code != 200:
- raise Exception("[ERROR]: Problems connecting to logstash stats API\n")
+ raise Exception("[ERROR]: Problems connecting to rabbitMQ stats API\n")
data = request_data.json()
try:
+ #
+ # We send data about queues, nodes and cluster to Zabbix
+ #
+
for component in ['queues','nodes','overview']:
# Temp file with full json output
#
# The monitoring of this host can be done by any of the
- # zabbix proxyer defined in zabbix_proxy[]. We try all of
+ # zabbix proxies defined in zabbix_proxy[]. We try all of
# them until one of them accepts our data
#
command = zabbix_sender + ' -z ' + proxy + ' -i ' + tmp_stat_file.name + ' > /dev/null 2>&1'
- proc = subprocess.Popen([command],stdout=subprocess.STDOUT,stderr=subprocess.STDOUT,shell=True)
+ proc = subprocess.Popen([command],shell=True)
proc.wait()
if proc.returncode == 0: