From 16bb14aeace367141eff2df20bda25f8aaee2029 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Mon, 1 Mar 2010 15:51:01 -0500 Subject: Cleanup and enhancement of the slony_status action. --- check_postgres.pl | 53 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 15 deletions(-) (limited to 'check_postgres.pl') diff --git a/check_postgres.pl b/check_postgres.pl index 90ca0da06..0642d16d2 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -29,7 +29,7 @@ $Data::Dumper::Varname = 'POSTGRES'; $Data::Dumper::Indent = 2; $Data::Dumper::Useqq = 1; -our $VERSION = '2.14.2'; +our $VERSION = '2.14.3'; use vars qw/ %opt $PSQL $res $COM $SQL $db /; @@ -236,6 +236,7 @@ our %msg = ( 'seq-none' => q{No sequences found}, 'slony-noschema' => q{Could not determine the schema for Slony}, 'slony-nonumber' => q{Call to sl_status did not return a number}, + 'slony-noparse' => q{Could not parse call to sl_status}, 'slony-lagtime' => q{Slony lag time: $1}, 'symlink-create' => q{Created "$1"}, 'symlink-done' => q{Not creating "$1": $2 already linked to "$3"}, @@ -432,9 +433,10 @@ our %msg = ( 'runtime-msg' => q{durée d'exécution de la requête : $1 secondes}, 'same-failed' => q{Les bases de données sont différentes. Éléments différents : $1}, 'same-matched' => q{Les bases de données ont les mêmes éléments}, - 'slony-noschema' => q{N'a pas pu déterminer le schéma de Slony}, - 'slony-nonumber' => q{L'appel à sl_status n'a pas renvoyé un numéro}, - 'slony-lagtime' => q{Durée de lag de Slony : $1}, + 'slony-noschema' => q{N'a pas pu déterminer le schéma de Slony}, + 'slony-nonumber' => q{L'appel à sl_status n'a pas renvoyé un numéro}, +'slony-noparse' => q{Could not parse call to sl_status}, + 'slony-lagtime' => q{Durée de lag de Slony : $1}, 'seq-die' => q{N'a pas pu récupérer d'informations sur la séquence $1}, 'seq-msg' => q{$1=$2% (appels restant=$3)}, 'seq-none' => q{Aucune sequences trouvée}, @@ -6496,28 +6498,45 @@ sub check_slony_status { } } - my $SQL = qq{SELECT ROUND(EXTRACT(epoch FROM st_lag_time)) FROM $schema.sl_status}; + my $SQL = +qq{SELECT ROUND(EXTRACT(epoch FROM st_lag_time)), +st_origin, st_received, +COALESCE(n1.no_comment, ''), COALESCE(n1.no_comment, '') +FROM $schema.sl_status +JOIN $schema.sl_node n1 ON (n1.no_id=st_origin) +JOIN $schema.sl_node n2 ON (n2.no_id=st_received)}; my $info = run_command($SQL, {regex => qr[\d+] } ); - $db = $info->{db}[0]; if ($db->{slurp} !~ /^\s*(\d+)/) { add_unknown msg('slony-nonumber'); return; } - my $lagtime = $1; + my $maxlagtime = 0; + my @perf; + for my $row (split /\n/ => $db->{slurp}) { + if ($row !~ /(\d+)\s+\|\s+(\d+)\s+\|\s+(\d+) \| (.*?)\s*\| (.*)/) { + add_unknown msg('slony-noparse'); + } + my ($lag,$from,$to,$fromc,$toc) = ($1,$2,$3,$4,$5); + $maxlagtime = $lag if $lag > $maxlagtime; + push @perf => [ + $lag, + $from, + qq{'$db->{dbname} Node $from($fromc) -> Node $to($toc)'=$lag;$warning;$critical}, + ]; + } + $db->{perf} = join "\n" => map { $_->[2] } sort { $b->[0]<=>$a->[0] or $a->[1]<=>$b->[1] } @perf; if ($MRTG) { - do_mrtg({one => $lagtime}); + do_mrtg({one => $maxlagtime}); return; } - my $dbname = $db->{dbname}; - $db->{perf} = "'$dbname'=$lagtime;$warning;$critical"; - my $msg = msg('slony-lagtime', $lagtime); - $msg .= sprintf ' (%s)', pretty_time($lagtime, $lagtime > 500 ? 'S' : ''); - if (length $critical and $lagtime >= $critical) { + my $msg = msg('slony-lagtime', $maxlagtime); + $msg .= sprintf ' (%s)', pretty_time($maxlagtime, $maxlagtime > 500 ? 'S' : ''); + if (length $critical and $maxlagtime >= $critical) { add_critical $msg; } - elsif (length $warning and $lagtime >= $warning) { + elsif (length $warning and $maxlagtime >= $warning) { add_warning $msg; } else { @@ -6588,7 +6607,7 @@ sub show_dbstats { B - a Postgres monitoring script for Nagios, MRTG, Cacti, and others -This documents describes check_postgres.pl version 2.14.2 +This documents describes check_postgres.pl version 2.14.3 =head1 SYNOPSIS @@ -8075,6 +8094,10 @@ Items not specifically attributed are by Greg Sabino Mullane. =over 4 +=item B + + Allow slony_status action to handle more than one slave. + =item B (February 18, 2010) Change autovac_freeze default warn/critical back to 90%/95% (Robert Treat) -- cgit v1.2.3 From 292851f3d48604e660393084202bdcec08096e98 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Mon, 1 Mar 2010 15:53:10 -0500 Subject: Fix typo in slony_status SQL (hooray for unit tests!) --- check_postgres.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'check_postgres.pl') diff --git a/check_postgres.pl b/check_postgres.pl index 0642d16d2..d0635fb6e 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -6501,7 +6501,7 @@ sub check_slony_status { my $SQL = qq{SELECT ROUND(EXTRACT(epoch FROM st_lag_time)), st_origin, st_received, -COALESCE(n1.no_comment, ''), COALESCE(n1.no_comment, '') +COALESCE(n1.no_comment, ''), COALESCE(n2.no_comment, '') FROM $schema.sl_status JOIN $schema.sl_node n1 ON (n1.no_id=st_origin) JOIN $schema.sl_node n2 ON (n2.no_id=st_received)}; -- cgit v1.2.3 From bd63c4d732bb01c91aaffbb81bef68c99499d334 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Mon, 1 Mar 2010 16:00:02 -0500 Subject: Version bump, prep for 2.14.3 --- META.yml | 4 ++-- Makefile.PL | 2 +- SIGNATURE | 20 ++++++++++---------- check_postgres.pl | 2 +- check_postgres.pl.asc | 6 +++--- check_postgres.pl.html | 10 ++++++++-- 6 files changed, 25 insertions(+), 19 deletions(-) (limited to 'check_postgres.pl') diff --git a/META.yml b/META.yml index 6ddaf3660..a582fce22 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name : check_postgres.pl -version : 2.14.2 +version : 2.14.3 abstract : Postgres monitoring script author: - Greg Sabino Mullane @@ -30,7 +30,7 @@ recommends: provides: check_postgres: file : check_postgres.pl - version : 2.14.2 + version : 2.14.3 keywords: - Postgres diff --git a/Makefile.PL b/Makefile.PL index 5166c77ec..032786a5f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -6,7 +6,7 @@ use strict; use warnings; use 5.006001; -my $VERSION = '2.14.2'; +my $VERSION = '2.14.3'; if ($VERSION =~ /_/) { print "WARNING! This is a test version ($VERSION) and should not be used in production!\n"; diff --git a/SIGNATURE b/SIGNATURE index 45e473321..3142888e1 100644 --- a/SIGNATURE +++ b/SIGNATURE @@ -18,13 +18,13 @@ SHA1 de1474d7cbc69698971954ffb80760269b218e1f .gitignore SHA1 34704b2a862f8ea670ed335230affc9ef3e3acb9 .perlcriticrc SHA1 19f7436035c2dd1b1edc7bfdc138409d872338b0 MANIFEST SHA1 92f9e28d28d95763cce24d588b19262efc7218f7 MANIFEST.SKIP -SHA1 930ab275a8f88628a0c1935b8b6e4a22ec20e689 META.yml -SHA1 b44a9cb5e3cbaee7f0a0b700cf1009ed3eda2960 Makefile.PL +SHA1 61504d60a0dc5ad977832ae113c9419b45401a57 META.yml +SHA1 095ea74b5de1e1ef58f759b4b095d88020266157 Makefile.PL SHA1 709742a5933a43cc3e82ee935cd63a45f176adda README SHA1 6a627ce3f10fd9993b65210733d6098ef6a42dca TODO -SHA1 eeaf5e7d96e8da58e6e438e88c5eb99aaf2735d4 check_postgres.pl -SHA1 d40000f8723d13df9f652ff544b91a70e38f6535 check_postgres.pl.asc -SHA1 fa27b8ac7e397eab233030c36daf884ad1d08cd1 check_postgres.pl.html +SHA1 ce4e0d39260b47eb15d30a26ede1dfa77bed03d3 check_postgres.pl +SHA1 e1f58e9bd8db22ff11990f067bdea16c9df5aee9 check_postgres.pl.asc +SHA1 75423b0b62cf3a670a9d7818d5da7561c41ff7fa check_postgres.pl.html SHA1 c3d239c75a507a0b4d5a245ea82fb2e7fe2869cd t/00_basic.t SHA1 a29dcbcc2e34d409ad30e8f87b9c4c09db877c4e t/00_signature.t SHA1 b3b833488dca6a766aa185c2457d361a978103cb t/00_test_tester.t @@ -53,10 +53,10 @@ SHA1 2706f51b92149330f123e174ad009ada0124a538 t/02_query_runtime.t SHA1 957728641da08e8b3b74653f96bcd55447afdd43 t/02_query_time.t SHA1 fc900d41c371685d074c7603430e9672dc0b20ef t/02_relation_size.t SHA1 7f9e6725cba6c1418beb0847e49ab8eb9c409f60 t/02_replicate_row.t -SHA1 c28d1dc9805201263409c393e6e0930424837791 t/02_same_schema.t +SHA1 c90abbd7205b1f6f2edf2568cc4c10be71c7d098 t/02_same_schema.t SHA1 921e5627011cfaa923ee9df26e8bb90c16cb1dd0 t/02_sequence.t SHA1 f498f14c7b05792e18b99ef7d6c91592682d29b6 t/02_settings_checksum.t -SHA1 a014c09fac27a23ddc81cda78e9b67defe0d3fd3 t/02_slony_status.t +SHA1 9bb445de1c0e3fe5b54ac06ba9f5fc19f5bceb9e t/02_slony_status.t SHA1 4c14da6c23eb14e450bd7b0af722fdc0cb97aae7 t/02_timesync.t SHA1 da12da419f0adb356687ec1465ff7e32f2364c12 t/02_txn_idle.t SHA1 af3eb039379b29b9a88749f478299265a87fd084 t/02_txn_time.t @@ -69,7 +69,7 @@ SHA1 96e6e5da3e1f6753a469e7afc8cf070024b33b23 t/99_cleanup.t SHA1 058e1b59e21c039b6c79f0be3e1a6c2dbcbd5add t/CP_Testing.pm -----BEGIN PGP SIGNATURE----- -iEYEAREDAAYFAkt9uGAACgkQvJuQZxSWSsh4DACfd1KJKHDh0x9W2i//nqDM3utY -qYwAoOnA+rOI3aaoLGDF0fxtoK4i99O0 -=lFFB +iEYEAREDAAYFAkuMKpEACgkQvJuQZxSWSsh9HACgloURNEjP9UQ1AfWAxlyir7q4 +PhsAoJ8fhiYUgcFlhEQZ0kwG7HnRolUJ +=RP4H -----END PGP SIGNATURE----- diff --git a/check_postgres.pl b/check_postgres.pl index d0635fb6e..728d50e3c 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -8094,7 +8094,7 @@ Items not specifically attributed are by Greg Sabino Mullane. =over 4 -=item B +=item B (March 2, 2010) Allow slony_status action to handle more than one slave. diff --git a/check_postgres.pl.asc b/check_postgres.pl.asc index 83d641f31..4e059f0af 100644 --- a/check_postgres.pl.asc +++ b/check_postgres.pl.asc @@ -1,6 +1,6 @@ -----BEGIN PGP SIGNATURE----- -iEYEABEDAAYFAkt9uFkACgkQvJuQZxSWSsi9xwCgi8RMixproWXizhkyw+HC/YE3 -YTwAnRjS9lcF71yq3DYeQ+MsQFLLcaKN -=L+tl +iEYEABEDAAYFAkuMKo0ACgkQvJuQZxSWSsg97QCcCP2ZHC5rN+ttvsVqccpb9Zhg +LhEAn35B19AlHH5TV5PNoYGEct9M2w43 +=StCv -----END PGP SIGNATURE----- diff --git a/check_postgres.pl.html b/check_postgres.pl.html index 602c9d24a..37f435a89 100644 --- a/check_postgres.pl.html +++ b/check_postgres.pl.html @@ -105,7 +105,7 @@

NAME

check_postgres.pl - a Postgres monitoring script for Nagios, MRTG, Cacti, and others

-

This documents describes check_postgres.pl version 2.14.2

+

This documents describes check_postgres.pl version 2.14.3


@@ -1461,6 +1461,12 @@ feature requests, and commit notices, send email to HISTORY

Items not specifically attributed are by Greg Sabino Mullane.

+
Version 2.14.3 (March 2, 2010)
+ +
+
+  Allow slony_status action to handle more than one slave.
+
Version 2.14.2 (February 18, 2010)
@@ -1576,7 +1582,7 @@ feature requests, and commit notices, send email to Version 2.9.3 (July 14, 2009) +
Version 2.9.3 (July 14, 2009)
-- 
cgit v1.2.3


From 1b58bb584d25601600738b2e0d3db420008c796b Mon Sep 17 00:00:00 2001
From: Greg Sabino Mullane
Date: Tue, 2 Mar 2010 08:04:09 -0500
Subject: Use current_database() inside the slony_status action (Guillaume
 Lelarge)

---
 check_postgres.pl | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

(limited to 'check_postgres.pl')

diff --git a/check_postgres.pl b/check_postgres.pl
index 728d50e3c..f28d02c4a 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -29,7 +29,7 @@ $Data::Dumper::Varname = 'POSTGRES';
 $Data::Dumper::Indent = 2;
 $Data::Dumper::Useqq = 1;
 
-our $VERSION = '2.14.3';
+our $VERSION = '2.14.4';
 
 use vars qw/ %opt $PSQL $res $COM $SQL $db /;
 
@@ -6499,9 +6499,13 @@ sub check_slony_status {
 	}
 
 	my $SQL =
-qq{SELECT ROUND(EXTRACT(epoch FROM st_lag_time)),
-st_origin, st_received,
-COALESCE(n1.no_comment, ''), COALESCE(n2.no_comment, '')
+qq{SELECT
+ ROUND(EXTRACT(epoch FROM st_lag_time)),
+ st_origin,
+ st_received,
+ current_database(),
+ COALESCE(n1.no_comment, ''),
+ COALESCE(n2.no_comment, '')
 FROM $schema.sl_status
 JOIN $schema.sl_node n1 ON (n1.no_id=st_origin)
 JOIN $schema.sl_node n2 ON (n2.no_id=st_received)};
@@ -6515,15 +6519,15 @@ JOIN $schema.sl_node n2 ON (n2.no_id=st_received)};
 	my $maxlagtime = 0;
 	my @perf;
 	for my $row (split /\n/ => $db->{slurp}) {
-		if ($row !~ /(\d+)\s+\|\s+(\d+)\s+\|\s+(\d+) \| (.*?)\s*\| (.*)/) {
+		if ($row !~ /(\d+) \| +(\d+) \| +(\d+) \| (.*?) +\| (.*?) +\| (.+)/) {
 			add_unknown msg('slony-noparse');
 		}
-		my ($lag,$from,$to,$fromc,$toc) = ($1,$2,$3,$4,$5);
+		my ($lag,$from,$to,$dbname,$fromc,$toc) = ($1,$2,$3,$4,$5,$6);
 		$maxlagtime = $lag if $lag > $maxlagtime;
 		push @perf => [
 			       $lag,
 			       $from,
-			       qq{'$db->{dbname} Node $from($fromc) -> Node $to($toc)'=$lag;$warning;$critical},
+			       qq{'$dbname Node $from($fromc) -> Node $to($toc)'=$lag;$warning;$critical},
 			       ];
 	}
 	$db->{perf} = join "\n" => map { $_->[2] } sort { $b->[0]<=>$a->[0] or $a->[1]<=>$b->[1] } @perf;
@@ -6607,7 +6611,7 @@ sub show_dbstats {
 
 B - a Postgres monitoring script for Nagios, MRTG, Cacti, and others
 
-This documents describes check_postgres.pl version 2.14.3
+This documents describes check_postgres.pl version 2.14.4
 
 =head1 SYNOPSIS
 
@@ -8094,9 +8098,14 @@ Items not specifically attributed are by Greg Sabino Mullane.
 
 =over 4
 
-=item B (March 2, 2010)
+=item B (March 1, 2010)
 
   Allow slony_status action to handle more than one slave.
+  Use commas to separate function args in same_schema output (Robert Treat)
 
 =item B (February 18, 2010)
 
-- 
cgit v1.2.3


From ed840c2e2b265c877ce7f315e00a0f55ec97abb7 Mon Sep 17 00:00:00 2001
From: Greg Sabino Mullane
Date: Tue, 2 Mar 2010 08:05:56 -0500
Subject: Version bump

---
 META.yml               |  4 ++--
 Makefile.PL            |  2 +-
 check_postgres.pl      |  2 +-
 check_postgres.pl.html | 13 ++++++++++---
 4 files changed, 14 insertions(+), 7 deletions(-)

(limited to 'check_postgres.pl')

diff --git a/META.yml b/META.yml
index a582fce22..212168bc9 100644
--- a/META.yml
+++ b/META.yml
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name                        : check_postgres.pl
-version                     : 2.14.3
+version                     : 2.14.4
 abstract                    : Postgres monitoring script
 author:              
   - Greg Sabino Mullane 
@@ -30,7 +30,7 @@ recommends:
 provides:
   check_postgres:
     file                    : check_postgres.pl
-    version                 : 2.14.3
+    version                 : 2.14.4
 
 keywords:
   - Postgres
diff --git a/Makefile.PL b/Makefile.PL
index 032786a5f..8b7cf5415 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use 5.006001;
 
-my $VERSION = '2.14.3';
+my $VERSION = '2.14.4';
 
 if ($VERSION =~ /_/) {
 	print "WARNING! This is a test version ($VERSION) and should not be used in production!\n";
diff --git a/check_postgres.pl b/check_postgres.pl
index f28d02c4a..06ef9c3ef 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -8098,7 +8098,7 @@ Items not specifically attributed are by Greg Sabino Mullane.
 
 =over 4
 
-=item B
 
   Fix to show database properly when using slony_status (Guillaume Lelarge)
 
diff --git a/check_postgres.pl.html b/check_postgres.pl.html
index 37f435a89..b3a4eaada 100644
--- a/check_postgres.pl.html
+++ b/check_postgres.pl.html
@@ -105,7 +105,7 @@
 

NAME

check_postgres.pl - a Postgres monitoring script for Nagios, MRTG, Cacti, and others

-

This documents describes check_postgres.pl version 2.14.3

+

This documents describes check_postgres.pl version 2.14.4


@@ -1461,11 +1461,18 @@ feature requests, and commit notices, send email to HISTORY

Items not specifically attributed are by Greg Sabino Mullane.

-
Version 2.14.3 (March 2, 2010)
+
Version 2.14.4
-  Allow slony_status action to handle more than one slave.
+ Fix to show database properly when using slony_status (Guillaume Lelarge)
+
+
Version 2.14.3 (March 1, 2010)
+ +
+
+  Allow slony_status action to handle more than one slave.
+  Use commas to separate function args in same_schema output (Robert Treat)
Version 2.14.2 (February 18, 2010)
-- cgit v1.2.3 From 93add958ae6df5063c913812c026226c7b8d239e Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Tue, 2 Mar 2010 11:00:16 -0500 Subject: Expand on idea from Giles Westwood and show many details for query time, including PID, user, port, and address. Clean up the query_time subroutine greatly. --- check_postgres.pl | 131 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 87 insertions(+), 44 deletions(-) (limited to 'check_postgres.pl') diff --git a/check_postgres.pl b/check_postgres.pl index 06ef9c3ef..bee39e68c 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -29,7 +29,7 @@ $Data::Dumper::Varname = 'POSTGRES'; $Data::Dumper::Indent = 2; $Data::Dumper::Useqq = 1; -our $VERSION = '2.14.4'; +our $VERSION = '2.15.0'; use vars qw/ %opt $PSQL $res $COM $SQL $db /; @@ -85,6 +85,7 @@ our @get_methods = ( ## no critic (RequireInterpolationOfMetachars) our %msg = ( 'en' => { + 'address' => q{address}, 'backends-fatal' => q{Could not connect: too many connections}, 'backends-mrtg' => q{DB=$1 Max connections=$2}, 'backends-msg' => q{$1 of $2 connections ($3%)}, @@ -114,6 +115,7 @@ our %msg = ( 'custom-invalid' => q{Invalid format returned by custom query}, 'custom-norows' => q{No rows returned}, 'custom-nostring' => q{Must provide a query string}, + 'database' => q{database}, 'dbsize-version' => q{Target database must be version 8.1 or higher to run the database_size action}, 'die-action-version' => q{Cannot run "$1": server version must be >= $2, but is $3}, 'die-badtime' => q{Value for '$1' must be a valid time. Examples: -$2 1s -$2 "10 minutes"}, @@ -175,9 +177,12 @@ our %msg = ( 'opt-psql-nofind' => q{Could not find a suitable psql executable}, 'opt-psql-nover' => q{Could not determine psql version}, 'opt-psql-restrict' => q{Cannot use the --PSQL option when NO_PSQL_OPTION is on}, + 'PID' => q{PID}, + 'port' => q{port}, 'preptxn-none' => q{No prepared transactions found}, 'qtime-fail' => q{Cannot run the txn_idle action unless stats_command_string is set to 'on'!}, 'qtime-msg' => q{longest query: $1s}, + 'qtime-nomatch' => q{No matching entries were found}, 'range-badcs' => q{Invalid '$1' option: must be a checksum}, 'range-badlock' => q{Invalid '$1' option: must be number of locks, or "type1=#;type2=#"}, 'range-badpercent' => q{Invalid '$1' option: must be a percentage}, @@ -278,6 +283,7 @@ our %msg = ( 'txnwrap-wbig' => q{The 'warning' value must be less than 2 billion}, 'unknown-error' => q{Unknown error}, 'usage' => qq{\nUsage: \$1 \n Try "\$1 --help" for a complete list of options\n\n}, + 'username' => q{username}, 'vac-msg' => q{DB: $1 TABLE: $2}, 'vac-nomatch-a' => q{No matching tables have ever been analyzed}, 'vac-nomatch-v' => q{No matching tables have ever been vacuumed}, @@ -951,7 +957,8 @@ sub msg { ## no critic $msg = $msg{'en'}{$name}; } else { - return "Invalid message: $name"; + my $line = (caller)[2]; + die qq{Invalid message "$name" from line $line\n}; } my $x=1; @@ -1007,6 +1014,7 @@ $VERBOSE >= 2 and warn qq{psql=$PSQL version=$psql_version\n}; $opt{defaultdb} = $psql_version >= 8.0 ? 'postgres' : 'template1'; sub add_response { + my ($type,$msg) = @_; $db->{host} ||= ''; @@ -1038,7 +1046,10 @@ sub add_response { $perf .= " $db->{perf}"; } push @{$type->{$header}} => [$msg,$perf]; -} + + return; + +} ## end of add_response sub add_unknown { @@ -3897,54 +3908,85 @@ sub check_query_time { } } - $SQL = q{SELECT datname, max(COALESCE(ROUND(EXTRACT(epoch FROM now()-query_start)),0)) }. - qq{FROM pg_stat_activity WHERE current_query <> ''$USERWHERECLAUSE GROUP BY 1}; + $SQL = qq{ +SELECT + client_addr, + client_port, + procpid, + COALESCE(ROUND(EXTRACT(epoch FROM now()-query_start)),0), + datname, + usename +FROM pg_stat_activity +WHERE current_query <> ''$USERWHERECLAUSE +}; - $info = run_command($SQL, { regex => qr{\s*.+?\s+\|\s+\-?\d+}, emptyok => 1 } ); + $info = run_command($SQL, { regex => qr{\d+ \|\s+\d+}, emptyok => 1 } ); - my $found = 0; - for $db (@{$info->{db}}) { + $db = $info->{db}[0]; + my $slurp = $db->{slurp}; - if ($db->{slurp} !~ /\w/ and $USERWHERECLAUSE) { - $stats{$db->{dbname}} = 0; - add_ok msg('no-match-user'); - next; - } + ## We may have gotten no matches die to exclusion rules + if ($slurp !~ /\w/ and $USERWHERECLAUSE) { + $stats{$db->{dbname}} = 0; + add_ok msg('no-match-user'); + return; + } - $found = 1; - my $max = 0; - my $maxdb = '?'; - SLURP: while ($db->{slurp} =~ /\s*(.+?)\s+\|\s+(\-?\d+)\s*/gsm) { - my ($dbname,$current) = ($1, int $2); - next SLURP if skip_item($dbname); - if ($current > $max) { - $max = $current; - $maxdb = $dbname; - } - } - if ($MRTG) { - $stats{$db->{dbname}} = $max; - next; - } - $db->{perf} .= "maxtime=$max;"; - $db->{perf} .= "$warning" if length $warning; - $db->{perf} .= ';'; - $db->{perf} .= "$critical" if length $critical; + ## Default values for information gathered + my ($client_addr, $client_port, $procpid, $username, $maxtime, $maxdb) = ('0.0.0.0', 0, '?', 0, 0, '?'); - my $msg = msg('qtime-msg', $max); - $msg .= " db=$maxdb"; + ## Read in and parse the psql output + SLURP: while ($slurp =~ /\s*(\S*) \|\s+(\-?\d+) \|\s+(\d+) \|\s+(\-?\d+) \| (.+?)\s+\| (.+?)\s/gsm) { + my ($add,$port,$pid,$time,$dbname,$user) = ($1,$2,$3,int $4,$5,$6); + next SLURP if skip_item($dbname); - if (length $critical and $max >= $critical) { - add_critical $msg; - } - elsif (length $warning and $max >= $warning) { - add_warning $msg; - } - else { - add_ok $msg; + if ($time >= $maxtime) { + $maxtime = $time; + $maxdb = $dbname; + $client_addr = $add; + $client_port = $port; + $procpid = $pid; + $username = $user; } } + ## Use of skip_item means we may have no matches + if ($maxdb eq '?') { + add_unknown msg('qtime-nomatch'); + return; + } + + ## Details on who the offender was + my $whodunit = sprintf q{%s:%s %s:%s%s%s %s:%s}, + msg('database'), + $maxdb, + msg('PID'), + $procpid, + $client_port < 1 ? '' : (sprintf ' %s:%s', msg('port'), $client_port), + $client_addr eq '' ? '' : (sprintf ' %s:%s', msg('address'), $client_addr), + msg('username'), + $username; + + $MRTG and do_mrtg({one => $maxtime, msg => $whodunit}); + + $db->{perf} .= sprintf q{'%s'=%s;%d;%d}, + $whodunit, + $maxtime, + $warning, + $critical; + + my $msg = sprintf '%s (%s)', msg('qtime-msg', $maxtime), $whodunit; + + if (length $critical and $maxtime >= $critical) { + add_critical $msg; + } + elsif (length $warning and $maxtime >= $warning) { + add_warning $msg; + } + else { + add_ok $msg; + } + return; } ## end of check_query_time @@ -6611,7 +6653,7 @@ sub show_dbstats { B - a Postgres monitoring script for Nagios, MRTG, Cacti, and others -This documents describes check_postgres.pl version 2.14.4 +This documents describes check_postgres.pl version 2.15.0 =head1 SYNOPSIS @@ -8098,8 +8140,9 @@ Items not specifically attributed are by Greg Sabino Mullane. =over 4 -=item B +=item B + Change the output of query_time to show pid,user,port, and address (Giles Westwood) Fix to show database properly when using slony_status (Guillaume Lelarge) =item B (March 1, 2010) -- cgit v1.2.3 From 7f69dd9e1bd8020e1aa20a414f754423d1574beb Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Tue, 2 Mar 2010 11:03:12 -0500 Subject: Add in French translation templates for new items. --- check_postgres.pl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'check_postgres.pl') diff --git a/check_postgres.pl b/check_postgres.pl index bee39e68c..8033ba368 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -293,6 +293,7 @@ our %msg = ( 'version-ok' => q{version $1}, }, 'fr' => { +'address' => q{address}, 'backends-fatal' => q{N'a pas pu se connecter : trop de connexions}, 'backends-mrtg' => q{DB=$1 Connexions maximum=$2}, 'backends-msg' => q{$1 connexions sur $2 ($3%)}, @@ -322,6 +323,7 @@ our %msg = ( 'custom-invalid' => q{Format invalide renvoyé par la requête personnalisée}, 'custom-norows' => q{Aucune ligne renvoyée}, 'custom-nostring' => q{Vous devez fournir une requête}, +'database' => q{database}, 'dbsize-version' => q{La base de données cible doit être une version 8.1 ou ultérieure pour exécuter l'action database_size}, 'die-action-version' => q{Ne peut pas exécuter « $1 » : la version du serveur doit être supérieure ou égale à $2, alors qu'elle est $3}, 'die-badtime' => q{La valeur de « $1 » doit être une heure valide. Par exemple, -$2 1s -$2 « 10 minutes »}, @@ -383,9 +385,12 @@ our %msg = ( 'opt-psql-nofind' => q{N'a pas pu trouver un psql exécutable}, 'opt-psql-nover' => q{N'a pas pu déterminer la version de psql}, 'opt-psql-restrict' => q{Ne peut pas utiliser l'option --PSQL si NO_PSQL_OPTION est activé}, +'PID' => q{PID}, +'port' => q{port}, 'preptxn-none' => q{Aucune transaction préparée trouvée}, 'qtime-fail' => q{Ne peut pas exécuter l'action txn_idle si stats_command_string est désactivé !}, 'qtime-msg' => q{requête la plus longue : $1s}, +'qtime-nomatch' => q{No matching entries were found}, 'range-badcs' => q{Option « $1 » invalide : doit être une somme de contrôle}, 'range-badlock' => q{Option « $1 » invalide : doit être un nombre de verrou ou « type1=#;type2=# »}, 'range-badpercent' => q{Option « $1 » invalide : doit être un pourcentage}, @@ -486,6 +491,7 @@ our %msg = ( 'txnwrap-wbig' => q{La valeur d'avertissement doit être inférieure à 2 milliards}, 'unknown-error' => q{erreur inconnue}, 'usage' => qq{\nUsage: \$1 \n Essayez « \$1 --help » pour liste complète des options\n\n}, +'username' => q{username}, 'vac-msg' => q{Base de données : $1 Table : $2}, 'vac-nomatch-a' => q{Aucune des tables correspondantes n'a eu d'opération ANALYZE}, 'vac-nomatch-v' => q{Aucune des tables correspondantes n'a eu d'opération VACUUM}, -- cgit v1.2.3 From efd7b16dab7fc2aaa6c48caa223d09d6429aae0d Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Tue, 2 Mar 2010 11:04:10 -0500 Subject: warning and critical may be empty, so use %s not %d --- check_postgres.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'check_postgres.pl') diff --git a/check_postgres.pl b/check_postgres.pl index 8033ba368..2729ce6a7 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -3975,7 +3975,7 @@ WHERE current_query <> ''$USERWHERECLAUSE $MRTG and do_mrtg({one => $maxtime, msg => $whodunit}); - $db->{perf} .= sprintf q{'%s'=%s;%d;%d}, + $db->{perf} .= sprintf q{'%s'=%s;%s;%s}, $whodunit, $maxtime, $warning, -- cgit v1.2.3 From 358a4233a9fdef37377dd429568e7435858cb6df Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Tue, 2 Mar 2010 11:08:52 -0500 Subject: Don't apply a LIMIT when using --exclude on the bloat action (Marti Raudsepp) --- check_postgres.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'check_postgres.pl') diff --git a/check_postgres.pl b/check_postgres.pl index 2729ce6a7..f8b9b5428 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -2675,7 +2675,7 @@ FROM ( ) AS sml }; - if (! defined $opt{include}) { + if (! defined $opt{include} and ! defined $opt{exclude}) { $SQL .= " WHERE sml.relpages - otta > $MINPAGES OR ipages - iotta > $MINIPAGES"; $SQL .= " ORDER BY wastedbytes DESC LIMIT $LIMIT"; } @@ -8148,6 +8148,7 @@ Items not specifically attributed are by Greg Sabino Mullane. =item B + Don't apply a LIMIT when using --exclude on the bloat action (Marti Raudsepp) Change the output of query_time to show pid,user,port, and address (Giles Westwood) Fix to show database properly when using slony_status (Guillaume Lelarge) -- cgit v1.2.3 From 7160f3ba2c28ede795157e713e940a0f690343b6 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Tue, 2 Mar 2010 11:23:08 -0500 Subject: Fix regex to work on WIN32 for check_fsm_relations and check_fsm_pages (Luke Koops) --- check_postgres.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'check_postgres.pl') diff --git a/check_postgres.pl b/check_postgres.pl index f8b9b5428..c2b498e06 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -3162,7 +3162,7 @@ sub check_fsm_pages { add_unknown msg('fsm-page-highver'); return; } - SLURP: while ($db->{slurp} =~ /\s*(\d*) \|\s+(\d+) \|\s+(\d*)$/gsm) { + SLURP: while ($db->{slurp} =~ /\s*(\d*) \|\s+(\d+) \|\s+(\d*)\s*/gsm) { my ($pages,$max,$percent) = ($1||0,$2,$3||0); if ($MRTG) { @@ -3222,7 +3222,7 @@ sub check_fsm_relations { add_unknown msg('fsm-rel-highver'); return; } - SLURP: while ($db->{slurp} =~ /\s*(\d+) \|\s+(\d+) \|\s+(\d+)$/gsm) { + SLURP: while ($db->{slurp} =~ /\s*(\d+) \|\s+(\d+) \|\s+(\d+)\s*/gsm) { my ($max,$cur,$percent) = ($1,$2,$3); if ($MRTG) { @@ -8148,6 +8148,7 @@ Items not specifically attributed are by Greg Sabino Mullane. =item B + Fix regex to work on WIN32 for check_fsm_relations and check_fsm_pages (Luke Koops) Don't apply a LIMIT when using --exclude on the bloat action (Marti Raudsepp) Change the output of query_time to show pid,user,port, and address (Giles Westwood) Fix to show database properly when using slony_status (Guillaume Lelarge) -- cgit v1.2.3 From c3fb03a7f76b02ef15c513b0560d1c006f74e407 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Tue, 2 Mar 2010 17:04:24 -0500 Subject: Minor testing-based fixes. --- .perlcriticrc | 2 +- MANIFEST | 1 + check_postgres.pl | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- t/99_spellcheck.t | 2 ++ 4 files changed, 104 insertions(+), 3 deletions(-) (limited to 'check_postgres.pl') diff --git a/.perlcriticrc b/.perlcriticrc index ecf85acda..47487d9ab 100644 --- a/.perlcriticrc +++ b/.perlcriticrc @@ -5,7 +5,7 @@ severity = 1 profile-strictness = quiet [Documentation::PodSpelling] -stop_words = Mullane Nagios Slony Slony's nols salesrep psql dbname postgres USERNAME usernames dbuser pgpass nagios stderr showperf symlinked timesync criticals quirm lancre exabytes sami includeuser excludeuser flagg tardis WAL tablespaces tablespace perflimit burrick mallory grimm oskar ExclusiveLock garrett artemus queryname speedtest checksum checksums morpork klatch pluto faceoff slon greg watson franklin wilkins scott Sabino Seklecki dbpass autovacuum Astill refactoring NAGIOS localhost cronjob symlink symlinks backends snazzo logfile syslog parens plugin Cwd Ioannis Tambouras schemas SQL MRTG mrtg uptime datallowconn dbhost dbport ok contrib pageslots robert dylan emma fsm minvalue nextval dbstats del ret upd Bucardo noidle bucardo petabytes zettabytes tuples noobjectnames noposition nofuncbody slony noperms nolanguage battlestar +stop_words = Mullane Nagios Slony Slony's nols salesrep psql dbname postgres USERNAME usernames dbuser pgpass nagios stderr showperf symlinked timesync criticals quirm lancre exabytes sami includeuser excludeuser flagg tardis WAL tablespaces tablespace perflimit burrick mallory grimm oskar ExclusiveLock garrett artemus queryname speedtest checksum checksums morpork klatch pluto faceoff slon greg watson franklin wilkins scott Sabino Seklecki dbpass autovacuum Astill refactoring NAGIOS localhost cronjob symlink symlinks backends snazzo logfile syslog parens plugin Cwd Ioannis Tambouras schemas SQL MRTG mrtg uptime datallowconn dbhost dbport ok contrib pageslots robert dylan emma fsm minvalue nextval dbstats del ret upd Bucardo noidle bucardo petabytes zettabytes tuples noobjectnames noposition nofuncbody slony noperms nolanguage battlestar pgbouncer pgBouncer [-Bangs::ProhibitFlagComments] [-Bangs::ProhibitNumberedNames] diff --git a/MANIFEST b/MANIFEST index aaef095b6..62e249660 100644 --- a/MANIFEST +++ b/MANIFEST @@ -34,6 +34,7 @@ t/02_logfile.t t/02_new_version_bc.t t/02_new_version_cp.t t/02_new_version_pg.t +t/02_pgbouncer_checksum.t t/02_prepared_txns.t t/02_query_runtime.t t/02_query_time.t diff --git a/check_postgres.pl b/check_postgres.pl index c2b498e06..0b1afccea 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -845,6 +845,7 @@ our $action_info = { new_version_bc => [0, 'Checks if a newer version of Bucardo is available.'], new_version_cp => [0, 'Checks if a newer version of check_postgres.pl is available.'], new_version_pg => [0, 'Checks if a newer version of Postgres is available.'], + pgbouncer_checksum => [0, 'Check that no pgbouncer settings have changed since the last check.'], prepared_txns => [1, 'Checks number and age of prepared transactions.'], query_runtime => [0, 'Check how long a specific query takes to run.'], query_time => [1, 'Checks the maximum running time of current queries.'], @@ -1018,6 +1019,7 @@ $psql_revision =~ s/\D//g; $VERBOSE >= 2 and warn qq{psql=$PSQL version=$psql_version\n}; $opt{defaultdb} = $psql_version >= 8.0 ? 'postgres' : 'template1'; +$opt{defaultdb} = 'pgbouncer' if $action eq 'pgbouncer_checksum'; sub add_response { @@ -1462,6 +1464,9 @@ check_prepared_txns() if $action eq 'prepared_txns'; ## Make sure Slony is behaving check_slony_status() if $action eq 'slony_status'; +## Verify that the pgbouncer settings are what we think they should be +check_pgbouncer_checksum() if $action eq 'pgbouncer_checksum'; + ## ## Everything past here does not hit a Postgres database ## @@ -1833,7 +1838,9 @@ sub run_command { my $dbtimeout = $timeout * 1000; alarm 0; - $string = "BEGIN;SET statement_timeout=$dbtimeout;COMMIT;$string"; + if ($action ne 'pgbouncer_checksum') { + $string = "BEGIN;SET statement_timeout=$dbtimeout;COMMIT;$string"; + } push @args, '-c', $string; @@ -6560,7 +6567,7 @@ JOIN $schema.sl_node n2 ON (n2.no_id=st_received)}; my $info = run_command($SQL, {regex => qr[\d+] } ); $db = $info->{db}[0]; - if ($db->{slurp} !~ /^\s*(\d+)/) { + if ($db->{slurp} !~ /^\s*\d+/) { add_unknown msg('slony-nonumber'); return; } @@ -6653,6 +6660,71 @@ sub show_dbstats { } ## end of show_dbstats +sub check_pgbouncer_checksum { + + ## Verify the checksum of all pgbouncer settings + ## Supports: Nagios, MRTG + ## Not that the connection will be done on the pgbouncer database + ## One of warning or critical must be given (but not both) + ## It should run one time to find out the expected checksum + ## You can use --critical="0" to find out the checksum + ## You can include or exclude settings as well + ## Example: + ## check_postgres_pgbouncer_checksum --critical="4e7ba68eb88915d3d1a36b2009da4acd" + + my ($warning, $critical) = validate_range({type => 'checksum', onlyone => 1}); + + eval { + require Digest::MD5; + }; + if ($@) { + ndie msg('checksum-nomd'); + } + + $SQL = 'SHOW CONFIG'; + my $info = run_command($SQL, { regex => qr[log_pooler_errors] }); + + for $db (@{$info->{db}}) { + + (my $string = $db->{slurp}) =~ s/\s+$/\n/; + + my $newstring = ''; + SLURP: for my $line (split /\n/ => $string) { + $line =~ /^\s*(\w+)/ or ndie msg('unknown-error'); + my $name = $1; + next SLURP if skip_item($name); + $newstring .= "$line\n"; + } + if (! length $newstring) { + add_unknown msg('no-match-set'); + } + + my $checksum = Digest::MD5::md5_hex($newstring); + + my $msg = msg('checksum-msg', $checksum); + if ($MRTG) { + $opt{mrtg} or ndie msg('checksum-nomrtg'); + do_mrtg({one => $opt{mrtg} eq $checksum ? 1 : 0, msg => $checksum}); + } + if ($critical and $critical ne $checksum) { + add_critical $msg; + } + elsif ($warning and $warning ne $checksum) { + add_warning $msg; + } + elsif (!$critical and !$warning) { + add_unknown $msg; + } + else { + add_ok $msg; + } + } + + return; + +} ## end of check_pgbouncer_checksum + + =pod =head1 NAME @@ -7555,6 +7627,31 @@ available, a critical is returned. (Bucardo is a master to slave, and master to replication system for Postgres: see http://bucardo.org for more information). See also the information on the C<--get_method> option. +=head2 B + +(C) Checks that all the +pgBouncer settings are the same as last time you checked. +This is done by generating a checksum of a sorted list of setting names and +their values. Note that you shouldn't specify the database name, it will +automatically default to pgbouncer. Either the I<--warning> or the I<--critical> option +should be given, but not both. The value of each one is the checksum, a +32-character hexadecimal value. You can run with the special C<--critical=0> option +to find out an existing checksum. + +This action requires the Digest::MD5 module. + +Example 1: Find the initial checksum for pgbouncer configuration on port 6432 using the default user (usually postgres) + + check_postgres_pgbouncer_checksum --port=6432 --critical=0 + +Example 2: Make sure no settings have changed and warn if so, using the checksum from above. + + check_postgres_pgbouncer_checksum --port=6432 --warning=cd2f3b5e129dc2b4f5c0f6d8d2e64231 + +For MRTG output, returns a 1 or 0 indicating success of failure of the checksum to match. A +checksum must be provided as the C<--mrtg> argument. The fourth line always gives the +current checksum. + =head2 B (C) Check on the age of any existing prepared transactions. @@ -8148,6 +8245,7 @@ Items not specifically attributed are by Greg Sabino Mullane. =item B + Add the "pgbouncer_checksum" action (Guillaume Lelarge) Fix regex to work on WIN32 for check_fsm_relations and check_fsm_pages (Luke Koops) Don't apply a LIMIT when using --exclude on the bloat action (Marti Raudsepp) Change the output of query_time to show pid,user,port, and address (Giles Westwood) diff --git a/t/99_spellcheck.t b/t/99_spellcheck.t index 73028f086..22d996793 100644 --- a/t/99_spellcheck.t +++ b/t/99_spellcheck.t @@ -130,6 +130,8 @@ http logfile login perl +pgbouncer +pgBouncer postgres runtime Schemas -- cgit v1.2.3 From 066744dc0c63415b77030cfd2095a29e9999d669 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 3 Mar 2010 11:34:35 -0500 Subject: French translations from Guillaume Lelarge --- check_postgres.pl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'check_postgres.pl') diff --git a/check_postgres.pl b/check_postgres.pl index 0b1afccea..06a3de824 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -293,7 +293,7 @@ our %msg = ( 'version-ok' => q{version $1}, }, 'fr' => { -'address' => q{address}, + 'address' => q{adresse}, 'backends-fatal' => q{N'a pas pu se connecter : trop de connexions}, 'backends-mrtg' => q{DB=$1 Connexions maximum=$2}, 'backends-msg' => q{$1 connexions sur $2 ($3%)}, @@ -323,7 +323,7 @@ our %msg = ( 'custom-invalid' => q{Format invalide renvoyé par la requête personnalisée}, 'custom-norows' => q{Aucune ligne renvoyée}, 'custom-nostring' => q{Vous devez fournir une requête}, -'database' => q{database}, + 'database' => q{base de données}, 'dbsize-version' => q{La base de données cible doit être une version 8.1 ou ultérieure pour exécuter l'action database_size}, 'die-action-version' => q{Ne peut pas exécuter « $1 » : la version du serveur doit être supérieure ou égale à $2, alors qu'elle est $3}, 'die-badtime' => q{La valeur de « $1 » doit être une heure valide. Par exemple, -$2 1s -$2 « 10 minutes »}, @@ -385,12 +385,12 @@ our %msg = ( 'opt-psql-nofind' => q{N'a pas pu trouver un psql exécutable}, 'opt-psql-nover' => q{N'a pas pu déterminer la version de psql}, 'opt-psql-restrict' => q{Ne peut pas utiliser l'option --PSQL si NO_PSQL_OPTION est activé}, -'PID' => q{PID}, -'port' => q{port}, + 'PID' => q{PID}, + 'port' => q{port}, 'preptxn-none' => q{Aucune transaction préparée trouvée}, 'qtime-fail' => q{Ne peut pas exécuter l'action txn_idle si stats_command_string est désactivé !}, 'qtime-msg' => q{requête la plus longue : $1s}, -'qtime-nomatch' => q{No matching entries were found}, + 'qtime-nomatch' => q{Aucune entrée correspondante n'a été trouvée}, 'range-badcs' => q{Option « $1 » invalide : doit être une somme de contrôle}, 'range-badlock' => q{Option « $1 » invalide : doit être un nombre de verrou ou « type1=#;type2=# »}, 'range-badpercent' => q{Option « $1 » invalide : doit être un pourcentage}, @@ -446,7 +446,7 @@ our %msg = ( 'same-matched' => q{Les bases de données ont les mêmes éléments}, 'slony-noschema' => q{N'a pas pu déterminer le schéma de Slony}, 'slony-nonumber' => q{L'appel à sl_status n'a pas renvoyé un numéro}, -'slony-noparse' => q{Could not parse call to sl_status}, + 'slony-noparse' => q{N'a pas pu analyser l'appel à sl_status}, 'slony-lagtime' => q{Durée de lag de Slony : $1}, 'seq-die' => q{N'a pas pu récupérer d'informations sur la séquence $1}, 'seq-msg' => q{$1=$2% (appels restant=$3)}, @@ -491,7 +491,7 @@ our %msg = ( 'txnwrap-wbig' => q{La valeur d'avertissement doit être inférieure à 2 milliards}, 'unknown-error' => q{erreur inconnue}, 'usage' => qq{\nUsage: \$1 \n Essayez « \$1 --help » pour liste complète des options\n\n}, -'username' => q{username}, + 'username' => q{nom utilisateur}, 'vac-msg' => q{Base de données : $1 Table : $2}, 'vac-nomatch-a' => q{Aucune des tables correspondantes n'a eu d'opération ANALYZE}, 'vac-nomatch-v' => q{Aucune des tables correspondantes n'a eu d'opération VACUUM}, -- cgit v1.2.3