Package: nagios-plugins-rabbitmq
Version: 1:1.2.0-2.3
Severity: normal
Tags: patch
X-Debbugs-Cc: [email protected]

Dear maintainer,
it seems that having an idle rabbitmq server/cluster queried by
check_rabbitmq_server results in a message like:

/usr/lib/nagios/plugins-rabbitmq/check_rabbitmq_server -H 127.0.0.1 --port 
15672 --warning='80,80,80,90' --critical='90,90,90,95' --user guest --password 
guest
RABBITMQ_SERVER CRITICAL - Received 500 Internal Server Error for path: 
nodes/rabbit@127

This issue seems to be due to sockets not being defined in the servers
response. If one replaces the if in line 168 in that way:

<   if (!$p || !$used) {
>   if (!$p || !defined($used)) {

it fixes the issue:

/usr/lib/nagios/plugins-rabbitmq/check_rabbitmq_server -H 127.0.0.1 --port 
15672 --warning='80,80,80,90' --critical='90,90,90,95' --user guest --password 
guest
RABBITMQ_SERVER OK - Memory OK (6.48%) Process OK (0.06%) FD OK (0.49%) Sockets 
OK (0.00%) | Memory=6.48%;80;90 Process=0.06%;80;90 FD=0.49%;80;90 
Sockets=0.00%;90;95

This is in accordance with
https://github.com/nagios-plugins-rabbitmq/nagios-plugins-rabbitmq/blob/master/scripts/check_rabbitmq_server#L191

Please fix that bug.

Best regards
JD


-- System Information:
Debian Release: 11.5
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-16-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages nagios-plugins-rabbitmq depends on:
ii  libjson-perl               4.03000-1
pn  libmonitoring-plugin-perl  <none>
ii  liburi-perl                5.08-1
ii  libwww-perl                6.52-1

nagios-plugins-rabbitmq recommends no packages.

Versions of packages nagios-plugins-rabbitmq suggests:
pn  rabbitmq-server  <none>

Reply via email to