cleaning
git-svn-id: http://svn.centreon.com/trunk/plugins@3465 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
parent
4567283256
commit
f68c22d033
|
@ -169,13 +169,20 @@ if (!($opt_n)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Plugin return code
|
# Plugin return code
|
||||||
|
my $status;
|
||||||
if ($opt_n){
|
if ($opt_n){
|
||||||
print "Processes OK - Number of current processes: $proc|nbproc=$proc\n";
|
$status = 'OK';
|
||||||
exit $ERRORS{'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 {
|
} else {
|
||||||
if ($proc_run){
|
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'};
|
exit $ERRORS{'OK'};
|
||||||
} else {
|
} else {
|
||||||
print "Process CRITICAL - $process not in 'running' state\n";
|
print "Process CRITICAL - $process not in 'running' state\n";
|
||||||
|
|
Loading…
Reference in New Issue