git-svn-id: http://svn.centreon.com/trunk/plugins@3465 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
Julien Mathis 2007-11-12 22:02:53 +00:00
parent 4567283256
commit f68c22d033
1 changed files with 11 additions and 4 deletions

View File

@ -169,13 +169,20 @@ if (!($opt_n)) {
}
# Plugin return code
my $status;
if ($opt_n){
print "Processes OK - Number of current processes: $proc|nbproc=$proc\n";
exit $ERRORS{'OK'};
$status = 'OK';
if ($proc >= $opt_w){
$status = 'WARNING';
}
if ($proc >= $opt_c){
$status = 'CRITICAL';
}
print "Number of current processes: $proc|nbproc=$proc\n";
exit $ERRORS{$status};
} else {
if ($proc_run){
print "Process OK - $process: $STATUS{$proc_run}|procstatus=$proc_run\n";
print "Process OK - $process: $STATUS{$proc_run}\n";
exit $ERRORS{'OK'};
} else {
print "Process CRITICAL - $process not in 'running' state\n";