Issues with RabbitMQ Refresh Rabbit Queue Status

Hey Jason,

We have previously used the older version of your scripts to monitor RabbiMQ Queues, and now we are trying to install it on a new machine with the latest version and are running into a few issues.

To start off with, here are some versions:

[Zabbix Server]
Zabbix Server: 3.0.4
OS: CentOS 7.2.1511

[Zabbix Host]
OS: CentOS 6.6 (Final)
Zabbix Agent: Zabbix Agent (daemon) v2.4.8 (revision 59539) (20 April 2016)
Zabbix Sender: Zabbix Sender v2.4.8 (revision 59539) (20 April 2016)
RabbitMQ: 3.3.5

The Refresh Rabbit Queue Status is returning code 2, and i am at a loss as to why. If i run the command directly from the agent i get a response code of 2, as well as executing the script also returning the code 2:

[user@hostname rabbitmq]$ sudo zabbix_agentd -t rabbitmq[queues]
rabbitmq[queues]                              [t|2]
[user@ hostname rabbitmq]$ sudo ./rabbitmq-status.sh queues
2

Both list_rabbit_queues.sh and rabbitmq-status.sh list_queues are returning the list of all the queues.
Zabbix is able to receive queues data and message rates. When viewing the logs however it looks like zabbix-sender is failing to send the data to the zabbix server:

[user@ hostname zabbix]$ tail -f rabbitmq_zabbix.log
2016-08-19 12:01:41,709 INFO: Found return code of 2
2016-08-19 12:01:41,710 WARNING: info from server: "processed: 0; failed: 78; total: 78; seconds spent: 0.000546"
sent: 78; skipped: 0; total: 78

When i switch the logging level to debug i can see that it is getting all the right data, but it is just not making it there:

2016-08-19 11:58:47,447 WARNING:
2016-08-19 11:58:47,485 DEBUG: Started trying to process data
2016-08-19 11:58:47,486 DEBUG: Issue a rabbit API call to get data on queues
2016-08-19 11:58:47,508 DEBUG: Filtering out by [{u'durable': True}]
2016-08-19 11:58:47,508 DEBUG: Filtering out by [{u'durable': True}]
2016-08-19 11:58:47,510 DEBUG: SENDER_DATA: - "rabbitmq.queues[/,queue_memory,queue_name]" 23608
2016-08-19 11:58:47,510 DEBUG: SENDER_DATA: - "rabbitmq.queues[/,queue_messages, queue_name]" 0
2016-08-19 11:58:47,512 DEBUG: SENDER_DATA: - "rabbitmq.queues[/,queue_messages_unacknowledged, queue_name]" 0
2016-08-19 11:58:47,513 DEBUG: SENDER_DATA: - "rabbitmq.queues[/,queue_consumers, queue_name]" 10
2016-08-19 11:58:47,513 DEBUG: SENDER_DATA: - "rabbitmq.queues[/,queue_message_stats_deliver_get, queue_name]" 2589422
2016-08-19 11:58:47,513 DEBUG: SENDER_DATA: - "rabbitmq.queues[/,queue_message_stats_publish, queue_name]" 1943898
***** Omitted *****
2016-08-19 11:58:47,925 DEBUG: Finished sending data
2016-08-19 11:58:47,925 INFO: Found return code of 2
2016-08-19 11:58:47,925 WARNING: info from server: "processed: 0; failed: 78; total: 78; seconds spent: 0.000545"
sent: 78; skipped: 0; total: 78

There may be something we have missed here, and if you need any further information please let me know. I would really appreciate some guidance when you have a spare moment!

Regards,

Leigh

Read more here: Source link