Fix postgres query-time (#2512)
This commit is contained in:
parent
b72917a0ec
commit
5757f2dbd3
|
@ -99,7 +99,7 @@ ORDER BY pgsa.query_start, pgsa.procpid DESC
|
||||||
}
|
}
|
||||||
|
|
||||||
my $exit_code = $self->{perfdata}->threshold_check(value => $row->{seconds}, threshold => [ { label => 'critical', exit_litteral => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
|
my $exit_code = $self->{perfdata}->threshold_check(value => $row->{seconds}, threshold => [ { label => 'critical', exit_litteral => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
|
||||||
if ($self->{output}->is_status(value => $exit_code, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit_code, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(long_msg => sprintf("Request from client '%s' too long (%d sec) on database '%s': %s",
|
$self->{output}->output_add(long_msg => sprintf("Request from client '%s' too long (%d sec) on database '%s': %s",
|
||||||
$row->{client_addr}, $row->{seconds}, $row->{datname}, $row->{current_query}));
|
$row->{client_addr}, $row->{seconds}, $row->{datname}, $row->{current_query}));
|
||||||
$dbquery->{$row->{datname}}->{total}++;
|
$dbquery->{$row->{datname}}->{total}++;
|
||||||
|
|
Loading…
Reference in New Issue