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.
26 lines
947 B
26 lines
947 B
3 years ago
|
From 59f2fbf7d50957daf005a8ea167e7686f280a04a Mon Sep 17 00:00:00 2001
|
||
|
From: Matthew Wilson <diakopter@gmail.com>
|
||
|
Date: Mon, 25 Apr 2016 14:06:55 -0700
|
||
|
Subject: [PATCH 01/10] track codes in all cases (#66)
|
||
|
|
||
|
---
|
||
|
scripts/check_rabbitmq_queue | 2 ++
|
||
|
1 file changed, 2 insertions(+)
|
||
|
|
||
|
diff --git a/scripts/check_rabbitmq_queue b/scripts/check_rabbitmq_queue
|
||
|
index 335c7b3..b8201d5 100755
|
||
|
--- a/scripts/check_rabbitmq_queue
|
||
|
+++ b/scripts/check_rabbitmq_queue
|
||
|
@@ -187,6 +187,8 @@ for my $metric (@metrics) {
|
||
|
my $value = 0;
|
||
|
$value = $result->{$metric} if defined $result->{$metric};
|
||
|
my $code = $p->check_threshold(check => $value, warning => $warning, critical=> $critical);
|
||
|
+ push @values, $code;
|
||
|
+
|
||
|
$p->add_message($code, sprintf("$metric ".$STATUS_TEXT{$code}." (%d)", $value)) ;
|
||
|
$p->add_perfdata(label=>$metric, value => $value, warning=>$warning, critical=> $critical);
|
||
|
}
|
||
|
--
|
||
|
2.20.1
|
||
|
|