Skip to content

Commit 9751949

Browse files
author
David Christensen
authored
Merge pull request bucardo#125 from infoxchange/pgbouncer_perfdata_fix
bucardo#105 output per-database perfdata for pgbouncer pool checks (was |time=0.01 time=0.01 time=0.01 ...)
2 parents 474f3da + 36f17e0 commit 9751949

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

check_postgres.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,7 @@ sub add_response {
17431743
$dbport;
17441744
$header =~ s/\s+$//;
17451745
$header =~ s/^ //;
1746-
my $perf = ($opt{showtime} and $db->{totaltime} and $action ne 'bloat') ? "time=$db->{totaltime}s" : '';
1746+
my $perf = ($opt{showtime} and $db->{totaltime} and $action ne 'bloat' and $action !~ /^pgb_pool_/ ) ? "time=$db->{totaltime}s" : '';
17471747
if ($db->{perf}) {
17481748
$db->{perf} =~ s/^ +//;
17491749
if (length $same_schema_header) {
@@ -6283,6 +6283,7 @@ sub check_pgb_pool {
62836283
$statsmsg{$i->{database}} = msg('pgbouncer-pool', $i->{database}, $stat, $i->{$stat});
62846284
next;
62856285
}
6286+
$db->{perf} = sprintf ' %s=%s;%s;%s', $i->{database}, $i->{$stat}, $warning, $critical;
62866287

62876288
if ($critical and $i->{$stat} >= $critical) {
62886289
add_critical $msg;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy