You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
812 B

From caabebdf4e1d820c19b7d7fa8e682848f22834e9 Mon Sep 17 00:00:00 2001
From: "Thierno IB. BARRY" <ibrahima.br@gmail.com>
Date: Tue, 26 Apr 2016 00:06:16 +0200
Subject: [PATCH 02/10] don't rise critical error when $used is 0
close #57
---
scripts/check_rabbitmq_server | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/check_rabbitmq_server b/scripts/check_rabbitmq_server
index 3a6ec98..4e47585 100755
--- 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);
--
2.20.1