forked from bucardo/check_postgres
-
Notifications
You must be signed in to change notification settings - Fork 0
/
check_postgres.pl
executable file
·10929 lines (8770 loc) · 402 KB
/
check_postgres.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env perl
# -*-mode:cperl; indent-tabs-mode: nil-*-
## Perform many different checks against Postgres databases.
## Designed primarily as a Nagios script.
## Run with --help for a summary.
##
## Greg Sabino Mullane <[email protected]>
## End Point Corporation http://www.endpoint.com/
## BSD licensed, see complete license at bottom of this script
## The latest version can be found at:
## http://www.bucardo.org/check_postgres/
##
## See the HISTORY section for other contributors
package check_postgres;
use 5.006001;
use strict;
use warnings;
use utf8;
use Getopt::Long qw/GetOptions/;
Getopt::Long::Configure(qw/ no_ignore_case pass_through /);
use File::Basename qw/basename/;
use File::Spec;
use File::Temp qw/tempfile tempdir/;
File::Temp->safe_level( File::Temp::MEDIUM );
use Cwd;
use Data::Dumper qw/Dumper/;
$Data::Dumper::Varname = 'POSTGRES';
$Data::Dumper::Indent = 2;
$Data::Dumper::Useqq = 1;
binmode STDOUT, ':encoding(UTF-8)';
our $VERSION = '2.22.1';
use vars qw/ %opt $PGBINDIR $PSQL $res $COM $SQL $db /;
## Which user to connect as if --dbuser is not given
$opt{defaultuser} = 'postgres';
## Which port to connect to if --dbport is not given
$opt{defaultport} = 5432;
## What type of output to use by default
our $DEFAULT_OUTPUT = 'nagios';
## If psql binaries are not in your path, it is recommended to hardcode it here,
## as an alternative to the --PGBINDIR option
$PGBINDIR = '';
## If this is true, $opt{PSQL} and $opt{PGBINDIR} are disabled for security reasons
our $NO_PSQL_OPTION = 1;
## If true, we show how long each query took by default. Requires Time::HiRes to be installed.
$opt{showtime} = 1;
## If true, we show "after the pipe" statistics
$opt{showperf} = 1;
## Default time display format, used for last_vacuum and last_analyze
our $SHOWTIME = 'HH24:MI FMMonth DD, YYYY';
## Always prepend 'postgres_' to the name of the service in the output string
our $FANCYNAME = 1;
## Change the service name to uppercase
our $YELLNAME = 1;
## Preferred order of ways to fetch pages for new_version checks
our $get_method_timeout = 30;
our @get_methods = (
"GET -t $get_method_timeout -H 'Pragma: no-cache'",
"wget --quiet --timeout=$get_method_timeout --no-cache -O -",
"curl --silent --max-time $get_method_timeout -H 'Pragma: no-cache'",
"fetch -q -T $get_method_timeout -o -",
"lynx --connect-timeout=$get_method_timeout --dump",
'links -dump',
);
## Nothing below this line should need to be changed for normal usage.
## If you do find yourself needing to change something,
## please email the author as it probably indicates something
## that could be made into a command-line option or moved above.
## Messages. Translations always welcome
## Items without a leading tab still need translating
## no critic (RequireInterpolationOfMetachars)
our %msg = (
'en' => {
'address' => q{address},
'age' => q{age},
'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%)},
'backends-nomax' => q{Could not determine max_connections},
'backends-oknone' => q{No connections},
'backends-po' => q{sorry, too many clients already},
'backends-users' => q{$1 for number of users must be a number or percentage},
'bloat-index' => q{(db $1) index $2 rows:$3 pages:$4 shouldbe:$5 ($6X) wasted bytes:$7 ($8)},
'bloat-nomin' => q{no relations meet the minimum bloat criteria},
'bloat-table' => q{(db $1) table $2.$3 rows:$4 pages:$5 shouldbe:$6 ($7X) wasted size:$8 ($9)},
'bug-report' => q{Please report these details to [email protected]:},
'checkcluster-id' => q{Database system identifier:},
'checkcluster-msg' => q{cluster_id: $1},
'checkcluster-nomrtg'=> q{Must provide a number via the --mrtg option},
'checkmode-prod' => q{in production},
'checkmode-recovery' => q{in archive recovery},
'checkmode-state' => q{Database cluster state:},
'checkpoint-baddir' => q{Invalid data_directory: "$1"},
'checkpoint-baddir2' => q{pg_controldata could not read the given data directory: "$1"},
'checkpoint-badver' => q{Failed to run pg_controldata - probably the wrong version ($1)},
'checkpoint-badver2' => q{Failed to run pg_controldata - is it the correct version?},
'checkpoint-nodir' => q{Must supply a --datadir argument or set the PGDATA environment variable},
'checkpoint-nodp' => q{Must install the Perl module Date::Parse to use the checkpoint action},
'checkpoint-noparse' => q{Unable to parse pg_controldata output: "$1"},
'checkpoint-noregex' => q{Unable to find the regex for this check},
'checkpoint-nosys' => q{Could not call pg_controldata: $1},
'checkpoint-ok' => q{Last checkpoint was 1 second ago},
'checkpoint-ok2' => q{Last checkpoint was $1 seconds ago},
'checkpoint-po' => q{Time of latest checkpoint:},
'checksum-msg' => q{checksum: $1},
'checksum-nomd' => q{Must install the Perl module Digest::MD5 to use the checksum action},
'checksum-nomrtg' => q{Must provide a checksum via the --mrtg option},
'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},
'depr-pgcontroldata' => q{PGCONTROLDATA is deprecated, use PGBINDIR instead.},
'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"},
'die-badversion' => q{Invalid version string: $1},
'die-noset' => q{Cannot run "$1" $2 is not set to on},
'die-nosetting' => q{Could not fetch setting '$1'},
'diskspace-fail' => q{Invalid result from command "$1": $2},
'diskspace-msg' => q{FS $1 mounted on $2 is using $3 of $4 ($5%)},
'diskspace-nodata' => q{Could not determine data_directory: are you connecting as a superuser?},
'diskspace-nodf' => q{Could not find required executable /bin/df},
'diskspace-nodir' => q{Could not find data directory "$1"},
'file-noclose' => q{Could not close $1: $2},
'files' => q{files},
'fsm-page-highver' => q{Cannot check fsm_pages on servers version 8.4 or greater},
'fsm-page-msg' => q{fsm page slots used: $1 of $2 ($3%)},
'fsm-rel-highver' => q{Cannot check fsm_relations on servers version 8.4 or greater},
'fsm-rel-msg' => q{fsm relations used: $1 of $2 ($3%)},
'hs-future-replica' => q{Slave reporting master server clock is ahead, check time sync},
'hs-no-role' => q{Not a master/slave couple},
'hs-no-location' => q{Could not get current xlog location on $1},
'hs-receive-delay' => q{receive-delay},
'hs-replay-delay' => q{replay_delay},
'hs-time-delay' => q{time_delay},
'hs-time-version' => q{Database must be version 9.1 or higher to check slave lag by time},
'index' => q{Index},
'invalid-option' => q{Invalid option},
'invalid-query' => q{Invalid query returned: $1},
'language' => q{Language},
'listener-msg' => q{listeners found: $1},
'listening' => q{listening},
'locks-msg' => q{total "$1" locks: $2},
'locks-msg2' => q{total locks: $1},
'logfile-bad' => q{Invalid logfile "$1"},
'logfile-debug' => q{Final logfile: $1},
'logfile-dne' => q{logfile $1 does not exist!},
'logfile-fail' => q{fails logging to: $1},
'logfile-ok' => q{logs to: $1},
'logfile-openfail' => q{logfile "$1" failed to open: $2},
'logfile-opt-bad' => q{Invalid logfile option},
'logfile-seekfail' => q{Seek on $1 failed: $2},
'logfile-stderr' => q{Logfile output has been redirected to stderr: please provide a filename},
'logfile-syslog' => q{Database is using syslog, please specify path with --logfile option (fac=$1)},
'mode-standby' => q{Server in standby mode},
'mode' => q{mode},
'mrtg-fail' => q{Action $1 failed: $2},
'new-ver-nocver' => q{Could not download version information for $1},
'new-ver-badver' => q{Could not parse version information for $1},
'new-ver-dev' => q{Cannot compare versions on development versions: you have $1 version $2},
'new-ver-nolver' => q{Could not determine local version information for $1},
'new-ver-ok' => q{Version $1 is the latest for $2},
'new-ver-warn' => q{Please upgrade to version $1 of $2. You are running $3},
'new-ver-tt' => q{Your version of $1 ($2) appears to be ahead of the current release! ($3)},
'no-db' => q{No databases},
'no-match-db' => q{No matching databases found due to exclusion/inclusion options},
'no-match-fs' => q{No matching file systems found due to exclusion/inclusion options},
'no-match-rel' => q{No matching relations found due to exclusion/inclusion options},
'no-match-set' => q{No matching settings found due to exclusion/inclusion options},
'no-match-table' => q{No matching tables found due to exclusion/inclusion options},
'no-match-user' => q{No matching entries found due to user exclusion/inclusion options},
'no-parse-psql' => q{Could not parse psql output!},
'no-time-hires' => q{Cannot find Time::HiRes, needed if 'showtime' is true},
'opt-output-invalid' => q{Invalid output: must be 'nagios' or 'mrtg' or 'simple' or 'cacti'},
'opt-psql-badpath' => q{Invalid psql argument: must be full path to a file named psql},
'opt-psql-noexec' => q{The file "$1" does not appear to be executable},
'opt-psql-noexist' => q{Cannot find given psql executable: $1},
'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 --PGBINDIR or --PSQL option when NO_PSQL_OPTION is on},
'pgagent-jobs-ok' => q{No failed jobs},
'pgbouncer-pool' => q{Pool=$1 $2=$3},
'pgb-backends-mrtg' => q{DB=$1 Max connections=$2},
'pgb-backends-msg' => q{$1 of $2 connections ($3%)},
'pgb-backends-none' => q{No connections},
'pgb-backends-users' => q{$1 for number of users must be a number or percentage},
'PID' => q{PID},
'port' => q{port},
'preptxn-none' => q{No prepared transactions found},
'psa-disabled' => q{No queries - is stats_command_string or track_activities off?},
'psa-noexact' => q{Unknown error},
'psa-nosuper' => q{No matches - please run as a superuser},
'qtime-count-msg' => q{Total queries: $1},
'qtime-count-none' => q{not more than $1 queries},
'qtime-for-msg' => q{$1 queries longer than $2s, longest: $3s$4 $5},
'qtime-msg' => q{longest query: $1s$2 $3},
'qtime-none' => q{no queries},
'query' => q{query},
'queries' => q{queries},
'query-time' => q{query_time},
'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},
'range-badpercsize' => q{Invalid '$1' option: must be a size or a percentage},
'range-badsize' => q{Invalid size for '$1' option},
'range-badtype' => q{validate_range called with unknown type '$1'},
'range-badversion' => q{Invalid string for '$1' option: $2},
'range-cactionly' => q{This action is for cacti use only and takes no warning or critical arguments},
'range-int' => q{Invalid argument for '$1' option: must be an integer},
'range-int-pos' => q{Invalid argument for '$1' option: must be a positive integer},
'range-neg-percent' => q{Cannot specify a negative percentage!},
'range-none' => q{No warning or critical options are needed},
'range-noopt-both' => q{Must provide both 'warning' and 'critical' options},
'range-noopt-one' => q{Must provide a 'warning' or 'critical' option},
'range-noopt-only' => q{Can only provide 'warning' OR 'critical' option},
'range-noopt-orboth' => q{Must provide a 'warning' option, a 'critical' option, or both},
'range-noopt-size' => q{Must provide a warning and/or critical size},
'range-nosize' => q{Must provide a warning and/or critical size},
'range-notime' => q{Must provide a warning and/or critical time},
'range-seconds' => q{Invalid argument to '$1' option: must be number of seconds},
'range-version' => q{must be in the format X.Y or X.Y.Z, where X is the major version number, },
'range-warnbig' => q{The 'warning' option cannot be greater than the 'critical' option},
'range-warnbigsize' => q{The 'warning' option ($1 bytes) cannot be larger than the 'critical' option ($2 bytes)},
'range-warnbigtime' => q{The 'warning' option ($1 s) cannot be larger than the 'critical' option ($2 s)},
'range-warnsmall' => q{The 'warning' option cannot be less than the 'critical' option},
'range-nointfortime' => q{Invalid argument for '$1' options: must be an integer, time or integer for time},
'relsize-msg-ind' => q{largest index is "$1": $2},
'relsize-msg-reli' => q{largest relation is index "$1": $2},
'relsize-msg-relt' => q{largest relation is table "$1": $2},
'relsize-msg-tab' => q{largest table is "$1": $2},
'rep-badarg' => q{Invalid repinfo argument: expected 6 comma-separated values},
'rep-duh' => q{Makes no sense to test replication with same values},
'rep-fail' => q{Row not replicated to slave $1},
'rep-noarg' => q{Need a repinfo argument},
'rep-norow' => q{Replication source row not found: $1},
'rep-noslaves' => q{No slaves found},
'rep-notsame' => q{Cannot test replication: values are not the same},
'rep-ok' => q{Row was replicated},
'rep-sourcefail' => q{Source update failed},
'rep-timeout' => q{Row was not replicated. Timeout: $1},
'rep-unknown' => q{Replication check failed},
'rep-wrongvals' => q{Cannot test replication: values are not the right ones ('$1' not '$2' nor '$3')},
'runcommand-err' => q{Unknown error inside of the "run_command" function},
'runcommand-nodb' => q{No target databases could be found},
'runcommand-nodupe' => q{Could not dupe STDERR},
'runcommand-noerr' => q{Could not open STDERR?!},
'runcommand-nosys' => q{System call failed with a $1},
'runcommand-pgpass' => q{Created temporary pgpass file $1},
'runcommand-timeout' => q{Command timed out! Consider boosting --timeout higher than $1},
'runtime-badmrtg' => q{invalid queryname?},
'runtime-badname' => q{Invalid queryname option: must be a simple view name},
'runtime-msg' => q{query runtime: $1 seconds},
'schema' => q{Schema},
'ss-createfile' => q{Created file $1},
'ss-different' => q{"$1" is different:},
'ss-existson' => q{Exists on:},
'ss-failed' => q{Databases were different. Items not matched: $1},
'ss-matched' => q{All databases have identical items},
'ss-missingon' => q{Missing on:},
'ss-noexist' => q{$1 "$2" does not exist on all databases:},
'ss-notset' => q{"$1" is not set on all databases:},
'ss-suffix' => q{Error: cannot use suffix unless looking at time-based schemas},
'seq-die' => q{Could not determine information about sequence $1},
'seq-msg' => q{$1=$2% (calls left=$3)},
'seq-none' => q{No sequences found},
'size' => q{size},
'slony-noschema' => q{Could not determine the schema for Slony},
'slony-nonumber' => q{Call to sl_status did not return a number},
'slony-lagtime' => q{Slony lag time: $1},
'symlink-create' => q{Created "$1"},
'symlink-done' => q{Not creating "$1": $2 already linked to "$3"},
'symlink-exists' => q{Not creating "$1": $2 file already exists},
'symlink-fail1' => q{Failed to unlink "$1": $2},
'symlink-fail2' => q{Could not symlink $1 to $2: $3},
'symlink-name' => q{This command will not work unless the program has the word "postgres" in it},
'symlink-unlink' => q{Unlinking "$1":$2 },
'table' => q{Table},
'testmode-end' => q{END OF TEST MODE},
'testmode-fail' => q{Connection failed: $1 $2},
'testmode-norun' => q{Cannot run "$1" on $2: version must be >= $3, but is $4},
'testmode-noset' => q{Cannot run "$1" on $2: $3 is not set to on},
'testmode-nover' => q{Could not find version for $1},
'testmode-ok' => q{Connection ok: $1},
'testmode-start' => q{BEGIN TEST MODE},
'time-day' => q{day},
'time-days' => q{days},
'time-hour' => q{hour},
'time-hours' => q{hours},
'time-minute' => q{minute},
'time-minutes' => q{minutes},
'time-month' => q{month},
'time-months' => q{months},
'time-second' => q{second},
'time-seconds' => q{seconds},
'time-week' => q{week},
'time-weeks' => q{weeks},
'time-year' => q{year},
'time-years' => q{years},
'timesync-diff' => q{diff},
'timesync-msg' => q{timediff=$1 DB=$2 Local=$3},
'transactions' => q{transactions},
'trigger-msg' => q{Disabled triggers: $1},
'txn-time' => q{transaction_time},
'txnidle-count-msg' => q{Total idle in transaction: $1},
'txnidle-count-none' => q{not more than $1 idle in transaction},
'txnidle-for-msg' => q{$1 idle transactions longer than $2s, longest: $3s$4 $5},
'txnidle-msg' => q{longest idle in txn: $1s$2 $3},
'txnidle-none' => q{no idle in transaction},
'txntime-count-msg' => q{Total transactions: $1},
'txntime-count-none' => q{not more than $1 transactions},
'txntime-for-msg' => q{$1 transactions longer than $2s, longest: $3s$4 $5},
'txntime-msg' => q{longest txn: $1s$2 $3},
'txntime-none' => q{No transactions},
'txnwrap-cbig' => q{The 'critical' value must be less than 2 billion},
'txnwrap-wbig' => q{The 'warning' value must be less than 2 billion},
'unknown-error' => q{Unknown error},
'usage' => qq{\nUsage: \$1 <options>\n Try "\$1 --help" for a complete list of options\n Try "\$1 --man" for the full manual\n},
'user' => q{User},
'username' => q{username},
'vac-nomatch-a' => q{No matching tables have ever been analyzed},
'vac-nomatch-v' => q{No matching tables have ever been vacuumed},
'version' => q{version $1},
'version-badmrtg' => q{Invalid mrtg version argument},
'version-fail' => q{version $1, but expected $2},
'version-ok' => q{version $1},
'wal-numfound' => q{WAL files found: $1},
'wal-numfound2' => q{WAL "$2" files found: $1},
},
'es' => {
'address' => q{dirección},
'age' => q{edad},
'backends-fatal' => q{No es posible conectar: demasiadas conexiones},
'backends-mrtg' => q{DB=$1 Max conexiones=$2},
'backends-msg' => q{$1 de $2 conexiones ($3%)},
'backends-nomax' => q{No es posible determinar max_connections},
'backends-oknone' => q{No hay conexiones},
'backends-po' => q{lo siento, hay demasiados clientes},
'backends-users' => q{$1 debe ser un número o porcentaje de usuarios},
'bloat-index' => q{(bd $1) índice $2 filas:$3 páginas:$4 deberíaser:$5 ($6X) bytes desperdiciados:$7 ($8)},
'bloat-nomin' => q{ninguna relación cumple el criterio de bloat mínimo},
'bloat-table' => q{(bd $1) tabla $2.$3 filas:$4 páginas:$5 deberíaser:$6 ($7X) bytes desperdiciados:$8 ($9)},
'bug-report' => q{Por favor reporte estos detalles a [email protected]:},
'checkcluster-id' => q{Identificador de la base de datos:},
'checkcluster-msg' => q{cluster_id: $1},
'checkcluster-nomrtg'=> q{Debe proporcionar un número con la opción --mrtg},
'checkmode-prod' => q{en producción},
'checkmode-recovery' => q{en recuperación de archivo},
'checkmode-state' => q{Estado del clúster de base de datos:},
'checkpoint-baddir' => q{Directorio de datos inválido: "$1"},
'checkpoint-baddir2' => q{pg_controldata no pudo leer el directorio de datos: "$1"},
'checkpoint-badver' => q{Fallo al ejecutar pg_controldata - probable que la versión sea incorrecta ($1)},
'checkpoint-badver2' => q{Fallo al ejecutar pg_controldata - verifique que es la versión correcta},
'checkpoint-nodir' => q{Debe especificar el argumento --datadir o definir la variable de ambiente PGDATA},
'checkpoint-nodp' => q{Debe instalar el módulo Perl Date::Parse para usar la acción checkpoint},
'checkpoint-noparse' => q{No se pudo interpretar la salida de pg_controldata: "$1"},
'checkpoint-noregex' => q{No se pudo encontrar la expresion regular para este chequeo},
'checkpoint-nosys' => q{No es posible ejecutar pg_controldata: $1},
'checkpoint-ok' => q{El último checkpoint fue hace 1 segundo},
'checkpoint-ok2' => q{El último checkpoint fue hace $1 segundo},
'checkpoint-po' => q{Instante del último checkpoint:},
'checksum-msg' => q{checksum: $1},
'checksum-nomd' => q{Debe instalar el módulo Perl Digest::MD5 para usar la acción checksum},
'checksum-nomrtg' => q{Debe proporcionar un checksum con la opción --mrtg},
'custom-invalid' => q{Formato devuelto por la consulta personalizada es inválido},
'custom-norows' => q{No se obtuvieron filas},
'custom-nostring' => q{Debe proporcionar el texto con la consulta},
'database' => q{base de datos},
'dbsize-version' => q{La base de datos debe ser version 8.1 o superior para utilizar la acción database_size},
'depr-pgcontroldata' => q{PGCONTROLDATA es obsoleta, en su lugar use PGBINDIR.},
'die-action-version' => q{No es posible ejecutar "$1": versión del servidor debe ser >= $2, pero es $3},
'die-badtime' => q{El valor de '$1' debe ser un tiempo valido. Ejemplos: -$2 1s -$2 "10 minutes"},
'die-badversion' => q{Cadena de versión no válida: $1},
'die-noset' => q{No puede ejecutar "$1": la opción $2 no esta activa},
'die-nosetting' => q{No fue posible obtener configuración '$1'},
'diskspace-fail' => q{Resultado inválido en el comando "$1": $2},
'diskspace-msg' => q{FS $1 montado en $2 esta usando $3 de $4 ($5%)},
'diskspace-nodata' => q{No fue posible determinar el data_directory: se está conectando como superusuario?},
'diskspace-nodf' => q{No se encuentra el ejecutable requerido /bin/df},
'diskspace-nodir' => q{No fue posible encontrar el directorio de datos "$1"},
'file-noclose' => q{No puedo cerrar $1: $2},
'files' => q{archivos},
'fsm-page-highver' => q{No se puede comprobar fsm_pages en servidores con versión 8.4 o posterior},
'fsm-page-msg' => q{ranuras de páginas FSM utilizadas: $1 de $2 ($3%)},
'fsm-rel-highver' => q{No se puede comprobar fsm_relations en servidores con versión 8.4 o posterior},
'fsm-rel-msg' => q{relaciones FSM utilizadas: $1 de $2 ($3%)},
'hs-future-replica' => q{El esclavo reporta que el reloj del maestro está adelantado, comprobar sincronización de tiempo},
'hs-no-role' => q{No es un par maestro/esclavo},
'hs-no-location' => q{No pude obtener ubicación actual de xlog en $1},
'hs-receive-delay' => q{receive-delay},
'hs-replay-delay' => q{replay_delay},
'hs-time-delay' => q{time_delay},
'hs-time-version' => q{La base de datos debes ser versión 9.1 or superior para comprobar el tiempo de retraso del esclavo},
'index' => q{Indice},
'invalid-option' => q{Opción inválida},
'invalid-query' => q{Se devolvió una consulta inválida: $1},
'language' => q{Idioma},
'listener-msg' => q{escuchas encontrados: $1},
'listening' => q{escuchado},
'locks-msg' => q{total "$1" bloqueos: $2},
'locks-msg2' => q{total bloqueos: $1},
'logfile-bad' => q{Archivo de registro inválido "$1"},
'logfile-debug' => q{Archivo de registro final: $1},
'logfile-dne' => q{El archivo de registo $1 no existe!},
'logfile-fail' => q{Fallo al registrar en: $1},
'logfile-ok' => q{registrando en: $1},
'logfile-openfail' => q{El archivo de registro "$1" no se pudo abrir: $2},
'logfile-opt-bad' => q{Opción de registro inválida},
'logfile-seekfail' => q{Fallo al buscar en $1: $2},
'logfile-stderr' => q{La salida de registro ha sido redirigida a STDERR: por favor proporcione un nombre de archivo},
'logfile-syslog' => q{La base de datos está usando syslog, por favor especifique una ruta con la opción --logfile (fac=$1)},
'mode-standby' => q{Servidor en modo "standby"},
'mode' => q{modo},
'mrtg-fail' => q{La acción $1 fracasó: $2},
'new-ver-nocver' => q{No fue posible descargar la información de versión para $1},
'new-ver-badver' => q{No fue posible interpretar la información de versión para $1},
'new-ver-dev' => q{No es posible comparar versiones de desarrollo: usted tiene $1 versión $2},
'new-ver-nolver' => q{No fue posible determinar información de versión local para $1},
'new-ver-ok' => q{La versión $1 es la última para $2},
'new-ver-warn' => q{Por favor actualice a la versión $1 de $2. Usted esta ejecutando $3},
'new-ver-tt' => q{Su versión de $1 ($2) parece ser más nueva que la versión actual! ($3)},
'no-db' => q{No hay bases de datos},
'no-match-db' => q{No hay bases de datos coincidentes debido a las opciones de exclusión/inclusión},
'no-match-fs' => q{No se encuentran sistemas de archivos coincidentes debido a las opciones de exclusión/inclusión},
'no-match-rel' => q{No se encuentran relaciones coincidentes debido a las opciones de exclusión/inclusión},
'no-match-set' => q{No se encuentran opciones de configuración coincidentes debido a las opciones de exclusión/inclusión},
'no-match-table' => q{No se encuentran tablas coincidentes debido a las opciones de exclusión/inclusión},
'no-match-user' => q{No se encuentran entradas coincidentes debido a las opciones de exclusión/inclusión},
'no-parse-psql' => q{No se pudo interpretar la salida de psql!},
'no-time-hires' => q{No se encontró Time::HiRes, necesario si 'showtime' es verdadero},
'opt-output-invalid' => q{Formato de salida inválido: debe ser 'nagios' o 'mrtg' o 'simple' o 'cacti'},
'opt-psql-badpath' => q{Argumento psql es inválido: debe ser una ruta absoluta a un archivo con nombre psql},
'opt-psql-noexec' => q{El archivo "$1" no parece ser ejecutable},
'opt-psql-noexist' => q{No se puede encontrar el ejecutable psql: $1},
'opt-psql-nofind' => q{No fue posible encontrar un ejecutable psql},
'opt-psql-nover' => q{No fue posible determinar la versión de psql},
'opt-psql-restrict' => q{No puede usar la opción --PGBINDIR o --PSQL si NO_PSQL_OPTION está habilitado},
'pgagent-jobs-ok' => q{No hay trabajos fallidos},
'pgbouncer-pool' => q{Pool=$1 $2=$3},
'pgb-backends-mrtg' => q{BD=$1 Max conexiones=$2},
'pgb-backends-msg' => q{$1 de $2 conexiones ($3%)},
'pgb-backends-none' => q{No nay conexiones},
'pgb-backends-users' => q{$1 debe ser un número o porcentaje de usuarios},
'PID' => q{PID},
'port' => q{puerto},
'preptxn-none' => q{No se encontraron transacciones preparadas},
'psa-disabled' => q{No hay consultas - están deshabilitados stats_command_string o track_activities?},
'psa-noexact' => q{Error desconocido},
'psa-nosuper' => q{No hay coincidencias - por favor ejecute como superusuario},
'qtime-count-msg' => q{Total de consultas: $1},
'qtime-count-none' => q{no mas que $1 consultas},
'qtime-for-msg' => q{$1 consultas más largas que $2s, más larga: $3s$4 $5},
'qtime-msg' => q{consulta más larga: $1s$2 $3},
'qtime-none' => q{no hay consultas},
'query' => q{consulta},
'queries' => q{consultas},
'query-time' => q{query_time},
'range-badcs' => q{Opción '$1' inválida: debe ser un "checksum"},
'range-badlock' => q{Opción '$1' inválida: debe ser el número de bloqueos, o "type1=#:type2=#"},
'range-badpercent' => q{Opción '$1' inválida: debe ser un porcentaje},
'range-badpercsize' => q{Opción '$1' inválida: debe ser un tamaño o un porcentaje},
'range-badsize' => q{Tamaño inválido para la opción '$1'},
'range-badtype' => q{validate_range solicitado con tipo desconocido '$1'},
'range-badversion' => q{Cadena inválida para la opción '$1': $2},
'range-cactionly' => q{Esta acción es solo para uso en cacti y no acepta parámetros warning o critical},
'range-int' => q{Valor inválido para la opción '$1': debe ser un entero},
'range-int-pos' => q{Valor inválido para la opción '$1': debe ser un entero positivo},
'range-neg-percent' => q{No puede especificar un porcentaje negativo!},
'range-none' => q{No se requieren opciones de warning o critical},
'range-noopt-both' => q{Debe especificar ambas opciones de 'warning' y 'critical'},
'range-noopt-one' => q{Debe especificar una opción 'warning' o 'critical'},
'range-noopt-only' => q{Puede especifiar solo una de las opciónes 'warning' o 'critical'},
'range-noopt-orboth' => q{Debe especificar un valor de 'warning', de 'critical', o ambos},
'range-noopt-size' => q{Debe especificar un tamaño de warning y/o critical},
'range-nosize' => q{Debe especificar un tamaño de warning y/o critical},
'range-notime' => q{Debe especificar un tamaño de warning y/o critical},
'range-seconds' => q{Valor inválido para la opción '$1': debe ser número de segundos},
'range-version' => q{debe ser en el formato X.Y o X.Y.Z, donde X es el número mayor de la versión, },
'range-warnbig' => q{El valor de la opción 'warning' no puede ser mayor que el de 'critical'},
'range-warnbigsize' => q{El valor de la opción 'warning' ($1 bytes) no puede ser mayor que el de 'critical ($2 bytes)'},
'range-warnbigtime' => q{El valor de la opción 'warning' ($1 s) no puede ser mayor que el de 'critical ($2 s)'},
'range-warnsmall' => q{El valor de la opción 'warning' no puede ser menor que el de 'critical'},
'range-nointfortime' => q{Valor inválido para las opciones '$1': debe ser un entero o un valor de tiempo},
'relsize-msg-ind' => q{el índice más grande es "$1": $2},
'relsize-msg-reli' => q{la relación más grande es el índice "$1": $2},
'relsize-msg-relt' => q{la relación más grande es la tabla "$1": $2},
'relsize-msg-tab' => q{la tabla más grande es "$1": $2},
'rep-badarg' => q{Parámetro invalido para repinfo: se esperan 6 valores separados por coma},
'rep-duh' => q{No tiene sentido probar la replicación con los mismos valores},
'rep-fail' => q{Fila no replicada en el esclavo $1},
'rep-noarg' => q{Necesita un valor para repinfo},
'rep-norow' => q{La fila del origen de la replicación no fue encontrada: $1},
'rep-noslaves' => q{No se encontraron esclavos},
'rep-notsame' => q{No se puede probar la replicación: los valores no coinciden},
'rep-ok' => q{La fila fue replicada},
'rep-sourcefail' => q{Falló la actualización del origen},
'rep-timeout' => q{La fila no fue replicada. Timeout: $1},
'rep-unknown' => q{Chequeo de replicación fallido},
'rep-wrongvals' => q{No puedo verificar la replicación: los valores no son correctos ('$1' no '$2' ni '$3')},
'runcommand-err' => q{Error desconocido en la función "run_command"},
'runcommand-nodb' => q{No se encontró ninguna base de datos buscada},
'runcommand-nodupe' => q{No fue posible duplicar STDERR},
'runcommand-noerr' => q{No fue posible abrir STDERR?!},
'runcommand-nosys' => q{Llamada al sistema falló con $1},
'runcommand-pgpass' => q{Se creo archivo temporal pgpass $1},
'runcommand-timeout' => q{Tiempo de espera del comando agotado! Considere incrementar --timeout a valor mayor que $1},
'runtime-badmrtg' => q{valor de queryname inválido?},
'runtime-badname' => q{Opción queryname inválida: debe ser el nombre de una única vista},
'runtime-msg' => q{tiempo de la consulta: $1 seg},
'schema' => q{Esquema},
'ss-createfile' => q{Archivo creado $1},
'ss-different' => q{"$1" es diferente:},
'ss-existson' => q{Existe en:},
'ss-failed' => q{Las bases de datos son diferentes. Elementos no coincidentes: $1},
'ss-matched' => q{Todas las bases tienen los mismos elementos},
'ss-missingon' => q{Desaparecido en:},
'ss-noexist' => q{$1 "$2" no existe en todas las bases de datos:},
'ss-notset' => q{"$1" no está definido en todas las bases de datos:},
'ss-suffix' => q{Error: no puede usar sufijos a menos que este buscando esquemas basados en tiempo},
'seq-die' => q{No es posible obtener información sobre la secuencia $1},
'seq-msg' => q{$1=$2% (llamadas pendientes=$3)},
'seq-none' => q{No se encontraron secuencias},
'size' => q{tamaño},
'slony-noschema' => q{No fue posible determinar el esquema para Slony},
'slony-nonumber' => q{El llamado a sl_status no devolvió un número},
'slony-lagtime' => q{Slony lag time: $1},
'symlink-create' => q{Creado "$1"},
'symlink-done' => q{No se crea "$1": El enlace $2 ya apunta a "$3"},
'symlink-exists' => q{No se crea "$1": El archivo $2 ya existe},
'symlink-fail1' => q{No fue posible desvincular "$1": $2},
'symlink-fail2' => q{No pude crear enlace simbolico de $1 a $2: $3},
'symlink-name' => q{Este comando no va a funcionar a menos que el programa tenga la palabra "postgres" en su nombre},
'symlink-unlink' => q{Desvinculando "$1":$2 },
'table' => q{Tabla},
'testmode-end' => q{END OF TEST MODE},
'testmode-fail' => q{Connexión fallida: $1 $2},
'testmode-norun' => q{No puede ejecutar "$1" en $2: versión debe ser >= $3, pero es $4},
'testmode-noset' => q{No puede ejecutar "$1" en $2: la opción $3 no está activa},
'testmode-nover' => q{Could not find version for $1},
'testmode-ok' => q{Connection ok: $1},
'testmode-start' => q{BEGIN TEST MODE},
'time-day' => q{día},
'time-days' => q{días},
'time-hour' => q{hora},
'time-hours' => q{horas},
'time-minute' => q{minuto},
'time-minutes' => q{minutos},
'time-month' => q{mes},
'time-months' => q{meses},
'time-second' => q{segundo},
'time-seconds' => q{segundos},
'time-week' => q{semana},
'time-weeks' => q{semanas},
'time-year' => q{año},
'time-years' => q{años},
'timesync-diff' => q{diff},
'timesync-msg' => q{timediff=$1 BD=$2 Local=$3},
'transactions' => q{transacciones},
'trigger-msg' => q{Disparadores desactivados: $1},
'txn-time' => q{transaction_time},
'txnidle-count-msg' => q{Total transacciones inactivas: $1},
'txnidle-count-none' => q{no más de $1 transacciones inactivas},
'txnidle-for-msg' => q{$1 transacciones inactivas mayores que $2s, más larga: $3s$4 $5},
'txnidle-msg' => q{transacción inactiva más larga: $1s$2 $3},
'txnidle-none' => q{no hay transacciones inactivas},
'txntime-count-msg' => q{Total de transacciones: $1},
'txntime-count-none' => q{no más que $1 transacciones},
'txntime-for-msg' => q{$1 transacciones más largas que $2s, más larga: $3s$4 $5},
'txntime-msg' => q{transacción más larga: $1s$2 $3},
'txntime-none' => q{No hay transacciones},
'txnwrap-cbig' => q{El valor 'critical' debe ser menor a 2000 millones},
'txnwrap-wbig' => q{El valor 'warning' debe ser menor a 2000 millones},
'unknown-error' => q{Error desconocido},
'usage' => qq{\nUso: \$1 <opciones>\n Pruebe "\$1 --help" para obtener lista completa de opciones\n Pruebe "\$1 --man" para acceder al manual completo\n},
'user' => q{Usuario},
'username' => q{nombre-de-usuario},
'vac-nomatch-a' => q{No hay tablas coincidentes que hayan sido analizadas},
'vac-nomatch-v' => q{No hay tablas coincidentes que hayan sido vaciadas},
'version' => q{versión $1},
'version-badmrtg' => q{Argumento de versión mrtg inválido},
'version-fail' => q{versión $1, pero se esperaba $2},
'version-ok' => q{versión $1},
'wal-numfound' => q{Archivos WAL encontrados: $1},
'wal-numfound2' => q{Archivos WAL "$2" encontrados: $1},
},
'fr' => {
'address' => q{adresse},
'age' => q{âge},
'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%)},
'backends-nomax' => q{N'a pas pu déterminer max_connections},
'backends-oknone' => q{Aucune connexion},
'backends-po' => q{désolé, trop de clients sont déjà connectés},
'backends-users' => q{$1 pour le nombre d'utilisateurs doit être un nombre ou un pourcentage},
'bloat-index' => q{(db $1) index $2 lignes:$3 pages:$4 devrait être:$5 ($6X) octets perdus:$7 ($8)},
'bloat-nomin' => q{aucune relation n'atteint le critère minimum de fragmentation},
'bloat-table' => q{(db $1) table $2.$3 lignes:$4 pages:$5 devrait être:$6 ($7X) place perdue:$8 ($9)},
'bug-report' => q{Merci de rapporter ces d??tails ?? [email protected]:},
'checkcluster-id' => q{Identifiant système de la base de données :},
'checkcluster-msg' => q{cluster_id : $1},
'checkcluster-nomrtg'=> q{Doit fournir un numéro via l'option --mrtg},
'checkmode-prod' => q{en production},
'checkmode-recovery' => q{en restauration d'archives},
'checkmode-state' => q{État de l'instance :},
'checkpoint-baddir' => q{data_directory invalide : "$1"},
'checkpoint-baddir2' => q{pg_controldata n'a pas pu lire le répertoire des données indiqué : « $1 »},
'checkpoint-badver' => q{Échec lors de l'exécution de pg_controldata - probablement la mauvaise version ($1)},
'checkpoint-badver2' => q{Échec lors de l'exécution de pg_controldata - est-ce la bonne version ?},
'checkpoint-nodir' => q{Vous devez fournir un argument --datadir ou configurer la variable d'environnement PGDATA},
'checkpoint-nodp' => q{Vous devez installer le module Perl Date::Parse pour utiliser l'action checkpoint},
'checkpoint-noparse' => q{Incapable d'analyser le résultat de la commande pg_controldata : "$1"},
'checkpoint-noregex' => q{La regex pour ce test n'a pas été trouvée},
'checkpoint-nosys' => q{N'a pas pu appeler pg_controldata : $1},
'checkpoint-ok' => q{Le dernier CHECKPOINT est survenu il y a une seconde},
'checkpoint-ok2' => q{Le dernier CHECKPOINT est survenu il y a $1 secondes},
'checkpoint-po' => q{Heure du dernier point de contrôle :},
'checksum-msg' => q{somme de contrôle : $1},
'checksum-nomd' => q{Vous devez installer le module Perl Digest::MD5 pour utiliser l'action checksum},
'checksum-nomrtg' => q{Vous devez fournir une somme de contrôle avec l'option --mrtg},
'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{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},
'depr-pgcontroldata' => q{PGCONTROLDATA is deprecated, use PGBINDIR instead.},
'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 »},
'die-badversion' => q{Version invalide : $1},
'die-noset' => q{Ne peut pas exécuter « $1 » $2 n'est pas activé},
'die-nosetting' => q{N'a pas pu récupérer le paramètre « $1 »},
'diskspace-fail' => q{Résultat invalide pour la commande « $1 » : $2},
'diskspace-msg' => q{Le système de fichiers $1 monté sur $2 utilise $3 sur $4 ($5%)},
'diskspace-nodata' => q{N'a pas pu déterminer data_directory : êtes-vous connecté en tant que super-utilisateur ?},
'diskspace-nodf' => q{N'a pas pu trouver l'exécutable /bin/df},
'diskspace-nodir' => q{N'a pas pu trouver le répertoire des données « $1 »},
'files' => q{fichiers},
'file-noclose' => q{N'a pas pu fermer $1 : $2},
'fsm-page-highver' => q{Ne peut pas vérifier fsm_pages sur des serveurs en version 8.4 ou ultérieure},
'fsm-page-msg' => q{emplacements de pages utilisés par la FSM : $1 sur $2 ($3%)},
'fsm-rel-highver' => q{Ne peut pas vérifier fsm_relations sur des serveurs en version 8.4 ou ultérieure},
'fsm-rel-msg' => q{relations tracées par la FSM : $1 sur $2 ($3%)},
'hs-future-replica' => q{Slave reporting master server clock is ahead, check time sync},
'hs-no-role' => q{Pas de couple ma??tre/esclave},
'hs-no-location' => q{N'a pas pu obtenir l'emplacement courant dans le journal des transactions sur $1},
'hs-receive-delay' => q{délai de réception},
'hs-replay-delay' => q{délai de rejeu},
'hs-time-delay' => q{time_delay},
'hs-time-version' => q{Database must be version 9.1 or higher to check slave lag by time},
'index' => q{Index},
'invalid-option' => q{Option invalide},
'invalid-query' => q{Une requête invalide a renvoyé : $1},
'language' => q{Langage},
'listener-msg' => q{processus LISTEN trouvés : $1},
'listening' => q{en écoute},
'locks-msg' => q{total des verrous « $1 » : $2},
'locks-msg2' => q{total des verrous : $1},
'logfile-bad' => q{Option logfile invalide « $1 »},
'logfile-debug' => q{Journal applicatif final : $1},
'logfile-dne' => q{le journal applicatif $1 n'existe pas !},
'logfile-fail' => q{échec pour tracer dans : $1},
'logfile-ok' => q{trace dans : $1},
'logfile-openfail' => q{échec pour l'ouverture du journal applicatif « $1 » : $2},
'logfile-opt-bad' => q{Option logfile invalide},
'logfile-seekfail' => q{Échec de la recherche dans $1 : $2},
'logfile-stderr' => q{La sortie des traces a été redirigés stderr : merci de fournir un nom de fichier},
'logfile-syslog' => q{La base de données utiliser syslog, merci de spécifier le chemin avec l'option --logfile (fac=$1)},
'mode-standby' => q{Serveur en mode standby},
'mode' => q{mode},
'mrtg-fail' => q{Échec de l'action $1 : $2},
'new-ver-nocver' => q{N'a pas pu t??l??charger les informations de version pour $1},
'new-ver-badver' => q{N'a pas pu analyser les informations de version pour $1},
'new-ver-dev' => q{Ne peut pas comparer les versions sur des versions de d??veloppement : vous avez $1 version $2},
'new-ver-nolver' => q{N'a pas pu d??terminer les informations de version locale pour $1},
'new-ver-ok' => q{La version $1 est la dernière pour $2},
'new-ver-warn' => q{Merci de mettre à jour vers la version $1 de $2. Vous utilisez actuellement la $3},
'new-ver-tt' => q{Votre version de $1 ($2) semble ult??rieure ?? la version courante ! ($3)},
'no-db' => q{Pas de bases de données},
'no-match-db' => q{Aucune base de données trouvée à cause des options d'exclusion/inclusion},
'no-match-fs' => q{Aucun système de fichier trouvé à cause des options d'exclusion/inclusion},
'no-match-rel' => q{Aucune relation trouvée à cause des options d'exclusion/inclusion},
'no-match-set' => q{Aucun paramètre trouvé à cause des options d'exclusion/inclusion},
'no-match-table' => q{Aucune table trouvée à cause des options d'exclusion/inclusion},
'no-match-user' => q{Aucune entrée trouvée à cause options d'exclusion/inclusion},
'no-parse-psql' => q{N'a pas pu analyser la sortie de psql !},
'no-time-hires' => q{N'a pas trouvé le module Time::HiRes, nécessaire quand « showtime » est activé},
'opt-output-invalid' => q{Sortie invalide : doit être 'nagios' ou 'mrtg' ou 'simple' ou 'cacti'},
'opt-psql-badpath' => q{Argument invalide pour psql : doit être le chemin complet vers un fichier nommé psql},
'opt-psql-noexec' => q{ Le fichier « $1 » ne paraît pas exécutable},
'opt-psql-noexist' => q{Ne peut pas trouver l'exécutable psql indiqué : $1},
'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 --PGBINDIR ou --PSQL si NO_PSQL_OPTION est activé},
'pgagent-jobs-ok' => q{No failed jobs},
'pgbouncer-pool' => q{Pool=$1 $2=$3},
'pgb-backends-mrtg' => q{base=$1 connexions max=$2},
'pgb-backends-msg' => q{$1 connexions sur $2 ($3%)},
'pgb-backends-none' => q{Aucune connection},
'pgb-backends-users' => q{Le nombre d'utilisateurs, $1, doit être un nombre ou un pourcentage},
'PID' => q{PID},
'port' => q{port},
'preptxn-none' => q{Aucune transaction préparée trouvée},
'psa-disabled' => q{Pas de requ??te - est-ce que stats_command_string ou track_activities sont d??sactiv??s ?},
'psa-noexact' => q{Erreur inconnue},
'psa-nosuper' => q{Aucune correspondance - merci de m'ex??cuter en tant que superutilisateur},
'qtime-count-msg' => q{Requêtes totales : $1},
'qtime-count-none' => q{pas plus que $1 requêtes},
'qtime-for-msg' => q{$1 requêtes plus longues que $2s, requête la plus longue : $3s$4 $5},
'qtime-msg' => q{requête la plus longue : $1s$2 $3},
'qtime-none' => q{aucune requête},
'query' => q{requête},
'queries' => q{requêtes},
'query-time' => q{durée de la requête},
'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},
'range-badpercsize' => q{Option « $1 » invalide : doit être une taille ou un pourcentage},
'range-badsize' => q{Taille invalide pour l'option « $1 »},
'range-badtype' => q{validate_range appelé avec un type inconnu « $1 »},
'range-badversion' => q{Chaîne invalide pour l'option « $1 » : $2},
'range-cactionly' => q{Cette action est pour cacti seulement et ne prend pas les arguments warning et critical},
'range-int' => q{Argument invalide pour l'option « $1 » : doit être un entier},
'range-int-pos' => q{Argument invalide pour l'option « $1 » : doit être un entier positif},
'range-neg-percent' => q{Ne peut pas indiquer un pourcentage négatif !},
'range-none' => q{Les options warning et critical ne sont pas nécessaires},
'range-noopt-both' => q{Doit fournir les options warning et critical},
'range-noopt-one' => q{Doit fournir une option warning ou critical},
'range-noopt-only' => q{Peut seulement fournir une option warning ou critical},
'range-noopt-orboth' => q{Doit fournir une option warning, une option critical ou les deux},
'range-noopt-size' => q{Doit fournir une taille warning et/ou critical},
'range-nosize' => q{Doit fournir une taille warning et/ou critical},
'range-notime' => q{Doit fournir une heure warning et/ou critical},
'range-seconds' => q{Argument invalide pour l'option « $1 » : doit être un nombre de secondes},
'range-version' => q{doit être dans le format X.Y ou X.Y.Z, où X est le numéro de version majeure, },
'range-warnbig' => q{L'option warning ne peut pas être plus grand que l'option critical},
'range-warnbigsize' => q{L'option warning ($1 octets) ne peut pas être plus grand que l'option critical ($2 octets)},
'range-warnbigtime' => q{L'option warning ($1 s) ne peut pas être plus grand que l'option critical ($2 s)},
'range-warnsmall' => q{L'option warningne peut pas être plus petit que l'option critical},
'range-nointfortime' => q{Argument invalide pour l'option '$1' : doit être un entier, une heure ou un entier horaire},
'relsize-msg-ind' => q{le plus gros index est « $1 » : $2},
'relsize-msg-reli' => q{la plus grosse relation est l'index « $1 » : $2},
'relsize-msg-relt' => q{la plus grosse relation est la table « $1 » : $2},
'relsize-msg-tab' => q{la plus grosse table est « $1 » : $2},
'rep-badarg' => q{Argument repinfo invalide : 6 valeurs séparées par des virgules attendues},
'rep-duh' => q{Aucun sens à tester la réplication avec les mêmes valeurs},
'rep-fail' => q{Ligne non répliquée sur l'esclave $1},
'rep-noarg' => q{A besoin d'un argument repinfo},
'rep-norow' => q{Ligne source de la réplication introuvable : $1},
'rep-noslaves' => q{Aucun esclave trouvé},
'rep-notsame' => q{Ne peut pas tester la réplication : les valeurs ne sont pas identiques},
'rep-ok' => q{La ligne a été répliquée},
'rep-sourcefail' => q{Échec de la mise à jour de la source},
'rep-timeout' => q{La ligne n'a pas été répliquée. Délai dépassé : $1},
'rep-unknown' => q{Échec du test de la réplication},
'rep-wrongvals' => q{Ne peut pas tester la réplication : les valeurs ne sont pas les bonnes (ni '$1' ni '$2' ni '$3')},
'runcommand-err' => q{Erreur inconnue de la fonction « run_command »},
'runcommand-nodb' => q{Aucune base de données cible trouvée},
'runcommand-nodupe' => q{N'a pas pu dupliqué STDERR},
'runcommand-noerr' => q{N'a pas pu ouvrir STDERR},
'runcommand-nosys' => q{Échec de l'appel système avec un $1},
'runcommand-pgpass' => q{Création du fichier pgpass temporaire $1},
'runcommand-timeout' => q{Délai épuisée pour la commande ! Essayez d'augmenter --timeout à une valeur plus importante que $1},
'runtime-badmrtg' => q{queryname invalide ?},
'runtime-badname' => q{Option invalide pour queryname option : doit être le nom d'une vue},
'runtime-msg' => q{durée d'exécution de la requête : $1 secondes},
'schema' => q{Schéma},
'ss-createfile' => q{Création du fichier $1},
'ss-different' => q{"$1" est différent:},
'ss-existson' => q{Existe sur :},
'ss-failed' => q{Les bases de données sont différentes. Éléments différents : $1},
'ss-matched' => q{Les bases de données ont les mêmes éléments},
'ss-missingon' => q{Manque sur :},
'ss-noexist' => q{$1 "$2" n'existe pas sur toutes les bases de données :},
'ss-notset' => q{"$1" n'est pas configuré sur toutes les bases de données :},
'ss-suffix' => q{Erreur : ne peut pas utiliser le suffixe sauf à rechercher des schémas basés sur l'horloge},
'size' => q{taille},
'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},
'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},
'symlink-create' => q{Création de « $1 »},
'symlink-done' => q{Création impossible de « $1 »: $2 est déjà lié à "$3"},
'symlink-exists' => q{Création impossible de « $1 »: le fichier $2 existe déjà},
'symlink-fail1' => q{Échec de la suppression de « $1 » : $2},
'symlink-fail2' => q{N'a pas pu supprimer le lien symbolique $1 vers $2 : $3},
'symlink-name' => q{Cette commande ne fonctionnera pas sauf si le programme contient le mot « postgres »},
'symlink-unlink' => q{Supression de « $1 » :$2 },
'table' => q{Table},
'testmode-end' => q{FIN DU MODE DE TEST},
'testmode-fail' => q{Échec de la connexion : $1 $2},
'testmode-norun' => q{N'a pas pu exécuter « $1 » sur $2 : la version doit être supérieure ou égale à $3, mais est $4},
'testmode-noset' => q{N'a pas pu exécuter « $1 » sur $2 : $3 n'est pas activé},
'testmode-nover' => q{N'a pas pu trouver la version de $1},
'testmode-ok' => q{Connexion OK : $1},
'testmode-start' => q{DÉBUT DU MODE DE TEST},
'time-day' => q{jour},
'time-days' => q{jours},
'time-hour' => q{heure},
'time-hours' => q{heures},
'time-minute' => q{minute},
'time-minutes' => q{minutes},
'time-month' => q{mois},
'time-months' => q{mois},
'time-second' => q{seconde},
'time-seconds' => q{secondes},
'time-week' => q{semaine},
'time-weeks' => q{semaines},
'time-year' => q{année},
'time-years' => q{années},
'timesync-diff' => q{diff},
'timesync-msg' => q{timediff=$1 Base de données=$2 Local=$3},
'transactions' => q{transactions},
'trigger-msg' => q{Triggers désactivés : $1},
'txn-time' => q{durée de la transaction},
'txnidle-count-msg' => q{Transactions en attente totales : $1},
'txnidle-count-none' => q{pas plus de $1 transaction en attente},
'txnidle-for-msg' => q{$1 transactions en attente plus longues que $2s, transaction la plus longue : $3s$4 $5},
'txnidle-msg' => q{transaction en attente la plus longue : $1s$2 $3},
'txnidle-none' => q{Aucun processus en attente dans une transaction},
'txntime-count-msg' => q{Transactions totales : $1},
'txntime-count-none' => q{pas plus que $1 transactions},
'txntime-for-msg' => q{$1 transactions plus longues que $2s, transaction la plus longue : $3s$4 $5},
'txntime-msg' => q{Transaction la plus longue : $1s$2 $3},
'txntime-none' => q{Aucune transaction},
'txnwrap-cbig' => q{La valeur critique doit être inférieure à 2 milliards},
'txnwrap-wbig' => q{La valeur d'avertissement doit être inférieure à 2 milliards},
'unknown-error' => q{erreur inconnue},
'usage' => qq{\nUsage: \$1 <options>\n Essayez « \$1 --help » pour liste complète des options\n\n},
'username' => q{nom utilisateur},
'user' => q{Utilisateur},
'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},
'version' => q{version $1},
'version-badmrtg' => q{Argument invalide pour la version de mrtg},
'version-fail' => q{version $1, alors que la version attendue est $2},
'version-ok' => q{version $1},
'wal-numfound' => q{Fichiers WAL trouvés : $1},
'wal-numfound2' => q{Fichiers WAL "$2" trouvés : $1},
},
'af' => {
},
'cs' => {
'checkpoint-po' => q{�as posledn�ho kontroln�ho bodu:},
},
'de' => {
'backends-po' => q{tut mir leid, schon zu viele Verbindungen},
'checkpoint-po' => q{Zeit des letzten Checkpoints:},
},
'fa' => {
'checkpoint-po' => q{زمان آخرین وارسی:},
},
'hr' => {
'backends-po' => q{nažalost, već je otvoreno previše klijentskih veza},
},
'hu' => {
'checkpoint-po' => q{A legut�bbi ellen�rz�pont ideje:},
},
'it' => {
'checkpoint-po' => q{Orario ultimo checkpoint:},
},
'ja' => {
'backends-po' => q{現在クライアント数が多すぎます},
'checkpoint-po' => q{最終チェックポイント時刻:},
},
'ko' => {
'backends-po' => q{최대 동시 접속자 수를 초과했습니다.},
'checkpoint-po' => q{������ üũ����Ʈ �ð�:},
},
'nb' => {
'backends-po' => q{beklager, for mange klienter},
'checkpoint-po' => q{Tidspunkt for nyeste kontrollpunkt:},
},
'nl' => {
},
'pl' => {
'checkpoint-po' => q{Czas najnowszego punktu kontrolnego:},
},
'pt_BR' => {
'backends-po' => q{desculpe, muitos clientes conectados},
'checkpoint-po' => q{Hora do último ponto de controle:},
},
'ro' => {
'checkpoint-po' => q{Timpul ultimului punct de control:},
},
'ru' => {
'backends-po' => q{��������, ��� ������� ����� ��������},
'checkpoint-po' => q{����� ��������� checkpoint:},
},
'sk' => {
'backends-po' => q{je mi ��to, je u� pr�li� ve�a klientov},
'checkpoint-po' => q{Čas posledného kontrolného bodu:},
},
'sl' => {
'backends-po' => q{povezanih je �e preve� odjemalcev},
'checkpoint-po' => q{�as zadnje kontrolne to�ke ............},
},
'sv' => {
'backends-po' => q{ledsen, f�r m�nga klienter},
'checkpoint-po' => q{Tidpunkt f�r senaste kontrollpunkt:},
},
'ta' => {
'checkpoint-po' => q{நவீன சோதனை மையத்தின் நேரம்:},
},
'tr' => {
'backends-po' => q{üzgünüm, istemci sayısı çok fazla},
'checkpoint-po' => q{En son checkpoint'in zamanı:},
},
'zh_CN' => {
'backends-po' => q{�Բ���, �Ѿ���̫���Ŀͻ�},
'checkpoint-po' => q{���¼�������ʱ��:},
},
'zh_TW' => {
'backends-po' => q{對不起,用戶端過多},
'checkpoint-po' => q{最新的檢查點時間:},
},
);
## use critic
our $lang = $ENV{LC_ALL} || $ENV{LC_MESSAGES} || $ENV{LANG} || 'en';
$lang = substr($lang,0,2);
## Messages are stored in these until the final output via finishup()
our (%ok, %warning, %critical, %unknown);
our $ME = basename($0);
our $ME2 = 'check_postgres.pl';
our $USAGE = msg('usage', $ME);
## This gets turned on for meta-commands which don't hit a Postgres database
our $nohost = 0;
## Global error string, mostly used for MRTG error handling
our $ERROR = '';
$opt{test} = 0;
$opt{timeout} = 30;
## Look for any rc files to control additional parameters
## Command line options always overwrite these
## Format of these files is simply name=val
## This option must come before the GetOptions call
for my $arg (@ARGV) {
if ($arg eq '--no-check_postgresrc') {
$opt{'no-check_postgresrc'} = 1;
last;
}
}
## Used by same_schema in the find_catalog_info sub
my %catalog_info = (
user => {
SQL => q{
SELECT *, usename AS name, quote_ident(usename) AS safeusename
FROM pg_user},
deletecols => [ qw{ passwd } ],
},
schema => {
SQL => q{
SELECT n.oid, quote_ident(nspname) AS name, quote_ident(usename) AS owner, nspacl
FROM pg_namespace n
JOIN pg_user u ON (u.usesysid = n.nspowner)},
deletecols => [ ],
exclude => 'temp_schemas',
},
language => {
SQL => q{
SELECT l.*, lanname AS name, quote_ident(usename) AS owner
FROM pg_language l
JOIN pg_user u ON (u.usesysid = l.lanowner)},
SQL2 => q{
SELECT l.*, lanname AS name
FROM pg_language l
},
},
type => {
SQL => q{
SELECT t.oid AS oid, t.*, quote_ident(usename) AS owner, quote_ident(nspname) AS schema,
nspname||'.'||typname AS name