mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-28 08:04:36 +02:00
+ Display responde code and response message in case of failure
+ Take into account null timestamps
This commit is contained in:
parent
7cf13e59cf
commit
379c7ad4b4
@ -150,17 +150,19 @@ sub run {
|
|||||||
$stepOk++;
|
$stepOk++;
|
||||||
} else {
|
} else {
|
||||||
if (!defined($first_failed_label)) {
|
if (!defined($first_failed_label)) {
|
||||||
$first_failed_label = $label;
|
$first_failed_label = $label . " (" . $response_code . " " . $response_message . ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
$exit1 = $self->{output}->get_most_critical(status => [ $exit1, $temp_exit ]);
|
$exit1 = $self->{output}->get_most_critical(status => [ $exit1, $temp_exit ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($timing0 == 0) {
|
if ($timestamp > 0) {
|
||||||
|
if ($timing0 == 0) {
|
||||||
$timing0 = $timestamp;
|
$timing0 = $timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
$timing1 = $timestamp + $elapsed_time;
|
$timing1 = $timestamp + $elapsed_time;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my $timeelapsed = ($timing1 - $timing0) / 1000;
|
my $timeelapsed = ($timing1 - $timing0) / 1000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user