mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-29 16:45:04 +02:00
Fix postgres query-time (#2512)
This commit is contained in:
parent
8974756ac7
commit
89e32c58f4
@ -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…
x
Reference in New Issue
Block a user