Talk:Plugin:check centreon snmp process detailed/@comment-195.254.172.59-20160510155022

Checks fails with CRITICAL even if minimum process count is set to 0.

Patch:

--- check_centreon_snmp_process_detailed.orig   2016-05-10 17:45:24.108250297 +0200 +++ check_centreon_snmp_process_detailed        2016-05-10 17:45:47.980654381 +0200 @@ -339,11 +339,15 @@ } }

-if ( $num_int == 0) { -    print "No process ",(defined ($o_noreg)) ? "named " : "matching ", join(" or ",split(/\|/,$o_descr)), " found : CRITICAL\n"; -    exit $ERRORS{"CRITICAL"}; +if ( $num_int == 0 ) { +    if ($o_warnL[0] == 0 || $o_critL[0] == 0) { +       print "No process ",(defined ($o_noreg)) ? "named " : "matching ", join(" or ",split(/\|/,$o_descr)), " found : OK\n"; +       exit $ERRORS{"OK"}; +    } else { +       print "No process ",(defined ($o_noreg)) ? "named " : "matching ", join(" or ",split(/\|/,$o_descr)), " found : CRITICAL\n"; +       exit $ERRORS{"CRITICAL"}; +    } } -