File: check_rabbitmq_server.patch

package info (click to toggle)
nagios-plugins-rabbitmq 1%3A2.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 368 kB
  • sloc: perl: 1,409; sh: 24; makefile: 15
file content (17 lines) | stat: -rw-r--r-- 666 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Origin: https://github.com/nagios-plugins-rabbitmq/nagios-plugins-rabbitmq/pull/109/commits/32f258061b292e9d0bc90a950f4d14c71024e98c
From: Hugo Deprez <h.deprez@manifone.com>
Date: 2025-07-24
Bug-Debian: https://bugs.debian.org/1024077
Description: prevent false CRITICAL when metric value is 0

--- a/scripts/check_rabbitmq_server
+++ b/scripts/check_rabbitmq_server
@@ -188,7 +188,7 @@ sub check {
     my $warning = shift;
     my $critical = shift;
 
-    if (!$p || !$used) {
+    if (!$p || !defined($used)) {
       $p->nagios_exit( return_code=>CRITICAL, message=>'Unable to get values for '.$label);
     } else {
       my $value = percent($used, $limit);