mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
fix date format refs #5643
This commit is contained in:
parent
a20f9b3c81
commit
3afd6849bb
@ -103,8 +103,9 @@ sub run {
|
|||||||
my $job_name = $$row[0];
|
my $job_name = $$row[0];
|
||||||
my $run_status = $$row[1];
|
my $run_status = $$row[1];
|
||||||
my $run_date = $$row[2];
|
my $run_date = $$row[2];
|
||||||
|
$run_date =~ s/(\d{4})(\d{2})(\d{2})/$1-$2-$3/;
|
||||||
my $run_time = $$row[3];
|
my $run_time = $$row[3];
|
||||||
$self->{output}->output_add(long_msg => sprintf("Job %s status %s [Date : %s] [Runtime : %s]", $job_name, $states{$run_status}, $run_date, $run_time));
|
$self->{output}->output_add(long_msg => sprintf("Job %s status %s [Date : %s] [Runtime : %ss]", $job_name, $states{$run_status}, $run_date, $run_time));
|
||||||
if ($run_status == 0) {
|
if ($run_status == 0) {
|
||||||
$count_failed++;
|
$count_failed++;
|
||||||
$self->{output}->output_add(severity => 'Critical',
|
$self->{output}->output_add(severity => 'Critical',
|
||||||
@ -118,9 +119,9 @@ sub run {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$self->{output}->perfdata_add(label => 'failed_jobs',
|
$self->{output}->perfdata_add(label => 'failed_jobs',
|
||||||
value => $count_failed,
|
value => $count_failed,
|
||||||
min => 0,
|
min => 0,
|
||||||
max => $count);
|
max => $count);
|
||||||
|
|
||||||
$self->{output}->display();
|
$self->{output}->display();
|
||||||
$self->{output}->exit();
|
$self->{output}->exit();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user