** Description changed: + [Impact] + + * If a rabbitmq server has no socket descriptors used the code + triggers a false positive and errors out mistakenly reporting the + server in a bad state. + + * Backport the fix from upstream, which is there for more than 3 years + but hasn't tagged a new release since then. + + [Test Case] + + $ 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 + + + [Regression Potential] + + * The change is fortunately minimal and therefore easy to review. + The old check by accident caused a value of 0 to become true due to the + negation. Actually the check should have been if the value is defined + at all. The regression impacts of this change IMHO are low, I can think + of a scenario where people got used to see all idle servers in this + particular broken state which will after the fix be reported "green" + now - but I don't think that is something that should stop the SRU. + + [Other Info] + + * This is harder to test on Xenial as the default setup there will not + have zero socket descriptors, but the problem is the same. + + + ---- + On a unused rabbitmq machine, the server monitoring reports that it was unable to get a value for sockets. This is not true, except the value is 0. In upstream this is already fixed by replacing !$used by !defined($used) on line 168 in /usr/lib/nagios/plugins-rabbitmq/check_rabbitmq_server Upstream: https://github.com/nagios-plugins-rabbitmq/nagios-plugins- rabbitmq/blob/master/scripts/check_rabbitmq_server#L191 Description: Ubuntu 16.04.3 LTS Release: 16.04 nagios-plugins-rabbitmq: - Installed: 1:1.2.0-2.1 - Candidate: 1:1.2.0-2.1 - Version table: - *** 1:1.2.0-2.1 500 - 500 http://nl.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages - 500 http://nl.archive.ubuntu.com/ubuntu xenial/universe i386 Packages - 100 /var/lib/dpkg/status + Installed: 1:1.2.0-2.1 + Candidate: 1:1.2.0-2.1 + Version table: + *** 1:1.2.0-2.1 500 + 500 http://nl.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages + 500 http://nl.archive.ubuntu.com/ubuntu xenial/universe i386 Packages + 100 /var/lib/dpkg/status
-- 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 ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs