After some debugging I came up with a simple Testcase for this issue:

$ apt install rabbitmq-server nagios-plugins-rabbitmq
# Enable management http api
$ rabbitmq-plugins enable rabbitmq_management
# Now do the same via the nagios plugin (no actual nagios server needed)
$ cd /usr/lib/nagios/plugins-rabbitmq
$ ./check_rabbitmq_server --node $(hostname -s) --hostname 127.0.0.1 
--port=15672 -u "guest" -p "guest"

Output bad case:
RABBITMQ_SERVER CRITICAL - Unable to get values for Sockets | 
Memory=0.57%;80;90 Process=0.04%;80;90 FD=0.05%;80;90
Output good case:
RABBITMQ_SERVER OK - Memory OK (0.57%) Process OK (0.04%) FD OK (0.05%) Sockets 
OK (0.00%) | Memory=0.57%;80;90 Process=0.04%;80;90 FD=0.05%;80;90 
Sockets=0.00%;80;90

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1787110

Title:
  False positives in reporting server unavailable

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nagios-plugins-rabbitmq/+bug/1787110/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to