Fix postgres query-time (#2512)

This commit is contained in:
kabreu 2021-01-13 19:43:00 +01:00 committed by GitHub
parent b72917a0ec
commit 5757f2dbd3
1 changed files with 1 additions and 1 deletions

View File

@ -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' } ]);
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",
$row->{client_addr}, $row->{seconds}, $row->{datname}, $row->{current_query}));
$dbquery->{$row->{datname}}->{total}++;