improve plugins
git-svn-id: http://svn.centreon.com/trunk/plugins-2.x@10646 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
parent
42de0f396b
commit
8ae95ce008
|
@ -190,17 +190,17 @@ if( $rta == -1 ) {
|
||||||
} elsif ( ($pl >= $pl_critical) || ($rta >= $rta_critical) ) {
|
} elsif ( ($pl >= $pl_critical) || ($rta >= $rta_critical) ) {
|
||||||
$ping_result_array[@ping_result_array -1 ] =~ s/\%/percent/g;
|
$ping_result_array[@ping_result_array -1 ] =~ s/\%/percent/g;
|
||||||
my @tab = split(/,/,$ping_result_array[@ping_result_array -1 ]);
|
my @tab = split(/,/,$ping_result_array[@ping_result_array -1 ]);
|
||||||
print "PING CRITICAL - ". $tab[1] ."|time=".$time_answer."ms;$pl_warning;$pl_critical;; ok=1\n";
|
print "PING CRITICAL - ". $tab[1] ."|time=".$time_answer."ms;$pl_warning;$pl_critical;0; ok=1\n";
|
||||||
exit $ERRORS{'CRITICAL'};
|
exit $ERRORS{'CRITICAL'};
|
||||||
} elsif ( ($pl >= $pl_warning) || ($rta >= $rta_warning) ) {
|
} elsif ( ($pl >= $pl_warning) || ($rta >= $rta_warning) ) {
|
||||||
$ping_result_array[@ping_result_array -1 ] =~ s/\%/percent/g;
|
$ping_result_array[@ping_result_array -1 ] =~ s/\%/percent/g;
|
||||||
my @tab = split(/,/,$ping_result_array[@ping_result_array -1 ]);
|
my @tab = split(/,/,$ping_result_array[@ping_result_array -1 ]);
|
||||||
print "PING WARNING - ".$tab[0]."|time=".$time_answer."ms;$pl_warning;$pl_critical;; ok=1\n";
|
print "PING WARNING - ".$tab[0]."|time=".$time_answer."ms;$pl_warning;$pl_critical;0; ok=1\n";
|
||||||
exit $ERRORS{'WARNING'};
|
exit $ERRORS{'WARNING'};
|
||||||
} else {
|
} else {
|
||||||
$ping_result_array[@ping_result_array -1 ] =~ s/\%/percent/g;
|
$ping_result_array[@ping_result_array -1 ] =~ s/\%/percent/g;
|
||||||
my @tab = split(/,/,$ping_result_array[@ping_result_array -1 ]);
|
my @tab = split(/,/,$ping_result_array[@ping_result_array -1 ]);
|
||||||
print "PING OK - ".$tab[0]."|time=".$time_answer."ms;$pl_warning;$pl_critical;; ok=1\n";
|
print "PING OK - ".$tab[0]."|time=".$time_answer."ms;$pl_warning;$pl_critical;0; ok=1\n";
|
||||||
exit $ERRORS{'OK'};
|
exit $ERRORS{'OK'};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -421,7 +421,7 @@ if (($Size =~ /([0-9]+)/) && ($AllocationUnits =~ /([0-9]+)/)){
|
||||||
if ($opt_L) {
|
if ($opt_L) {
|
||||||
print " - ".$hrStorageLabel;
|
print " - ".$hrStorageLabel;
|
||||||
}
|
}
|
||||||
print "|size=".$tot."B used=".$used."B;".$warn.";".$crit."\n";
|
print "|size=".$tot."B used=".$used."B;".$warn.";".$crit.";0;".$tot."\n";
|
||||||
exit $return_code;
|
exit $return_code;
|
||||||
} else {
|
} else {
|
||||||
printf("TOTAL: %.3fGB USED: %.3fGB (%d%%)", $totMB, $usedMB, $pourcent );
|
printf("TOTAL: %.3fGB USED: %.3fGB (%d%%)", $totMB, $usedMB, $pourcent );
|
||||||
|
|
Loading…
Reference in New Issue