improve meta service plugin

git-svn-id: http://svn.centreon.com/trunk/plugins-2.x@12955 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
Julien Mathis 2012-03-20 11:28:38 +00:00
parent 0923313860
commit 1bd13cee96
1 changed files with 9 additions and 2 deletions

View File

@ -414,6 +414,13 @@ if (defined($warning) && defined($critical)) {
}
}
my $metric = "";
if (defined($metric_select)) {
$metric = $metric_select;
} else {
$metric = "value";
}
if (!defined($display) || !$display) {
if ($calculation eq "AVE") {
$msg .= "Average - ";
@ -424,10 +431,10 @@ if (!defined($display) || !$display) {
} elsif ($calculation eq "MAX") {
$msg .= "Max - ";
}
$msg .= "value : " . $res . "|value=".$res;
$msg .= $metric." : " . $res . "|".$metric."=".$res;
} else {
$msg = sprintf($display, $res);
$msg .= "|value=".$res;
$msg .= "|".$metric."=".$res;
}
##############