jamesc/nagios-plugins-rabbitmq — pull request #39 by dvandelinde-coolblue (2014-07-25 12:12:05+00:00)
Title: check_rabbitmq_overview: gently deal with idle queues

I ran into a little issue with check_rabbitmq_overview: if all queues are idle, the rabbitmq api doesn't return an array for 'queue_totals'. Resulting in this error:
Not a HASH reference at /usr/local/nagios/libexec/check_rabbitmq_overview line 125.

If I view the returned json from the api/overview site:
'rabbitmq_version' => '3.1.5',
'erlang_version' => 'R14B04',
'queue_totals' => []
};
'queue_totals' is empty which causes the error, I added a check for this case. With this patch check_rabbitmq_overview returns:
./check_rabbitmq_overview --host=xxhost
RABBITMQ_OVERVIEW OK