diff --git a/check_postgres.pl.html b/check_postgres.pl.html index ee057c9..5270602 100644 --- a/check_postgres.pl.html +++ b/check_postgres.pl.html @@ -2,7 +2,7 @@
- ## Create all symlinks
- check_postgres.pl --symlinks
+## Create all symlinks
+check_postgres.pl --symlinks
- ## Check connection to Postgres database 'pluto':
- check_postgres.pl --action=connection --db=pluto
+## Check connection to Postgres database 'pluto':
+check_postgres.pl --action=connection --db=pluto
- ## Same things, but using the symlink
- check_postgres_connection --db=pluto
+## Same things, but using the symlink
+check_postgres_connection --db=pluto
- ## Warn if > 100 locks, critical if > 200, or > 20 exclusive
- check_postgres_locks --warning=100 --critical="total=200:exclusive=20"
+## Warn if > 100 locks, critical if > 200, or > 20 exclusive
+check_postgres_locks --warning=100 --critical="total=200:exclusive=20"
- ## Show the current number of idle connections on port 6543:
- check_postgres_txn_idle --port=6543 --output=simple
+## Show the current number of idle connections on port 6543:
+check_postgres_txn_idle --port=6543 --output=simple
- ## There are many other actions and options, please keep reading.
+## There are many other actions and options, please keep reading.
- The latest news and documentation can always be found at:
- https://bucardo.org/check_postgres/
+The latest news and documentation can always be found at:
+https://bucardo.org/check_postgres/
The simple output is simply a truncated version of the MRTG one, and simply returns the first number and nothing else. This is very useful when you just want to check the state of something, regardless of any threshold. You can transform the numeric output by appending KB, MB, GB, TB, or EB to the output argument, for example:
- --output=simple,MB
+--output=simple,MB
Examples:
- --host=a,b --port=5433 --db=c
- Connects twice to port 5433, using database c, to hosts a and b: a-5433-c b-5433-c
+--host=a,b --port=5433 --db=c
+Connects twice to port 5433, using database c, to hosts a and b: a-5433-c b-5433-c
- --host=a,b --port=5433 --db=c,d
- Connects four times: a-5433-c a-5433-d b-5433-c b-5433-d
+--host=a,b --port=5433 --db=c,d
+Connects four times: a-5433-c a-5433-d b-5433-c b-5433-d
- --host=a,b --host=foo --port=1234 --port=5433 --db=e,f
- Connects six times: a-1234-e a-1234-f b-1234-e b-1234-f foo-5433-e foo-5433-f
+--host=a,b --host=foo --port=1234 --port=5433 --db=e,f
+Connects six times: a-1234-e a-1234-f b-1234-e b-1234-f foo-5433-e foo-5433-f
- --host=a,b --host=x --port=5432,5433 --dbuser=alice --dbuser=bob -db=baz
- Connects three times: a-5432-alice-baz b-5433-alice-baz x-5433-bob-baz
+--host=a,b --host=x --port=5432,5433 --dbuser=alice --dbuser=bob -db=baz
+Connects three times: a-5432-alice-baz b-5433-alice-baz x-5433-bob-baz
- --dbservice="foo" --port=5433
- Connects using the named service 'foo' in the pg_service.conf file, but overrides the port
+--dbservice="foo" --port=5433
+Connects using the named service 'foo' in the pg_service.conf file, but overrides the port
Example:
- postgres@db$./check_postgres.pl --action=version --warning=8.1 --datadir /var/lib/postgresql/8.3/main/ --assume-standby-mode
- POSTGRES_VERSION OK: Server in standby mode | time=0.00
+postgres@db$./check_postgres.pl --action=version --warning=8.1 --datadir /var/lib/postgresql/8.3/main/ --assume-standby-mode
+POSTGRES_VERSION OK: Server in standby mode | time=0.00
Example:
- postgres@db$./check_postgres.pl --action=checkpoint --datadir /var/lib/postgresql/8.3/main/ --assume-prod
- POSTGRES_CHECKPOINT OK: Last checkpoint was 72 seconds ago | age=72;;300 mode=MASTER
+postgres@db$./check_postgres.pl --action=checkpoint --datadir /var/lib/postgresql/8.3/main/ --assume-prod
+POSTGRES_CHECKPOINT OK: Last checkpoint was 72 seconds ago | age=72;;300 mode=MASTER
Allows specification of the method used to fetch information for the new_version_cp
, new_version_pg
, new_version_bc
, new_version_box
, and new_version_tnm
checks. The following programs are tried, in order, to grab the information from the web: GET, wget, fetch, curl, lynx, links. To force the use of just one (and thus remove the overhead of trying all the others until one of those works), enter one of the names as the argument to get_method. For example, a BSD box might enter the following line in their .check_postgresrc
file:
get_method=fetch
+get_method=fetch
The action to be run is selected using the --action flag, or by using a symlink to the main file that contains the name of the action inside of it. For example, to run the action "timesync", you may either issue:
- check_postgres.pl --action=timesync
+check_postgres.pl --action=timesync
or use a program named:
- check_postgres_timesync
+check_postgres_timesync
All the symlinks are created for you in the current directory if use the option --symlinks:
- perl check_postgres.pl --symlinks
+perl check_postgres.pl --symlinks
If the file name already exists, it will not be overwritten. If the file exists and is a symlink, you can force it to overwrite by using "--action=build_symlinks_force".
@@ -452,19 +454,19 @@To avoid running as a database superuser, a wrapper function around pg_ls_dir()
should be defined as a superuser with SECURITY DEFINER, and the --lsfunc option used. This example function, if defined by a superuser, will allow the script to connect as a normal user nagios with --lsfunc=ls_archive_status_dir
BEGIN;
- CREATE FUNCTION ls_archive_status_dir()
- RETURNS SETOF TEXT
- AS $$ SELECT pg_ls_dir('pg_xlog/archive_status') $$
- LANGUAGE SQL
- SECURITY DEFINER;
- REVOKE ALL ON FUNCTION ls_archive_status_dir() FROM PUBLIC;
- GRANT EXECUTE ON FUNCTION ls_archive_status_dir() to nagios;
- COMMIT;
+BEGIN;
+CREATE FUNCTION ls_archive_status_dir()
+ RETURNS SETOF TEXT
+ AS $$ SELECT pg_ls_dir('pg_xlog/archive_status') $$
+ LANGUAGE SQL
+ SECURITY DEFINER;
+REVOKE ALL ON FUNCTION ls_archive_status_dir() FROM PUBLIC;
+GRANT EXECUTE ON FUNCTION ls_archive_status_dir() to nagios;
+COMMIT;
Example 1: Check that the number of ready WAL files is 10 or less on host "pluto", using a wrapper function ls_archive_status_dir
to avoid the need for superuser permissions
check_postgres_archive_ready --host=pluto --critical=10 --lsfunc=ls_archive_status_dir
+check_postgres_archive_ready --host=pluto --critical=10 --lsfunc=ls_archive_status_dir
For MRTG output, reports the number of ready WAL files on line 1.
@@ -474,7 +476,7 @@Example 1: Give a warning when any databases on port 5432 are above 97%
- check_postgres_autovac_freeze --port=5432 --warning="97%"
+check_postgres_autovac_freeze --port=5432 --warning="97%"
For MRTG output, the highest overall percentage is reported on the first line, and the highest age is reported on the second line. All databases which have the percentage from the first line are reported on the fourth line, separated by a pipe symbol.
@@ -486,19 +488,19 @@Example 1: Give a warning when the number of connections on host quirm reaches 120, and a critical if it reaches 150.
- check_postgres_backends --host=quirm --warning=120 --critical=150
+check_postgres_backends --host=quirm --warning=120 --critical=150
Example 2: Give a critical when we reach 75% of our max_connections setting on hosts lancre or lancre2.
- check_postgres_backends --warning='75%' --critical='75%' --host=lancre,lancre2
+check_postgres_backends --warning='75%' --critical='75%' --host=lancre,lancre2
Example 3: Give a warning when there are only 10 more connection slots left on host plasmid, and a critical when we have only 5 left.
- check_postgres_backends --warning=-10 --critical=-5 --host=plasmid
+check_postgres_backends --warning=-10 --critical=-5 --host=plasmid
Example 4: Check all databases except those with "test" in their name, but allow ones that are named "pg_greatest". Connect as port 5432 on the first two hosts, and as port 5433 on the third one. We want to always throw a critical when we reach 30 or more connections.
- check_postgres_backends --dbhost=hong,kong --dbhost=fooey --dbport=5432 --dbport=5433 --warning=30 --critical=30 --exclude="~test" --include="pg_greatest,~prod"
+check_postgres_backends --dbhost=hong,kong --dbhost=fooey --dbport=5432 --dbport=5433 --warning=30 --critical=30 --exclude="~test" --include="pg_greatest,~prod"
For MRTG output, the number of connections is reported on the first line, and the fourth line gives the name of the database, plus the current maximum_connections. If more than one database has been queried, the one with the highest number of connections is output.
@@ -518,23 +520,23 @@Example 1: Warn if any table on port 5432 is over 100 MB bloated, and critical if over 200 MB
- check_postgres_bloat --port=5432 --warning='100 M' --critical='200 M'
+check_postgres_bloat --port=5432 --warning='100 M' --critical='200 M'
Example 2: Give a critical if table 'orders' on host 'sami' has more than 10 megs of bloat
- check_postgres_bloat --host=sami --include=orders --critical='10 MB'
+check_postgres_bloat --host=sami --include=orders --critical='10 MB'
Example 3: Give a critical if table 'q4' on database 'sales' is over 50% bloated
- check_postgres_bloat --db=sales --include=q4 --critical='50%'
+check_postgres_bloat --db=sales --include=q4 --critical='50%'
Example 4: Give a critical any table is over 20% bloated and has over 150 MB of bloat:
- check_postgres_bloat --port=5432 --critical='20% and 150 M'
+check_postgres_bloat --port=5432 --critical='20% and 150 M'
Example 5: Give a critical any table is over 40% bloated or has over 500 MB of bloat:
- check_postgres_bloat --port=5432 --warning='500 M or 40%'
+check_postgres_bloat --port=5432 --warning='500 M or 40%'
For MRTG output, the first line gives the highest number of wasted bytes for the tables, and the second line gives the highest number of wasted bytes for the indexes. The fourth line gives the database name, table name, and index name information. If you want to output the bloat ratio instead (how many times larger the relation is compared to how large it should be), just pass in --mrtg=ratio
.
Example 1: Find the initial identifier
- check_postgres_cluster_id --critical=0 --datadir=/var//lib/postgresql/9.0/main
+check_postgres_cluster_id --critical=0 --datadir=/var//lib/postgresql/9.0/main
Example 2: Make sure the cluster is the same and warn if not, using the result from above.
- check_postgres_cluster_id --critical=5633695740047915135
+check_postgres_cluster_id --critical=5633695740047915135
For MRTG output, returns a 1 or 0 indicating success of failure of the identifier to match. A identifier must be provided as the --mrtg
argument. The fourth line always gives the current identifier.
Example: Warn if any database on host flagg is less than 90% in commitratio, and critical if less then 80%.
- check_postgres_database_commitratio --host=flagg --warning='90%' --critical='80%'
+check_postgres_database_commitratio --host=flagg --warning='90%' --critical='80%'
For MRTG output, returns the percentage of the database with the smallest commitratio on the first line, and the name of the database on the fourth line.
@@ -598,16 +600,16 @@Example 1: Warn if any relation over 100 pages is named "rad", put the number of pages inside the performance data section.
- check_postgres_custom_query --valtype=string -w "rad" --query=
- "SELECT relname AS result, relpages AS pages FROM pg_class WHERE relpages > 100"
+check_postgres_custom_query --valtype=string -w "rad" --query=
+ "SELECT relname AS result, relpages AS pages FROM pg_class WHERE relpages > 100"
Example 2: Give a critical if the "foobar" function returns a number over 5MB:
- check_postgres_custom_query --critical='5MB'--valtype=size --query="SELECT foobar() AS result"
+check_postgres_custom_query --critical='5MB'--valtype=size --query="SELECT foobar() AS result"
Example 2: Warn if the function "snazzo" returns less than 42:
- check_postgres_custom_query --critical=42 --query="SELECT snazzo() AS result" --reverse
+check_postgres_custom_query --critical=42 --query="SELECT snazzo() AS result" --reverse
If you come up with a useful custom_query, consider sending in a patch to this program to make it into a standard action that other people can use.
@@ -621,15 +623,15 @@Example 1: Warn if any database on host flagg is over 1 TB in size, and critical if over 1.1 TB.
- check_postgres_database_size --host=flagg --warning='1 TB' --critical='1.1 t'
+check_postgres_database_size --host=flagg --warning='1 TB' --critical='1.1 t'
Example 2: Give a critical if the database template1 on port 5432 is over 10 MB.
- check_postgres_database_size --port=5432 --include=template1 --warning='10MB' --critical='10MB'
+check_postgres_database_size --port=5432 --include=template1 --warning='10MB' --critical='10MB'
Example 3: Give a warning if any database on host 'tardis' owned by the user 'tom' is over 5 GB
- check_postgres_database_size --host=tardis --includeuser=tom --warning='5 GB' --critical='10 GB'
+check_postgres_database_size --host=tardis --includeuser=tom --warning='5 GB' --critical='10 GB'
For MRTG output, returns the size in bytes of the largest database on the first line, and the name of the database on the fourth line.
@@ -761,13 +763,13 @@Example 1: Grab the stats for a database named "products" on host "willow":
- check_postgres_dbstats --dbhost willow --dbname products
+check_postgres_dbstats --dbhost willow --dbname products
The output returned will be like this (all on one line, not wrapped):
- backends:82 commits:58374408 rollbacks:1651 read:268435543 hit:2920381758 idxscan:310931294 idxtupread:2777040927
- idxtupfetch:1840241349 idxblksread:62860110 idxblkshit:1107812216 seqscan:5085305 seqtupread:5370500520
- ret:0 fetch:0 ins:0 upd:0 del:0 dbname:willow
+backends:82 commits:58374408 rollbacks:1651 read:268435543 hit:2920381758 idxscan:310931294 idxtupread:2777040927
+idxtupfetch:1840241349 idxblksread:62860110 idxblkshit:1107812216 seqscan:5085305 seqtupread:5370500520
+ret:0 fetch:0 ins:0 upd:0 del:0 dbname:willow
Example 1: Make sure that there are no disabled triggers
- check_postgres_disabled_triggers
+check_postgres_disabled_triggers
For MRTG output, returns the number of disabled triggers on the first line.
@@ -797,19 +799,19 @@Example 1: Make sure that no file system is over 90% for the database on port 5432.
- check_postgres_disk_space --port=5432 --warning='90%' --critical='90%'
+check_postgres_disk_space --port=5432 --warning='90%' --critical='90%'
Example 2: Check that all file systems starting with /dev/sda are smaller than 10 GB and 11 GB (warning and critical)
- check_postgres_disk_space --port=5432 --warning='10 GB' --critical='11 GB' --include="~^/dev/sda"
+check_postgres_disk_space --port=5432 --warning='10 GB' --critical='11 GB' --include="~^/dev/sda"
Example 4: Make sure that no file system is both over 50% and has over 15 GB
- check_postgres_disk_space --critical='50% and 15 GB'
+check_postgres_disk_space --critical='50% and 15 GB'
Example 5: Issue a warning if any file system is either over 70% full or has more than 1T
- check_postgres_disk_space --warning='1T or 75'
+check_postgres_disk_space --warning='1T or 75'
For MRTG output, returns the size in bytes of the file system on the first line, and the name of the file system on the fourth line.
@@ -819,7 +821,7 @@Example 1: Give a warning when our cluster has used up 76% of the free-space pageslots, with pg_freespacemap installed in database robert
- check_postgres_fsm_pages --dbname=robert --warning="76%"
+check_postgres_fsm_pages --dbname=robert --warning="76%"
While you need to pass in the name of the database where pg_freespacemap is installed, you only need to run this check once per cluster. Also, checking this information does require obtaining special locks on the free-space-map, so it is recommend you do not run this check with short intervals.
@@ -831,7 +833,7 @@Example 1: Give a warning when our cluster has used up 80% of the free-space relations, with pg_freespacemap installed in database dylan
- check_postgres_fsm_relations --dbname=dylan --warning="75%"
+check_postgres_fsm_relations --dbname=dylan --warning="75%"
While you need to pass in the name of the database where pg_freespacemap is installed, you only need to run this check once per cluster. Also, checking this information does require obtaining special locks on the free-space-map, so it is recommend you do not run this check with short intervals.
@@ -845,7 +847,7 @@Example: Warn if any database on host flagg is less than 90% in hitratio, and critical if less then 80%.
- check_postgres_hitratio --host=flagg --warning='90%' --critical='80%'
+check_postgres_hitratio --host=flagg --warning='90%' --critical='80%'
For MRTG output, returns the percentage of the database with the smallest hitratio on the first line, and the name of the database on the fourth line.
@@ -861,15 +863,15 @@Example 1: Warn a database with a local replica on port 5433 is behind on any xlog replay at all
- check_hot_standby_delay --dbport=5432,5433 --warning='1'
+check_hot_standby_delay --dbport=5432,5433 --warning='1'
Example 2: Give a critical if the last transaction replica1 receives is more than 10 minutes ago
- check_hot_standby_delay --dbhost=master,replica1 --critical='10 min'
+check_hot_standby_delay --dbhost=master,replica1 --critical='10 min'
Example 3: Allow replica1 to be 1 WAL segment behind, if the master is momentarily seeing more activity than the streaming replication connection can handle, or 10 minutes behind, if the master is seeing very little activity and not processing any transactions, but not both, which would indicate a lasting problem with the replication connection.
- check_hot_standby_delay --dbhost=master,replica1 --warning='1048576 and 2 min' --critical='16777216 and 10 min'
+check_hot_standby_delay --dbhost=master,replica1 --warning='1048576 and 2 min' --critical='16777216 and 10 min'
Example 1: Give a critical if any table is larger than 600MB on host burrick.
- check_postgres_table_size --critical='600 MB' --warning='600 MB' --host=burrick
+check_postgres_table_size --critical='600 MB' --warning='600 MB' --host=burrick
Example 2: Warn if the table products is over 4 GB in size, and give a critical at 4.5 GB.
- check_postgres_table_size --host=burrick --warning='4 GB' --critical='4.5 GB' --include=products
+check_postgres_table_size --host=burrick --warning='4 GB' --critical='4.5 GB' --include=products
Example 3: Warn if any index not owned by postgres goes over 500 MB.
- check_postgres_index_size --port=5432 --excludeuser=postgres -w 500MB -c 600MB
+check_postgres_index_size --port=5432 --excludeuser=postgres -w 500MB -c 600MB
For MRTG output, returns the size in bytes of the largest relation, and the name of the database and relation as the fourth line.
@@ -929,11 +931,11 @@Example 1: Warn if any table has not been vacuumed in 3 days, and give a critical at a week, for host wormwood
- check_postgres_last_vacuum --host=wormwood --warning='3d' --critical='7d'
+check_postgres_last_vacuum --host=wormwood --warning='3d' --critical='7d'
Example 2: Same as above, but skip tables belonging to the users 'eve' or 'mallory'
- check_postgres_last_vacuum --host=wormwood --warning='3d' --critical='7d' --excludeuser=eve,mallory
+check_postgres_last_vacuum --host=wormwood --warning='3d' --critical='7d' --excludeuser=eve,mallory
For MRTG output, returns (on the first line) the LEAST amount of time in seconds since a table was last vacuumed or analyzed. The fourth line returns the name of the database and name of the table.
@@ -943,11 +945,11 @@Example 1: Give a warning if nobody is listening for the string bucardo_mcp_ping on ports 5555 and 5556
- check_postgres_listener --port=5555,5556 --warning=bucardo_mcp_ping
+check_postgres_listener --port=5555,5556 --warning=bucardo_mcp_ping
Example 2: Give a critical if there are no active LISTEN requests matching 'grimm' on database oskar
- check_postgres_listener --db oskar --critical=~grimm
+check_postgres_listener --db oskar --critical=~grimm
For MRTG output, returns a 1 or a 0 on the first, indicating success or failure. The name of the notice must be provided via the --mrtg option.
@@ -959,25 +961,37 @@Example 1: Warn if the number of locks is 100 or more, and critical if 200 or more, on host garrett
- check_postgres_locks --host=garrett --warning=100 --critical=200
+check_postgres_locks --host=garrett --warning=100 --critical=200
Example 2: On the host artemus, warn if 200 or more locks exist, and give a critical if over 250 total locks exist, or if over 20 exclusive locks exist, or if over 5 connections are waiting for a lock.
- check_postgres_locks --host=artemus --warning=200 --critical="total=250:waiting=5:exclusive=20"
+check_postgres_locks --host=artemus --warning=200 --critical="total=250:waiting=5:exclusive=20"
For MRTG output, returns the number of locks on the first line, and the name of the database on the fourth line.
+(symlink: check_postgres_lockwait
) Check if there are blocking blocks and for how long. There is no need to run this more than once per database cluster. Databases can be filtered with the --include and --exclude options. See the "BASIC FILTERING" section for more details.
The --warning and --critical options is time, which represent the time for which the lock has been blocking.
+ +Example 1: Warn if a lock has been blocking for more than a minute, critcal if for more than 2 minutes
+ +check_postgres_lockwait --host=garrett --warning='1 min' --critical='2 min'
+
+For MRTG output, returns the number of blocked sessions.
+(symlink: check_postgres_logfile
) Ensures that the logfile is in the expected location and is being logged to. This action issues a command that throws an error on each database it is checking, and ensures that the message shows up in the logs. It scans the various log_* settings inside of Postgres to figure out where the logs should be. If you are using syslog, it does a rough (but not foolproof) scan of /etc/syslog.conf. Alternatively, you can provide the name of the logfile with the --logfile option. This is especially useful if the logs have a custom rotation scheme driven be an external program. The --logfile option supports the following escape characters: %Y %m %d %H
, which represent the current year, month, date, and hour respectively. An error is always reported as critical unless the warning option has been passed in as a non-zero value. Other than that specific usage, the --warning
and --critical
options should not be used.
Example 1: On port 5432, ensure the logfile is being written to the file /home/greg/pg8.2.log
- check_postgres_logfile --port=5432 --logfile=/home/greg/pg8.2.log
+check_postgres_logfile --port=5432 --logfile=/home/greg/pg8.2.log
Example 2: Same as above, but raise a warning, not a critical
- check_postgres_logfile --port=5432 --logfile=/home/greg/pg8.2.log -w 1
+check_postgres_logfile --port=5432 --logfile=/home/greg/pg8.2.log -w 1
For MRTG output, returns a 1 or 0 on the first line, indicating success or failure. In case of a failure, the fourth line will provide more detail on the failure encountered.
@@ -1001,6 +1015,10 @@(symlink: check_postgres_new_version_tnm
) Checks if a newer version of the tail_n_mail program is available. The current version is obtained by running tail_n_mail --version
. If a major upgrade is available, a warning is returned. If a revision upgrade is available, a critical is returned. (tail_n_mail is a log monitoring tool that can send mail when interesting events appear in your Postgres logs. See: https://bucardo.org/tail_n_mail/ for more information). See also the information on the --get_method
option.
(symlink: check_postgres_partman_premake
) Checks if all partitions that pg_parman's maintenance routine should have created are actually present. Monthly and daily intervals are supported.
Example 1: Give a warning when the number of connections on host quirm reaches 120, and a critical if it reaches 150.
- check_postgres_pgbouncer_backends --host=quirm --warning=120 --critical=150 -p 6432 -u pgbouncer
+check_postgres_pgbouncer_backends --host=quirm --warning=120 --critical=150 -p 6432 -u pgbouncer
Example 2: Give a critical when we reach 75% of our max_connections setting on hosts lancre or lancre2.
- check_postgres_pgbouncer_backends --warning='75%' --critical='75%' --host=lancre,lancre2 -p 6432 -u pgbouncer
+check_postgres_pgbouncer_backends --warning='75%' --critical='75%' --host=lancre,lancre2 -p 6432 -u pgbouncer
Example 3: Give a warning when there are only 10 more connection slots left on host plasmid, and a critical when we have only 5 left.
- check_postgres_pgbouncer_backends --warning=-10 --critical=-5 --host=plasmid -p 6432 -u pgbouncer
+check_postgres_pgbouncer_backends --warning=-10 --critical=-5 --host=plasmid -p 6432 -u pgbouncer
For MRTG output, the number of connections is reported on the first line, and the fourth line gives the name of the database, plus the current max_client_conn. If more than one database has been queried, the one with the highest number of connections is output.
@@ -1049,11 +1067,11 @@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
+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
+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 --mrtg
argument. The fourth line always gives the current checksum.
Example 1: Give a critical if any transaction has been open for more than 10 minutes:
- check_postgres_pgbouncer_maxwait -p 6432 -u pgbouncer --critical='10 minutes'
+check_postgres_pgbouncer_maxwait -p 6432 -u pgbouncer --critical='10 minutes'
For MRTG output, returns the maximum time in seconds a transaction has been open on the first line. The fourth line gives the name of the database.
@@ -1077,15 +1095,15 @@Example 1: Give a critical when any jobs executed in the last day have failed.
- check_postgres_pgagent_jobs --critical=1d
+check_postgres_pgagent_jobs --critical=1d
Example 2: Give a warning when any jobs executed in the last week have failed.
- check_postgres_pgagent_jobs --warning=7d
+check_postgres_pgagent_jobs --warning=7d
Example 3: Give a critical for jobs that have failed in the last 2 hours and a warning for jobs that have failed in the last 4 hours:
- check_postgres_pgagent_jobs --critical=2h --warning=4h
+check_postgres_pgagent_jobs --critical=2h --warning=4h
Example 1: Give a warning on detecting any prepared transactions:
- check_postgres_prepared_txns -w 0
+check_postgres_prepared_txns -w 0
Example 2: Give a critical if any prepared transaction has been open longer than 10 seconds, but allow up to 360 seconds for the database 'shrike':
- check_postgres_prepared_txns --critical=10 --exclude=shrike
- check_postgres_prepared_txns --critical=360 --include=shrike
+check_postgres_prepared_txns --critical=10 --exclude=shrike
+check_postgres_prepared_txns --critical=360 --include=shrike
For MRTG output, returns the number of seconds the oldest transaction has been open as the first line, and which database is came from as the final line.
@@ -1108,7 +1126,7 @@Example 1: Give a critical if the function named "speedtest" fails to run in 10 seconds or less.
- check_postgres_query_runtime --queryname='speedtest()' --critical=10 --warning=10
+check_postgres_query_runtime --queryname='speedtest()' --critical=10 --warning=10
For MRTG output, reports the time in seconds for the query to complete on the first line. The fourth line lists the database.
@@ -1122,15 +1140,15 @@Example 1: Give a warning if any query has been running longer than 3 minutes, and a critical if longer than 5 minutes.
- check_postgres_query_time --port=5432 --warning='3 minutes' --critical='5 minutes'
+check_postgres_query_time --port=5432 --warning='3 minutes' --critical='5 minutes'
Example 2: Using default values (2 and 5 minutes), check all databases except those starting with 'template'.
- check_postgres_query_time --port=5432 --exclude=~^template
+check_postgres_query_time --port=5432 --exclude=~^template
Example 3: Warn if user 'don' has a query running over 20 seconds
- check_postgres_query_time --port=5432 --includeuser=don --warning=20s
+check_postgres_query_time --port=5432 --includeuser=don --warning=20s
For MRTG output, returns the length in seconds of the longest running query on the first line. The fourth line gives the name of the database.
@@ -1144,13 +1162,13 @@Example 1: Slony is replicating a table named 'orders' from host 'alpha' to host 'beta', in the database 'sales'. The primary key of the table is named id, and we are going to test the row with an id of 3 (which is historical and never changed). There is a column named 'salesrep' that we are going to toggle from a value of 'slon' to 'nols' to check on the replication. We want to throw a warning if the replication does not happen within 10 seconds.
- check_postgres_replicate_row --host=alpha --dbname=sales --host=beta
- --dbname=sales --warning=10 --repinfo=orders,id,3,salesrep,slon,nols
+check_postgres_replicate_row --host=alpha --dbname=sales --host=beta
+--dbname=sales --warning=10 --repinfo=orders,id,3,salesrep,slon,nols
Example 2: Bucardo is replicating a table named 'receipt' from host 'green' to hosts 'red', 'blue', and 'yellow'. The database for both sides is 'public'. The slave databases are running on port 5455. The primary key is named 'receipt_id', the row we want to use has a value of 9, and the column we want to change for the test is called 'zone'. We'll toggle between 'north' and 'south' for the value of this column, and throw a critical if the change is not on all three slaves within 5 seconds.
- check_postgres_replicate_row --host=green --port=5455 --host=red,blue,yellow
- --critical=5 --repinfo=receipt,receipt_id,9,zone,north,south
+check_postgres_replicate_row --host=green --port=5455 --host=red,blue,yellow
+ --critical=5 --repinfo=receipt,receipt_id,9,zone,north,south
For MRTG output, returns on the first line the time in seconds the replication takes to finish. The maximum time is set to 4 minutes 30 seconds: if no replication has taken place in that long a time, an error is thrown.
@@ -1160,7 +1178,7 @@Warning and critical are total bytes retained for the slot. E.g:
- check_postgres_replication_slots --port=5432 --host=yellow -warning=32M -critical=64M
+check_postgres_replication_slots --port=5432 --host=yellow -warning=32M -critical=64M
Specific named slots can be monitored using --include/--exclude
@@ -1232,32 +1250,32 @@Example 1: Verify that two databases on hosts star and line are the same:
- check_postgres_same_schema --dbhost=star,line
+check_postgres_same_schema --dbhost=star,line
Example 2: Same as before, but exclude any triggers with "slony" in their name
- check_postgres_same_schema --dbhost=star,line --filter="notrigger=slony"
+check_postgres_same_schema --dbhost=star,line --filter="notrigger=slony"
Example 3: Same as before, but also exclude all indexes
- check_postgres_same_schema --dbhost=star,line --filter="notrigger=slony noindexes"
+check_postgres_same_schema --dbhost=star,line --filter="notrigger=slony noindexes"
Example 4: Check differences for the database "battlestar" on different ports
- check_postgres_same_schema --dbname=battlestar --dbport=5432,5544
+check_postgres_same_schema --dbname=battlestar --dbport=5432,5544
Example 5: Create a daily and weekly snapshot file
- check_postgres_same_schema --dbname=cylon --suffix=daily
- check_postgres_same_schema --dbname=cylon --suffix=weekly
+check_postgres_same_schema --dbname=cylon --suffix=daily
+check_postgres_same_schema --dbname=cylon --suffix=weekly
Example 6: Run a historical comparison, then replace the file
- check_postgres_same_schema --dbname=cylon --suffix=daily --replace
+check_postgres_same_schema --dbname=cylon --suffix=daily --replace
Example 7: Verify that two databases on hosts star and line are the same, excluding value data (i.e. sequence last_val):
- check_postgres_same_schema --dbhost=star,line --assume-async
+check_postgres_same_schema --dbhost=star,line --assume-async
Example 1: Give a warning if any sequences are approaching 95% full.
- check_postgres_sequence --dbport=5432 --warning=95%
+check_postgres_sequence --dbport=5432 --warning=95%
Example 2: Check that the sequence named "orders_id_seq" is not more than half full.
- check_postgres_sequence --dbport=5432 --critical=50% --include=orders_id_seq
+check_postgres_sequence --dbport=5432 --critical=50% --include=orders_id_seq
Example 1: Find the initial checksum for the database on port 5555 using the default user (usually postgres)
- check_postgres_settings_checksum --port=5555 --critical=0
+check_postgres_settings_checksum --port=5555 --critical=0
Example 2: Make sure no settings have changed and warn if so, using the checksum from above.
- check_postgres_settings_checksum --port=5555 --warning=cd2f3b5e129dc2b4f5c0f6d8d2e64231
+check_postgres_settings_checksum --port=5555 --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 --mrtg
argument. The fourth line always gives the current checksum.
Example 1: Give a warning if any Slony is lagged by more than 20 seconds
- check_postgres_slony_status --warning 20
+check_postgres_slony_status --warning 20
Example 2: Give a critical if Slony, installed under the schema "_slony", is over 10 minutes lagged
- check_postgres_slony_status --schema=_slony --critical=600
+check_postgres_slony_status --schema=_slony --critical=600
Example 1: Check that databases on hosts ankh, morpork, and klatch are no more than 3 seconds off from the local time:
- check_postgres_timesync --host=ankh,morpork,klatch --critical=3
+check_postgres_timesync --host=ankh,morpork,klatch --critical=3
For MRTG output, returns one the first line the number of seconds difference between the local time and the database time. The fourth line returns the name of the database.
@@ -1329,15 +1347,15 @@Example 1: Give a warning if any connection has been idle in transaction for more than 15 seconds:
- check_postgres_txn_idle --port=5432 --warning='15 seconds'
+check_postgres_txn_idle --port=5432 --warning='15 seconds'
Example 2: Give a warning if there are 50 or more transactions
- check_postgres_txn_idle --port=5432 --warning='+50'
+check_postgres_txn_idle --port=5432 --warning='+50'
Example 3: Give a critical if 5 or more connections have been idle in transaction for more than 10 seconds:
- check_postgres_txn_idle --port=5432 --critical='5 for 10 seconds'
+check_postgres_txn_idle --port=5432 --critical='5 for 10 seconds'
For MRTG output, returns the time in seconds the longest idle transaction has been running. The fourth line returns the name of the database and other information about the longest transaction.
@@ -1351,11 +1369,11 @@Example 1: Give a critical if any transaction has been open for more than 10 minutes:
- check_postgres_txn_time --port=5432 --critical='10 minutes'
+check_postgres_txn_time --port=5432 --critical='10 minutes'
Example 1: Warn if user 'warehouse' has a transaction open over 30 seconds
- check_postgres_txn_time --port-5432 --warning=30s --includeuser=warehouse
+check_postgres_txn_time --port-5432 --warning=30s --includeuser=warehouse
For MRTG output, returns the maximum time in seconds a transaction has been open on the first line. The fourth line gives the name of the database.
@@ -1367,11 +1385,11 @@Example 1: Check the default values for the localhost database
- check_postgres_txn_wraparound --host=localhost
+check_postgres_txn_wraparound --host=localhost
Example 2: Check port 6000 and give a critical when 1.7 billion transactions are hit:
- check_postgres_txn_wraparound --port=6000 --critical=1_700_000_000
+check_postgres_txn_wraparound --port=6000 --critical=1_700_000_000
For MRTG output, returns the highest number of transactions for all databases on line one, while line 4 indicates which database it is.
@@ -1381,11 +1399,11 @@Example 1: Give a warning if the database on port 5678 is not version 8.4.10:
- check_postgres_version --port=5678 -w=8.4.10
+check_postgres_version --port=5678 -w=8.4.10
Example 2: Give a warning if any databases on hosts valley,grain, or sunshine is not 8.3:
- check_postgres_version -H valley,grain,sunshine --critical=8.3
+check_postgres_version -H valley,grain,sunshine --critical=8.3
For MRTG output, reports a 1 or a 0 indicating success or failure on the first line. The fourth line indicates the current version. The version must be provided via the --mrtg
option.
To avoid connecting as a database superuser, a wrapper function around pg_ls_dir()
should be defined as a superuser with SECURITY DEFINER, and the --lsfunc option used. This example function, if defined by a superuser, will allow the script to connect as a normal user nagios with --lsfunc=ls_xlog_dir
BEGIN;
- CREATE FUNCTION ls_xlog_dir()
- RETURNS SETOF TEXT
- AS $$ SELECT pg_ls_dir('pg_xlog') $$
- LANGUAGE SQL
- SECURITY DEFINER;
- REVOKE ALL ON FUNCTION ls_xlog_dir() FROM PUBLIC;
- GRANT EXECUTE ON FUNCTION ls_xlog_dir() to nagios;
- COMMIT;
+BEGIN;
+CREATE FUNCTION ls_xlog_dir()
+ RETURNS SETOF TEXT
+ AS $$ SELECT pg_ls_dir('pg_xlog') $$
+ LANGUAGE SQL
+ SECURITY DEFINER;
+REVOKE ALL ON FUNCTION ls_xlog_dir() FROM PUBLIC;
+GRANT EXECUTE ON FUNCTION ls_xlog_dir() to nagios;
+COMMIT;
Example 1: Check that the number of ready WAL files is 10 or less on host "pluto", using a wrapper function ls_xlog_dir
to avoid the need for superuser permissions
check_postgres_archive_ready --host=pluto --critical=10 --lsfunc=ls_xlog_dir
+check_postgres_archive_ready --host=pluto --critical=10 --lsfunc=ls_xlog_dir
For MRTG output, reports the number of WAL files on line 1.
@@ -1433,39 +1451,39 @@Only checks items named pg_class:
- --include=pg_class
+--include=pg_class
Only checks items containing the letters 'pg_':
- --include=~pg_
+--include=~pg_
Only check items beginning with 'pg_':
- --include=~^pg_
+--include=~^pg_
Exclude the item named 'test':
- --exclude=test
+--exclude=test
Exclude all items containing the letters 'test:
- --exclude=~test
+--exclude=~test
Exclude all items in the schema 'pg_catalog':
- --exclude='pg_catalog.'
+--exclude='pg_catalog.'
Exclude all items in the 'pg_temp_nnn' per-session temporary schemas:
- --exclude=~^pg_temp_.
+--exclude=~^pg_temp_.
Exclude all items containing the letters 'ace', but allow the item 'faceoff':
- --exclude=~ace --include=faceoff
+--exclude=~ace --include=faceoff
Exclude all items which start with the letters 'pg_', which contain the letters 'slon', or which are named 'sql_settings' or 'green'. Specifically check items with the letters 'prod' in their names, and always check the item named 'pg_relname':
- --exclude=~^pg_,~slon,sql_settings --exclude=green --include=~prod,pg_relname
+--exclude=~^pg_,~slon,sql_settings --exclude=green --include=~prod,pg_relname
Only check items owned by the user named greg:
- --includeuser=greg
+--includeuser=greg
Only check items owned by either watson or crick:
- --includeuser=watson,crick
+--includeuser=watson,crick
Only check items owned by crick,franklin, watson, or wilkins:
- --includeuser=watson --includeuser=franklin --includeuser=crick,wilkins
+--includeuser=watson --includeuser=franklin --includeuser=crick,wilkins
Check all items except for those belonging to the user scott:
- --excludeuser=scott
+--excludeuser=scott
Development happens using the git system. You can clone the latest version by doing:
- https://github.com/bucardo/check_postgres
- git clone git://bucardo.org/check_postgres.git
+https://github.com/bucardo/check_postgres
+git clone https://github.com/bucardo/check_postgres.git
Three mailing lists are available. For discussions about the program, bug reports, feature requests, and commit notices, send email to check_postgres@bucardo.org
-https://mail.endcrypt.com/mailman/listinfo/check_postgres
+https://bucardo.org/mailman/listinfo/check_postgres
A low-volume list for announcement of new versions and important notices is the 'check_postgres-announce' list:
-https://mail.endcrypt.com/mailman/listinfo/check_postgres-announce
- -Source code changes (via git-commit) are sent to the 'check_postgres-commit' list:
- -https://mail.endcrypt.com/mailman/listinfo/check_postgres-commit
+https://bucardo.org/mailman/listinfo/check_postgres-announce
Add new action "pgbouncer_maxwait" (Ruslan Kabalin) [Github pull #59]
+Add new action "lockwait" showing details of blocked queries
+(Github user miraclesvenni)
+[Github issue #154]
+
+Raise minimum version or Perl to 5.10.0
+
+Allow commas in passwords via --dbpass for one-connection queries (Greg Sabino Mullane) [Github issue #133]
+
+Fix undefined variable error (Greg Sabino Mullane) [Github issue #141]
+
+
Add new action "pgbouncer_maxwait" (Ruslan Kabalin) [Github pull #59]
+
+For the bloat check, add option to populate all known databases,
+ as well as includsion and exclusion regexes. (Giles Westwood) [Github pull #86]
+
+Add Partman premake check (Jens Wilke) [Github pull #196]
+
+Add --role flag to explicitly set the role of the user after connecting (David Christensen)
- Fix check_replication_slots on recently promoted servers (Christoph Berg)
+Fix check_replication_slots on recently promoted servers (Christoph Berg)
- Allow the check_disk_space action to handle relative log_directory paths (jacksonfoz) [Github pull #174]
+Allow the check_disk_space action to handle relative log_directory paths (jacksonfoz) [Github pull #174]
- Fix MINPAGES and MINIPAGES in the "check_bloat" action (Christoph Moench-Tegeder) [Github pull #82]
+Fix MINPAGES and MINIPAGES in the "check_bloat" action (Christoph Moench-Tegeder) [Github pull #82]
- Replace 'which' with 'command -v' (Christoph Berg)
+Replace 'which' with 'command -v' (Christoph Berg)
- Fix check_replication_slots on recently promoted servers (Christoph Berg)
+Fix check_replication_slots on recently promoted servers (Christoph Berg)
- Add --role flag to explicitly set the role of the user after connecting (David Christensen)
+Fix undefined variable warning (Michael van Bracht) [Github pull #158]
- Add Partman premake check (Jens Wilke) [Github pull #196]
+In the tests, force log_destination to stderr (Christoph Moench-Tegeder) [Github pull #185]
- Add to docs how to exclude all items in the 'pg_temp_nnn' per-session temporary schemas (Michael Banck)
+Add to docs how to exclude all items in the 'pg_temp_nnn' per-session temporary schemas (Michael Banck)
- Various fixes for the CI system (Emre Hasegeli) [Github pull #181]
+Various fixes for the CI system (Emre Hasegeli) [Github pull #181]
- Various improvements to the tests (Christoph Berg, Emre Hasegeli)
+Various improvements to the tests (Christoph Berg, Emre Hasegeli)
Allow same_schema objects to be included or excluded with --object and --skipobject
- (Greg Sabino Mullane)
+Allow same_schema objects to be included or excluded with --object and --skipobject
+ (Greg Sabino Mullane)
- Fix to allow mixing service names and other connection parameters for same_schema
- (Greg Sabino Mullane)
+Fix to allow mixing service names and other connection parameters for same_schema
+ (Greg Sabino Mullane)
Support new_version_pg for PG10
- (Michael Pirogov)
+Support new_version_pg for PG10
+ (Michael Pirogov)
- Option to skip CYCLE sequences in action sequence
- (Christoph Moench-Tegeder)
+Option to skip CYCLE sequences in action sequence
+ (Christoph Moench-Tegeder)
- Output per-database perfdata for pgbouncer pool checks
- (George Hansper)
+Output per-database perfdata for pgbouncer pool checks
+ (George Hansper)
- German message translations
- (Holger Jacobs)
+German message translations
+ (Holger Jacobs)
- Consider only client backends in query_time and friends
- (David Christensen)
+Consider only client backends in query_time and friends
+ (David Christensen)
Support PostgreSQL 10.
- (David Christensen, Christoph Berg)
+Support PostgreSQL 10.
+ (David Christensen, Christoph Berg)
- Change table_size to use pg_table_size() on 9.0+, i.e. include the TOAST
- table size in the numbers reported. Add new actions indexes_size and
- total_relation_size, using the respective pg_indexes_size() and
- pg_total_relation_size() functions. All size checks will now also check
- materialized views where applicable.
- (Christoph Berg)
+Change table_size to use pg_table_size() on 9.0+, i.e. include the TOAST
+table size in the numbers reported. Add new actions indexes_size and
+total_relation_size, using the respective pg_indexes_size() and
+pg_total_relation_size() functions. All size checks will now also check
+materialized views where applicable.
+ (Christoph Berg)
- Connection errors are now always critical, not unknown.
- (Christoph Berg)
+Connection errors are now always critical, not unknown.
+ (Christoph Berg)
- New action replication_slots checking if logical or physical replication
- slots have accumulated too much data
- (Glyn Astill)
+New action replication_slots checking if logical or physical replication
+slots have accumulated too much data
+ (Glyn Astill)
- Multiple same_schema improvements
- (Glyn Astill)
+Multiple same_schema improvements
+ (Glyn Astill)
- Add Spanish message translations
- (Luis Vazquez)
+Add Spanish message translations
+ (Luis Vazquez)
- Allow a wrapper function to run wal_files and archive_ready actions as
- non-superuser
- (Joshua Elsasser)
+Allow a wrapper function to run wal_files and archive_ready actions as
+non-superuser
+ (Joshua Elsasser)
- Add some defensive casting to the bloat query
- (Greg Sabino Mullane)
+Add some defensive casting to the bloat query
+ (Greg Sabino Mullane)
- Invoke psql with option -X
- (Peter Eisentraut)
+Invoke psql with option -X
+ (Peter Eisentraut)
- Update postgresql.org URLs to use https.
- (Magnus Hagander)
+Update postgresql.org URLs to use https.
+ (Magnus Hagander)
- check_txn_idle: Don't fail when query contains 'disabled' word
- (Marco Nenciarini)
+check_txn_idle: Don't fail when query contains 'disabled' word
+ (Marco Nenciarini)
- check_txn_idle: Use state_change instead of query_start.
- (Sebastian Webber)
+check_txn_idle: Use state_change instead of query_start.
+ (Sebastian Webber)
- check_hot_standby_delay: Correct extra space in perfdata
- (Adrien Nayrat)
+check_hot_standby_delay: Correct extra space in perfdata
+ (Adrien Nayrat)
- Remove \r from psql output as it can confuse some regexes
- (Greg Sabino Mullane)
+Remove \r from psql output as it can confuse some regexes
+ (Greg Sabino Mullane)
- Sort failed jobs in check_pgagent_jobs for stable output.
- (Christoph Berg)
+Sort failed jobs in check_pgagent_jobs for stable output.
+ (Christoph Berg)
Add xact timestamp support to hot_standby_delay.
- Allow the hot_standby_delay check to accept xlog byte position or
- timestamp lag intervals as thresholds, or even both at the same time.
- (Josh Williams)
+Add xact timestamp support to hot_standby_delay.
+Allow the hot_standby_delay check to accept xlog byte position or
+timestamp lag intervals as thresholds, or even both at the same time.
+ (Josh Williams)
- Query all sequences per DB in parallel for action=sequence.
- (Christoph Berg)
+Query all sequences per DB in parallel for action=sequence.
+ (Christoph Berg)
- Fix bloat check to use correct SQL depending on the server version.
- (Adrian Vondendriesch)
+Fix bloat check to use correct SQL depending on the server version.
+ (Adrian Vondendriesch)
- Show actual long-running query in query_time output
- (Peter Eisentraut)
+Show actual long-running query in query_time output
+ (Peter Eisentraut)
- Add explicit ORDER BY to the slony_status check to get the most lagged server.
- (Jeff Frost)
+Add explicit ORDER BY to the slony_status check to get the most lagged server.
+ (Jeff Frost)
- Improved multi-slave support in replicate_row.
- (Andrew Yochum)
+Improved multi-slave support in replicate_row.
+ (Andrew Yochum)
- Change the way tables are quoted in replicate_row.
- (Glyn Astill)
+Change the way tables are quoted in replicate_row.
+ (Glyn Astill)
- Don't swallow space before the -c flag when reporting errors
- (Jeff Janes)
+Don't swallow space before the -c flag when reporting errors
+ (Jeff Janes)
- Fix and extend hot_standby_delay documentation
- (Michael Renner)
+Fix and extend hot_standby_delay documentation
+ (Michael Renner)
- Declare POD encoding to be utf8.
- (Christoph Berg)
+Declare POD encoding to be utf8.
+ (Christoph Berg)
Fix issue with SQL steps in check_pgagent_jobs for sql steps which perform deletes
- (Rob Emery via github pull)
+Fix issue with SQL steps in check_pgagent_jobs for sql steps which perform deletes
+ (Rob Emery via github pull)
- Install man page in section 1.
- (Peter Eisentraut, bug 53, github issue 26)
+Install man page in section 1.
+ (Peter Eisentraut, bug 53, github issue 26)
- Order lock types in check_locks output to make the ordering predictable;
- setting SKIP_NETWORK_TESTS will skip the new_version tests; other minor test
- suite fixes.
- (Christoph Berg)
+Order lock types in check_locks output to make the ordering predictable;
+setting SKIP_NETWORK_TESTS will skip the new_version tests; other minor test
+suite fixes.
+ (Christoph Berg)
- Fix same_schema check on 9.3 by ignoring relminmxid differences in pg_class
- (Christoph Berg)
+Fix same_schema check on 9.3 by ignoring relminmxid differences in pg_class
+ (Christoph Berg)
Make connection check failures return CRITICAL not UNKNOWN
- (Dominic Hargreaves)
+Make connection check failures return CRITICAL not UNKNOWN
+ (Dominic Hargreaves)
- Fix --reverse option when using string comparisons in custom queries
- (Nathaniel Waisbrot)
+Fix --reverse option when using string comparisons in custom queries
+ (Nathaniel Waisbrot)
- Compute correct 'totalwastedbytes' in the bloat query
- (Michael Renner)
+Compute correct 'totalwastedbytes' in the bloat query
+ (Michael Renner)
- Do not use pg_stats "inherited" column in bloat query, if the
- database is 8.4 or older. (Greg Sabino Mullane, per bug 121)
+Do not use pg_stats "inherited" column in bloat query, if the
+ database is 8.4 or older. (Greg Sabino Mullane, per bug 121)
- Remove host reordering in hot_standby_delay check
- (Josh Williams, with help from Jacobo Blasco)
+Remove host reordering in hot_standby_delay check
+ (Josh Williams, with help from Jacobo Blasco)
- Better output for the "simple" flag
- (Greg Sabino Mullane)
+Better output for the "simple" flag
+ (Greg Sabino Mullane)
- Force same_schema to ignore the 'relallvisible' column
- (Greg Sabino Mullane)
+Force same_schema to ignore the 'relallvisible' column
+ (Greg Sabino Mullane)
Add check for pgagent jobs (David E. Wheeler)
+Add check for pgagent jobs (David E. Wheeler)
- Force STDOUT to use utf8 for proper output
- (Greg Sabino Mullane; reported by Emmanuel Lesouef)
+Force STDOUT to use utf8 for proper output
+ (Greg Sabino Mullane; reported by Emmanuel Lesouef)
- Fixes for Postgres 9.2: new pg_stat_activity view,
- and use pg_tablespace_location, (Josh Williams)
+Fixes for Postgres 9.2: new pg_stat_activity view,
+ and use pg_tablespace_location, (Josh Williams)
- Allow for spaces in item lists when doing same_schema.
+Allow for spaces in item lists when doing same_schema.
- Allow txn_idle to work again for < 8.3 servers by switching to query_time.
+Allow txn_idle to work again for < 8.3 servers by switching to query_time.
- Fix the check_bloat SQL to take inherited tables into account,
- and assume 2k for non-analyzed columns. (Geert Pante)
+Fix the check_bloat SQL to take inherited tables into account,
+ and assume 2k for non-analyzed columns. (Geert Pante)
- Cache sequence information to speed up same_schema runs.
+Cache sequence information to speed up same_schema runs.
- Fix --excludeuser in check_txn_idle (Mika Eloranta)
+Fix --excludeuser in check_txn_idle (Mika Eloranta)
- Fix user clause handling in check_txn_idle (Michael van Bracht)
+Fix user clause handling in check_txn_idle (Michael van Bracht)
- Adjust docs to show colon as a better separator inside args for locks
- (Charles Sprickman)
+Adjust docs to show colon as a better separator inside args for locks
+ (Charles Sprickman)
- Fix undefined $SQL2 error in check_txn_idle [github issue 16] (Patric Bechtel)
+Fix undefined $SQL2 error in check_txn_idle [github issue 16] (Patric Bechtel)
- Prevent "uninitialized value" warnings when showing the port (Henrik Ahlgren)
+Prevent "uninitialized value" warnings when showing the port (Henrik Ahlgren)
- Do not assume everyone has a HOME [github issue 23]
+Do not assume everyone has a HOME [github issue 23]
Add the --assume-prod option (Cédric Villemain)
+Add the --assume-prod option (Cédric Villemain)
- Add the cluster_id check (Cédric Villemain)
+Add the cluster_id check (Cédric Villemain)
- Improve settings_checksum and checkpoint tests (Cédric Villemain)
+Improve settings_checksum and checkpoint tests (Cédric Villemain)
- Do not do an inner join to pg_user when checking database size
- (Greg Sabino Mullane; reported by Emmanuel Lesouef)
+Do not do an inner join to pg_user when checking database size
+ (Greg Sabino Mullane; reported by Emmanuel Lesouef)
- Use the full path when getting sequence information for same_schema.
- (Greg Sabino Mullane; reported by Cindy Wise)
+Use the full path when getting sequence information for same_schema.
+ (Greg Sabino Mullane; reported by Cindy Wise)
- Fix the formula for calculating xlog positions (Euler Taveira de Oliveira)
+Fix the formula for calculating xlog positions (Euler Taveira de Oliveira)
- Better ordering of output for bloat check - make indexes as important
- as tables (Greg Sabino Mullane; reported by Jens Wilke)
+Better ordering of output for bloat check - make indexes as important
+ as tables (Greg Sabino Mullane; reported by Jens Wilke)
- Show the dbservice if it was used at top of same_schema output
- (Mike Blackwell)
+Show the dbservice if it was used at top of same_schema output
+ (Mike Blackwell)
- Better installation paths (Greg Sabino Mullane, per bug 53)
+Better installation paths (Greg Sabino Mullane, per bug 53)
Redo the same_schema action. Use new --filter argument for all filtering.
- Allow comparisons between any number of databases.
- Remove the dbname2, dbport2, etc. arguments.
- Allow comparison of the same db over time.
+Redo the same_schema action. Use new --filter argument for all filtering.
+Allow comparisons between any number of databases.
+Remove the dbname2, dbport2, etc. arguments.
+Allow comparison of the same db over time.
- Swap db1 and db2 if the slave is 1 for the hot standby check (David E. Wheeler)
+Swap db1 and db2 if the slave is 1 for the hot standby check (David E. Wheeler)
- Allow multiple --schema arguments for the slony_status action (GSM and Jehan-Guillaume de Rorthais)
+Allow multiple --schema arguments for the slony_status action (GSM and Jehan-Guillaume de Rorthais)
- Fix ORDER BY in the last vacuum/analyze action (Nicolas Thauvin)
+Fix ORDER BY in the last vacuum/analyze action (Nicolas Thauvin)
- Fix check_hot_standby_delay perfdata output (Nicolas Thauvin)
+Fix check_hot_standby_delay perfdata output (Nicolas Thauvin)
- Look in the correct place for the .ready files with the archive_ready action (Nicolas Thauvin)
+Look in the correct place for the .ready files with the archive_ready action (Nicolas Thauvin)
- New action: commitratio (Guillaume Lelarge)
+New action: commitratio (Guillaume Lelarge)
- New action: hitratio (Guillaume Lelarge)
+New action: hitratio (Guillaume Lelarge)
- Make sure --action overrides the symlink naming trick.
+Make sure --action overrides the symlink naming trick.
- Set defaults for archive_ready and wal_files (Thomas Guettler, GSM)
+Set defaults for archive_ready and wal_files (Thomas Guettler, GSM)
- Better output for wal_files and archive_ready (GSM)
+Better output for wal_files and archive_ready (GSM)
- Fix warning when client_port set to empty string (bug #79)
+Fix warning when client_port set to empty string (bug #79)
- Account for "empty row" in -x output (i.e. source of functions).
+Account for "empty row" in -x output (i.e. source of functions).
- Fix some incorrectly named data fields (Andy Lester)
+Fix some incorrectly named data fields (Andy Lester)
- Expand the number of pgbouncer actions (Ruslan Kabalin)
+Expand the number of pgbouncer actions (Ruslan Kabalin)
- Give detailed information and refactor txn_idle, txn_time, and query_time
- (Per request from bug #61)
+Give detailed information and refactor txn_idle, txn_time, and query_time
+ (Per request from bug #61)
- Set maxalign to 8 in the bloat check if box identified as '64-bit'
- (Michel Sijmons, bug #66)
+Set maxalign to 8 in the bloat check if box identified as '64-bit'
+ (Michel Sijmons, bug #66)
- Support non-standard version strings in the bloat check.
- (Michel Sijmons and Gurjeet Singh, bug #66)
+Support non-standard version strings in the bloat check.
+ (Michel Sijmons and Gurjeet Singh, bug #66)
- Do not show excluded databases in some output (Ruslan Kabalin)
+Do not show excluded databases in some output (Ruslan Kabalin)
- Allow "and", "or" inside arguments (David E. Wheeler)
+Allow "and", "or" inside arguments (David E. Wheeler)
- Add the "new_version_box" action.
+Add the "new_version_box" action.
- Fix psql version regex (Peter Eisentraut, bug #69)
+Fix psql version regex (Peter Eisentraut, bug #69)
- Add the --assume-standby-mode option (Ruslan Kabalin)
+Add the --assume-standby-mode option (Ruslan Kabalin)
- Note that txn_idle and query_time require 8.3 (Thomas Guettler)
+Note that txn_idle and query_time require 8.3 (Thomas Guettler)
- Standardize and clean up all perfdata output (bug #52)
+Standardize and clean up all perfdata output (bug #52)
- Exclude "idle in transaction" from the query_time check (bug #43)
+Exclude "idle in transaction" from the query_time check (bug #43)
- Fix the perflimit for the bloat action (bug #50)
+Fix the perflimit for the bloat action (bug #50)
- Clean up the custom_query action a bit.
+Clean up the custom_query action a bit.
- Fix space in perfdata for hot_standby_delay action (Nicolas Thauvin)
+Fix space in perfdata for hot_standby_delay action (Nicolas Thauvin)
- Handle undef percents in check_fsm_relations (Andy Lester)
+Handle undef percents in check_fsm_relations (Andy Lester)
- Fix typo in dbstats action (Stas Vitkovsky)
+Fix typo in dbstats action (Stas Vitkovsky)
- Fix MRTG for last vacuum and last_analyze actions.
+Fix MRTG for last vacuum and last_analyze actions.
Add new action 'hot_standby_delay' (Nicolas Thauvin)
- Add cache-busting for the version-grabbing utilities.
- Fix problem with going to next method for new_version_pg
- (Greg Sabino Mullane, reported by Hywel Mallett in bug #65)
- Allow /usr/local/etc as an alternative location for the
- check_postgresrc file (Hywel Mallett)
- Do not use tgisconstraint in same_schema if Postgres >= 9
- (Guillaume Lelarge)
+Add new action 'hot_standby_delay' (Nicolas Thauvin)
+Add cache-busting for the version-grabbing utilities.
+Fix problem with going to next method for new_version_pg
+ (Greg Sabino Mullane, reported by Hywel Mallett in bug #65)
+Allow /usr/local/etc as an alternative location for the
+ check_postgresrc file (Hywel Mallett)
+Do not use tgisconstraint in same_schema if Postgres >= 9
+ (Guillaume Lelarge)
Fix warning when using symlinks
- (Greg Sabino Mullane, reported by Peter Eisentraut in bug #63)
+Fix warning when using symlinks
+ (Greg Sabino Mullane, reported by Peter Eisentraut in bug #63)
Show OK for no matching txn_idle entries.
+Show OK for no matching txn_idle entries.
Better formatting of sizes in the bloat action output.
+Better formatting of sizes in the bloat action output.
- Remove duplicate perfs in bloat action output.
+Remove duplicate perfs in bloat action output.
Fix problem when examining items in pg_settings (Greg Sabino Mullane)
+Fix problem when examining items in pg_settings (Greg Sabino Mullane)
- For connection test, return critical, not unknown, on FATAL errors
- (Greg Sabino Mullane, reported by Peter Eisentraut in bug #62)
+For connection test, return critical, not unknown, on FATAL errors
+ (Greg Sabino Mullane, reported by Peter Eisentraut in bug #62)
Add --quiet argument to suppress output on OK Nagios results
- Add index comparison for same_schema (Norman Yamada and Greg Sabino Mullane)
- Use $ENV{PGSERVICE} instead of "service=" to prevent problems (Guillaume Lelarge)
- Add --man option to show the entire manual. (Andy Lester)
- Redo the internal run_command() sub to use -x and hashes instead of regexes.
- Fix error in custom logic (Andreas Mager)
- 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)
- Fix to show database properly when using slony_status (Guillaume Lelarge)
- Allow warning items for same_schema to be comma-separated (Guillaume Lelarge)
- Constraint definitions across Postgres versions match better in same_schema.
- Work against "EnterpriseDB" databases (Sivakumar Krishnamurthy and Greg Sabino Mullane)
- Separate perfdata with spaces (Jehan-Guillaume (ioguix) de Rorthais)
- Add new action "archive_ready" (Jehan-Guillaume (ioguix) de Rorthais)
+Add --quiet argument to suppress output on OK Nagios results
+Add index comparison for same_schema (Norman Yamada and Greg Sabino Mullane)
+Use $ENV{PGSERVICE} instead of "service=" to prevent problems (Guillaume Lelarge)
+Add --man option to show the entire manual. (Andy Lester)
+Redo the internal run_command() sub to use -x and hashes instead of regexes.
+Fix error in custom logic (Andreas Mager)
+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)
+Fix to show database properly when using slony_status (Guillaume Lelarge)
+Allow warning items for same_schema to be comma-separated (Guillaume Lelarge)
+Constraint definitions across Postgres versions match better in same_schema.
+Work against "EnterpriseDB" databases (Sivakumar Krishnamurthy and Greg Sabino Mullane)
+Separate perfdata with spaces (Jehan-Guillaume (ioguix) de Rorthais)
+Add new action "archive_ready" (Jehan-Guillaume (ioguix) de Rorthais)
Allow slony_status action to handle more than one slave.
- Use commas to separate function args in same_schema output (Robert Treat)
+Allow slony_status action to handle more than one slave.
+Use commas to separate function args in same_schema output (Robert Treat)
Change autovac_freeze default warn/critical back to 90%/95% (Robert Treat)
- Put all items one-per-line for relation size actions if --verbose=1
+Change autovac_freeze default warn/critical back to 90%/95% (Robert Treat)
+Put all items one-per-line for relation size actions if --verbose=1
Don't use $^T in logfile check, as script may be long-running
- Change the error string for the logfile action for easier exclusion
- by programs like tail_n_mail
+Don't use $^T in logfile check, as script may be long-running
+Change the error string for the logfile action for easier exclusion
+ by programs like tail_n_mail
Added the 'slony_status' action.
- Changed the logfile sleep from 0.5 to 1, as 0.5 gets rounded to 0 on some boxes!
+Added the 'slony_status' action.
+Changed the logfile sleep from 0.5 to 1, as 0.5 gets rounded to 0 on some boxes!
Allow timeout option to be used for logtime 'sleep' time.
+Allow timeout option to be used for logtime 'sleep' time.
Show offending database for query_time action.
- Apply perflimit to main output for sequence action.
- Add 'noowner' option to same_schema action.
- Raise sleep timeout for logfile check to 15 seconds.
+Show offending database for query_time action.
+Apply perflimit to main output for sequence action.
+Add 'noowner' option to same_schema action.
+Raise sleep timeout for logfile check to 15 seconds.
Fix bug preventing column constraint differences from 2 > 1 for same_schema from being shown.
- Allow aliases 'dbname1', 'dbhost1', 'dbport1',etc.
- Added "nolanguage" as a filter for the same_schema option.
- Don't track "generic" table constraints (e.. $1, $2) using same_schema
+Fix bug preventing column constraint differences from 2 > 1 for same_schema from being shown.
+Allow aliases 'dbname1', 'dbhost1', 'dbport1',etc.
+Added "nolanguage" as a filter for the same_schema option.
+Don't track "generic" table constraints (e.. $1, $2) using same_schema
Allow "nofunctions" as a filter for the same_schema option.
- Added "noperm" as a filter for the same_schema option.
- Ignore dropped columns when considered positions for same_schema (Guillaume Lelarge)
+Allow "nofunctions" as a filter for the same_schema option.
+Added "noperm" as a filter for the same_schema option.
+Ignore dropped columns when considered positions for same_schema (Guillaume Lelarge)
Change autovac_freeze default warn/critical from 90%/95% to 105%/120% (Marti Raudsepp)
+Change autovac_freeze default warn/critical from 90%/95% to 105%/120% (Marti Raudsepp)
Allow the temporary directory to be specified via the "tempdir" argument,
- for systems that need it (e.g. /tmp is not owned by root).
- Fix so old versions of Postgres (< 8.0) use the correct default database (Giles Westwood)
- For "same_schema" trigger mismatches, show the attached table.
- Add the new_version_bc check for Bucardo version checking.
- Add database name to perf output for last_vacuum|analyze (Guillaume Lelarge)
- Fix for bloat action against old versions of Postgres without the 'block_size' param.
+Allow the temporary directory to be specified via the "tempdir" argument,
+ for systems that need it (e.g. /tmp is not owned by root).
+Fix so old versions of Postgres (< 8.0) use the correct default database (Giles Westwood)
+For "same_schema" trigger mismatches, show the attached table.
+Add the new_version_bc check for Bucardo version checking.
+Add database name to perf output for last_vacuum|analyze (Guillaume Lelarge)
+Fix for bloat action against old versions of Postgres without the 'block_size' param.
Proper Nagios output for last_vacuum|analyze actions. (Cédric Villemain)
- Proper Nagios output for locks action. (Cédric Villemain)
- Proper Nagios output for txn_wraparound action. (Cédric Villemain)
- Fix for constraints with embedded newlines for same_schema.
- Allow --exclude for all items when using same_schema.
+Proper Nagios output for last_vacuum|analyze actions. (Cédric Villemain)
+Proper Nagios output for locks action. (Cédric Villemain)
+Proper Nagios output for txn_wraparound action. (Cédric Villemain)
+Fix for constraints with embedded newlines for same_schema.
+Allow --exclude for all items when using same_schema.
Add Nagios perf output to the wal_files check (Cédric Villemain)
- Add support for .check_postgresrc, per request from Albe Laurenz.
- Allow list of web fetch methods to be changed with the --get_method option.
- Add support for the --language argument, which overrides any ENV.
- Add the --no-check_postgresrc flag.
- Ensure check_postgresrc options are completely overridden by command-line options.
- Fix incorrect warning > critical logic in replicate_rows (Glyn Astill)
+Add Nagios perf output to the wal_files check (Cédric Villemain)
+Add support for .check_postgresrc, per request from Albe Laurenz.
+Allow list of web fetch methods to be changed with the --get_method option.
+Add support for the --language argument, which overrides any ENV.
+Add the --no-check_postgresrc flag.
+Ensure check_postgresrc options are completely overridden by command-line options.
+Fix incorrect warning > critical logic in replicate_rows (Glyn Astill)
For same_schema, compare view definitions, and compare languages.
- Make script into a global executable via the Makefile.PL file.
- Better output when comparing two databases.
- Proper Nagios output syntax for autovac_freeze and backends checks (Cédric Villemain)
+For same_schema, compare view definitions, and compare languages.
+Make script into a global executable via the Makefile.PL file.
+Better output when comparing two databases.
+Proper Nagios output syntax for autovac_freeze and backends checks (Cédric Villemain)
Don't use a LIMIT in check_bloat if --include is used. Per complaint from Jeff Frost.
+Don't use a LIMIT in check_bloat if --include is used. Per complaint from Jeff Frost.
More French translations (Guillaume Lelarge)
+More French translations (Guillaume Lelarge)
Quote dbname in perf output for the backends check. (Davide Abrigo)
- Add 'fetch' as an alternative method for new_version checks, as this
- comes by default with FreeBSD. (Hywel Mallett)
+Quote dbname in perf output for the backends check. (Davide Abrigo)
+Add 'fetch' as an alternative method for new_version checks, as this
+ comes by default with FreeBSD. (Hywel Mallett)
Allow dots and dashes in database name for the backends check (Davide Abrigo)
- Check and display the database for each match in the bloat check (Cédric Villemain)
- Handle 'too many connections' FATAL error in the backends check with a critical,
- rather than a generic error (Greg, idea by Jürgen Schulz-Brüssel)
- Do not allow perflimit to interfere with exclusion rules in the vacuum and
- analyze tests. (Greg, bug reported by Jeff Frost)
+Allow dots and dashes in database name for the backends check (Davide Abrigo)
+Check and display the database for each match in the bloat check (Cédric Villemain)
+Handle 'too many connections' FATAL error in the backends check with a critical,
+ rather than a generic error (Greg, idea by Jürgen Schulz-Brüssel)
+Do not allow perflimit to interfere with exclusion rules in the vacuum and
+ analyze tests. (Greg, bug reported by Jeff Frost)
Fix for multiple databases with the check_bloat action (Mark Kirkwood)
- Fixes and improvements to the same_schema action (Jeff Boes)
- Write tests for same_schema, other minor test fixes (Jeff Boes)
+Fix for multiple databases with the check_bloat action (Mark Kirkwood)
+Fixes and improvements to the same_schema action (Jeff Boes)
+Write tests for same_schema, other minor test fixes (Jeff Boes)
Added the same_schema action (Greg)
+Added the same_schema action (Greg)
Added timeout via statement_timeout in addition to perl alarm (Greg)
+Added timeout via statement_timeout in addition to perl alarm (Greg)
Added internationalization support (Greg)
- Added the 'disabled_triggers' check (Greg)
- Added the 'prepared_txns' check (Greg)
- Added the 'new_version_cp' and 'new_version_pg' checks (Greg)
- French translations (Guillaume Lelarge)
- Make the backends search return ok if no matches due to inclusion rules,
- per report by Guillaume Lelarge (Greg)
- Added comprehensive unit tests (Greg, Jeff Boes, Selena Deckelmann)
- Make fsm_pages and fsm_relations handle 8.4 servers smoothly. (Greg)
- Fix missing 'upd' field in show_dbstats (Andras Fabian)
- Allow ENV{PGCONTROLDATA} and ENV{PGBINDIR}. (Greg)
- Add various Perl module infrastructure (e.g. Makefile.PL) (Greg)
- Fix incorrect regex in txn_wraparound (Greg)
- For txn_wraparound: consistent ordering and fix duplicates in perf output (Andras Fabian)
- Add in missing exabyte regex check (Selena Deckelmann)
- Set stats to zero if we bail early due to USERWHERECLAUSE (Andras Fabian)
- Add additional items to dbstats output (Andras Fabian)
- Remove --schema option from the fsm_ checks. (Greg Mullane and Robert Treat)
- Handle case when ENV{PGUSER} is set. (Andy Lester)
- Many various fixes. (Jeff Boes)
- Fix --dbservice: check version and use ENV{PGSERVICE} for old versions (Cédric Villemain)
+Added internationalization support (Greg)
+Added the 'disabled_triggers' check (Greg)
+Added the 'prepared_txns' check (Greg)
+Added the 'new_version_cp' and 'new_version_pg' checks (Greg)
+French translations (Guillaume Lelarge)
+Make the backends search return ok if no matches due to inclusion rules,
+ per report by Guillaume Lelarge (Greg)
+Added comprehensive unit tests (Greg, Jeff Boes, Selena Deckelmann)
+Make fsm_pages and fsm_relations handle 8.4 servers smoothly. (Greg)
+Fix missing 'upd' field in show_dbstats (Andras Fabian)
+Allow ENV{PGCONTROLDATA} and ENV{PGBINDIR}. (Greg)
+Add various Perl module infrastructure (e.g. Makefile.PL) (Greg)
+Fix incorrect regex in txn_wraparound (Greg)
+For txn_wraparound: consistent ordering and fix duplicates in perf output (Andras Fabian)
+Add in missing exabyte regex check (Selena Deckelmann)
+Set stats to zero if we bail early due to USERWHERECLAUSE (Andras Fabian)
+Add additional items to dbstats output (Andras Fabian)
+Remove --schema option from the fsm_ checks. (Greg Mullane and Robert Treat)
+Handle case when ENV{PGUSER} is set. (Andy Lester)
+Many various fixes. (Jeff Boes)
+Fix --dbservice: check version and use ENV{PGSERVICE} for old versions (Cédric Villemain)
Make the sequence action check if sequence being used for a int4 column and
- react appropriately. (Michael Glaesemann)
+Make the sequence action check if sequence being used for a int4 column and
+react appropriately. (Michael Glaesemann)
Fix to prevent multiple groupings if db arguments given.
+Fix to prevent multiple groupings if db arguments given.
Allow the -p argument for port to work again.
+Allow the -p argument for port to work again.
Do not require a connection argument, but use defaults and ENV variables when
- possible: PGHOST, PGPORT, PGUSER, PGDATABASE.
+Do not require a connection argument, but use defaults and ENV variables when
+ possible: PGHOST, PGPORT, PGUSER, PGDATABASE.
Only require Date::Parse to be loaded if using the checkpoint action.
+Only require Date::Parse to be loaded if using the checkpoint action.
Add the 'checkpoint' action.
+Add the 'checkpoint' action.
Better checking of $opt{dbservice} structure (Cédric Villemain)
- Fix time display in timesync action output (Selena Deckelmann)
- Fix documentation typos (Josh Tolley)
+Better checking of $opt{dbservice} structure (Cédric Villemain)
+Fix time display in timesync action output (Selena Deckelmann)
+Fix documentation typos (Josh Tolley)
Minor fix to regex in verify_version (Lee Jensen)
+Minor fix to regex in verify_version (Lee Jensen)
Minor documentation tweak.
+Minor documentation tweak.
Add support for --noidle flag to prevent backends action from counting idle processes.
- Patch by Selena Deckelmann.
+Add support for --noidle flag to prevent backends action from counting idle processes.
+Patch by Selena Deckelmann.
- Fix small undefined warning when not using --dbservice.
+Fix small undefined warning when not using --dbservice.
Add support for the pg_Service.conf file with the --dbservice option.
+Add support for the pg_Service.conf file with the --dbservice option.
Fix options for replicate_row action, per report from Jason Gordon.
+Fix options for replicate_row action, per report from Jason Gordon.
Wrap File::Temp::cleanup() calls in eval, in case File::Temp is an older version.
- Patch by Chris Butler.
+Wrap File::Temp::cleanup() calls in eval, in case File::Temp is an older version.
+Patch by Chris Butler.
Cast numbers to numeric to support sequences ranges > bigint in check_sequence action.
- Thanks to Scott Marlowe for reporting this.
+Cast numbers to numeric to support sequences ranges > bigint in check_sequence action.
+Thanks to Scott Marlowe for reporting this.
Add Cacti support with the dbstats action.
- Pretty up the time output for last vacuum and analyze actions.
- Show the percentage of backends on the check_backends action.
+Add Cacti support with the dbstats action.
+Pretty up the time output for last vacuum and analyze actions.
+Show the percentage of backends on the check_backends action.
Fix minor warning in action check_bloat with multiple databases.
- Allow warning to be greater than critical when using the --reverse option.
- Support the --perflimit option for the check_sequence action.
+Fix minor warning in action check_bloat with multiple databases.
+Allow warning to be greater than critical when using the --reverse option.
+Support the --perflimit option for the check_sequence action.
Minor tweak to way we store the default port.
+Minor tweak to way we store the default port.
Allow the default port to be changed easily.
- Allow transform of simple output by MB, GB, etc.
+Allow the default port to be changed easily.
+Allow transform of simple output by MB, GB, etc.
Allow multiple databases in 'sequence' action. Reported by Christoph Zwerschke.
+Allow multiple databases in 'sequence' action. Reported by Christoph Zwerschke.
Add missing $schema to check_fsm_pages. (Robert Treat)
+Add missing $schema to check_fsm_pages. (Robert Treat)
Change option 'checktype' to 'valtype' to prevent collisions with -c[ritical]
- Better handling of errors.
+Change option 'checktype' to 'valtype' to prevent collisions with -c[ritical]
+Better handling of errors.
Do explicit cleanups of the temp directory, per problems reported by sb@nnx.com.
+Do explicit cleanups of the temp directory, per problems reported by sb@nnx.com.
Account for cases where some rounding queries give -0 instead of 0.
- Thanks to Glyn Astill for helping to track this down.
+Account for cases where some rounding queries give -0 instead of 0.
+Thanks to Glyn Astill for helping to track this down.
Always quote identifiers in check_replicate_row action.
+Always quote identifiers in check_replicate_row action.
Give a better error if one of the databases cannot be reached.
+Give a better error if one of the databases cannot be reached.
Add the "sequence" action, thanks to Gavin M. Roy for the idea.
- Fix minor problem with autovac_freeze action when using MRTG output.
- Allow output argument to be case-insensitive.
- Documentation fixes.
+Add the "sequence" action, thanks to Gavin M. Roy for the idea.
+Fix minor problem with autovac_freeze action when using MRTG output.
+Allow output argument to be case-insensitive.
+Documentation fixes.
Fix some minor typos
+Fix some minor typos
Expand range of allowed names for --repinfo argument (Glyn Astill)
- Documentation tweaks.
+Expand range of allowed names for --repinfo argument (Glyn Astill)
+Documentation tweaks.
Fixes for minor output and scoping problems.
+Fixes for minor output and scoping problems.
Add MRTG output to fsm_pages and fsm_relations.
- Force error messages to one-line for proper Nagios output.
- Check for invalid prereqs on failed command. From conversations with Euler Taveira de Oliveira.
- Tweak the fsm_pages formula a little.
+Add MRTG output to fsm_pages and fsm_relations.
+Force error messages to one-line for proper Nagios output.
+Check for invalid prereqs on failed command. From conversations with Euler Taveira de Oliveira.
+Tweak the fsm_pages formula a little.
Add fsm_pages and fsm_relations actions. (Robert Treat)
+Add fsm_pages and fsm_relations actions. (Robert Treat)
Fix for race condition in txn_time action.
- Add --debugoutput option.
+Fix for race condition in txn_time action.
+Add --debugoutput option.
Allow alternate arguments "dbhost" for "host" and "dbport" for "port".
- Output a zero as default value for second line of MRTG output.
+Allow alternate arguments "dbhost" for "host" and "dbport" for "port".
+Output a zero as default value for second line of MRTG output.
Fix sorting error in the "disk_space" action for non-Nagios output.
- Allow --simple as a shortcut for --output=simple.
+Fix sorting error in the "disk_space" action for non-Nagios output.
+Allow --simple as a shortcut for --output=simple.
Don't check databases with datallowconn false for the "autovac_freeze" action.
+Don't check databases with datallowconn false for the "autovac_freeze" action.
Add the "autovac_freeze" action, thanks to Robert Treat for the idea and design.
- Put an ORDER BY on the "txn_wraparound" action.
+Add the "autovac_freeze" action, thanks to Robert Treat for the idea and design.
+Put an ORDER BY on the "txn_wraparound" action.
Optimizations to speed up the "bloat" action quite a bit.
- Fix "version" action to not always output in mrtg mode.
+Optimizations to speed up the "bloat" action quite a bit.
+Fix "version" action to not always output in mrtg mode.
Add support for MRTG and "simple" output options.
- Many small improvements to nearly all actions.
+Add support for MRTG and "simple" output options.
+Many small improvements to nearly all actions.
Fix an error in the bloat SQL in 1.9.0
- Allow percentage arguments to be over 99%
- Allow percentages in the bloat --warning and --critical (thanks to Robert Treat for the idea)
+Fix an error in the bloat SQL in 1.9.0
+Allow percentage arguments to be over 99%
+Allow percentages in the bloat --warning and --critical (thanks to Robert Treat for the idea)
Don't include information_schema in certain checks. (Jeff Frost)
- Allow --include and --exclude to use schemas by using a trailing period.
+Don't include information_schema in certain checks. (Jeff Frost)
+Allow --include and --exclude to use schemas by using a trailing period.
Output schema name before table name where appropriate.
- Thanks to Jeff Frost.
+Output schema name before table name where appropriate.
+Thanks to Jeff Frost.
Better detection of problems in --replicate_row.
+Better detection of problems in --replicate_row.
Fix 'backends' action: there may be no rows in pg_stat_activity, so run a second
- query if needed to find the max_connections setting.
- Thanks to Jeff Frost for the bug report.
+Fix 'backends' action: there may be no rows in pg_stat_activity, so run a second
+ query if needed to find the max_connections setting.
+Thanks to Jeff Frost for the bug report.
Changes to allow working under Nagios' embedded Perl mode. (Ioannis Tambouras)
+Changes to allow working under Nagios' embedded Perl mode. (Ioannis Tambouras)
Allow 'bloat' action to work on Postgres version 8.0.
- Allow for different commands to be run for each action depending on the server version.
- Give better warnings when running actions not available on older Postgres servers.
+Allow 'bloat' action to work on Postgres version 8.0.
+Allow for different commands to be run for each action depending on the server version.
+Give better warnings when running actions not available on older Postgres servers.
Add the --reverse option to the custom_query action.
+Add the --reverse option to the custom_query action.
Fix 'query_time' action: account for race condition in which zero rows appear in pg_stat_activity.
- Thanks to Dustin Black for the bug report.
+Fix 'query_time' action: account for race condition in which zero rows appear in pg_stat_activity.
+Thanks to Dustin Black for the bug report.
Add --replicate_row action
+Add --replicate_row action
Add --symlinks option as a shortcut to --action=rebuild_symlinks
+Add --symlinks option as a shortcut to --action=rebuild_symlinks
Add the custom_query action.
+Add the custom_query action.
Fix problem with too eager creation of custom pgpass file.
+Fix problem with too eager creation of custom pgpass file.
Add example Nagios configuration settings (Brian A. Seklecki)
+Add example Nagios configuration settings (Brian A. Seklecki)
Add the --includeuser and --excludeuser options. Documentation cleanup.
+Add the --includeuser and --excludeuser options. Documentation cleanup.
Add in the 'output' concept for future support of non-Nagios programs.
+Add in the 'output' concept for future support of non-Nagios programs.
Fix bug preventing --dbpass argument from working (Robert Treat).
+Fix bug preventing --dbpass argument from working (Robert Treat).
Minor documentation fixes.
+Minor documentation fixes.
Have 'wal_files' action use pg_ls_dir (idea by Robert Treat).
- For last_vacuum and last_analyze, respect autovacuum effects, add separate
- autovacuum checks (ideas by Robert Treat).
+Have 'wal_files' action use pg_ls_dir (idea by Robert Treat).
+For last_vacuum and last_analyze, respect autovacuum effects, add separate
+ autovacuum checks (ideas by Robert Treat).
Have txn_idle use query_start, not xact_start.
+Have txn_idle use query_start, not xact_start.
Add in txn_idle and txn_time actions.
+Add in txn_idle and txn_time actions.
Add the 'wal_files' action, which counts the number of WAL files
- in your pg_xlog directory.
- Fix some typos in the docs.
- Explicitly allow -v as an argument.
- Allow for a null syslog_facility in the 'logfile' action.
+Add the 'wal_files' action, which counts the number of WAL files
+ in your pg_xlog directory.
+Fix some typos in the docs.
+Explicitly allow -v as an argument.
+Allow for a null syslog_facility in the 'logfile' action.
Fix error preventing --action=rebuild_symlinks from working.
+Fix error preventing --action=rebuild_symlinks from working.
Switch vacuum and analyze date output to use 'DD', not 'D'. (Glyn Astill)
+Switch vacuum and analyze date output to use 'DD', not 'D'. (Glyn Astill)
Fixes, enhancements, and performance tracking.
- Add performance data tracking via --showperf and --perflimit
- Lots of refactoring and cleanup of how actions handle arguments.
- Do basic checks to figure out syslog file for 'logfile' action.
- Allow for exact matching of beta versions with 'version' action.
- Redo the default arguments to only populate when neither 'warning' nor 'critical' is provided.
- Allow just warning OR critical to be given for the 'timesync' action.
- Remove 'redirect_stderr' requirement from 'logfile' due to 8.3 changes.
- Actions 'last_vacuum' and 'last_analyze' are 8.2 only (Robert Treat)
+Fixes, enhancements, and performance tracking.
+Add performance data tracking via --showperf and --perflimit
+Lots of refactoring and cleanup of how actions handle arguments.
+Do basic checks to figure out syslog file for 'logfile' action.
+Allow for exact matching of beta versions with 'version' action.
+Redo the default arguments to only populate when neither 'warning' nor 'critical' is provided.
+Allow just warning OR critical to be given for the 'timesync' action.
+Remove 'redirect_stderr' requirement from 'logfile' due to 8.3 changes.
+Actions 'last_vacuum' and 'last_analyze' are 8.2 only (Robert Treat)
First public release, December 2007
+First public release, December 2007
Some example Nagios configuration settings using this script:
- define command {
- command_name check_postgres_size
- command_line $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u pgsql -db postgres --action database_size -w $ARG1$ -c $ARG2$
- }
+define command {
+ command_name check_postgres_size
+ command_line $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u pgsql -db postgres --action database_size -w $ARG1$ -c $ARG2$
+}
- define command {
- command_name check_postgres_locks
- command_line $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u pgsql -db postgres --action locks -w $ARG1$ -c $ARG2$
- }
+define command {
+ command_name check_postgres_locks
+ command_line $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u pgsql -db postgres --action locks -w $ARG1$ -c $ARG2$
+}
- define service {
- use generic-other
- host_name dbhost.gtld
- service_description dbhost PostgreSQL Service Database Usage Size
- check_command check_postgres_size!256000000!512000000
- }
+define service {
+ use generic-other
+ host_name dbhost.gtld
+ service_description dbhost PostgreSQL Service Database Usage Size
+ check_command check_postgres_size!256000000!512000000
+}
- define service {
- use generic-other
- host_name dbhost.gtld
- service_description dbhost PostgreSQL Service Database Locks
- check_command check_postgres_locks!2!3
- }
+define service {
+ use generic-other
+ host_name dbhost.gtld
+ service_description dbhost PostgreSQL Service Database Locks
+ check_command check_postgres_locks!2!3
+}
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
+1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.