From 75942dc27e04b74b642eb1c7e7f2342c2c10c233 Mon Sep 17 00:00:00 2001 From: Christopher Kreft Date: Wed, 1 May 2013 15:01:23 +0200 Subject: [PATCH] fixed threshold output in perfdata --- check_json.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/check_json.pl b/check_json.pl index 5d81aa1..fa8ef3c 100755 --- a/check_json.pl +++ b/check_json.pl @@ -86,14 +86,16 @@ if (defined $np->opts->divisor) { $value = $value/$np->opts->divisor; } +my $result = $np->check_threshold($value); + $np->add_perfdata( label => 'value', value => $value, - #threshold => $threshold, + threshold => $np->threshold(), ); $np->nagios_exit( - return_code => $np->check_threshold($value), - message => $value + return_code => $result, + message => $value, );