check_postgres.git
13 years agoReady for 2.19.0 release 2.19.0
Greg Sabino Mullane [Wed, 18 Jan 2012 02:56:22 +0000 (21:56 -0500)]
Ready for 2.19.0 release

13 years agoPerl::Critic inspired changes
Greg Sabino Mullane [Wed, 18 Jan 2012 00:43:24 +0000 (19:43 -0500)]
Perl::Critic inspired changes

13 years agoOmit Variables::ProhibitUselessInitialization as it has an internal error.
Greg Sabino Mullane [Tue, 17 Jan 2012 21:03:16 +0000 (16:03 -0500)]
Omit Variables::ProhibitUselessInitialization as it has an internal error.

13 years agoTry to wrap failing Perl::Critic calls in an eval. Does not work.
Greg Sabino Mullane [Tue, 17 Jan 2012 19:50:04 +0000 (14:50 -0500)]
Try to wrap failing Perl::Critic calls in an eval. Does not work.

13 years agoClear temp schema
Greg Sabino Mullane [Tue, 17 Jan 2012 19:21:20 +0000 (14:21 -0500)]
Clear temp schema

13 years agoRemove tabs
Greg Sabino Mullane [Tue, 17 Jan 2012 17:58:25 +0000 (12:58 -0500)]
Remove tabs

13 years agoTweaks for better "fakeschema" in the tests.
Greg Sabino Mullane [Tue, 17 Jan 2012 17:52:43 +0000 (12:52 -0500)]
Tweaks for better "fakeschema" in the tests.

13 years agoHave MRTG show a set message, for times when we end up there indirectly.
Greg Sabino Mullane [Tue, 17 Jan 2012 14:17:59 +0000 (09:17 -0500)]
Have MRTG show a set message, for times when we end up there indirectly.

13 years agoSpell check tweaks
Greg Sabino Mullane [Mon, 16 Jan 2012 17:38:43 +0000 (12:38 -0500)]
Spell check tweaks

13 years agoTranslation cleanups
Greg Sabino Mullane [Mon, 16 Jan 2012 16:59:08 +0000 (11:59 -0500)]
Translation cleanups

13 years agoTypo in SQL
Greg Sabino Mullane [Mon, 16 Jan 2012 16:57:16 +0000 (11:57 -0500)]
Typo in SQL

13 years agoMake sure we do not force cluster ids to an int, else we get exponential notation.
Greg Sabino Mullane [Mon, 16 Jan 2012 16:49:48 +0000 (11:49 -0500)]
Make sure we do not force cluster ids to an int, else we get exponential notation.

13 years agoAdd some debugging to the perlcritic test
Greg Sabino Mullane [Mon, 16 Jan 2012 16:01:57 +0000 (11:01 -0500)]
Add some debugging to the perlcritic test

13 years agoGetting tired of these !@#$!@#%! tabs in this !~@#$!@#$ code
Greg Sabino Mullane [Mon, 16 Jan 2012 14:47:44 +0000 (09:47 -0500)]
Getting tired of these !@#$!@#%! tabs in this !~@#$!@#$ code

13 years agoMore tabs
Greg Sabino Mullane [Mon, 16 Jan 2012 14:45:51 +0000 (09:45 -0500)]
More tabs

13 years agoRemove tabs
Greg Sabino Mullane [Mon, 16 Jan 2012 14:27:12 +0000 (09:27 -0500)]
Remove tabs

13 years agoBump to 2012
Greg Sabino Mullane [Mon, 16 Jan 2012 14:26:09 +0000 (09:26 -0500)]
Bump to 2012

13 years agoIgnore the MYMETA auto-generated files
Greg Sabino Mullane [Fri, 9 Dec 2011 04:02:27 +0000 (23:02 -0500)]
Ignore the MYMETA auto-generated files

13 years agoMake version 2.19.0 everywhere
Greg Sabino Mullane [Fri, 9 Dec 2011 04:01:53 +0000 (23:01 -0500)]
Make version 2.19.0 everywhere

13 years agoRemove version 2.18.1 - going right to 2.19
Greg Sabino Mullane [Fri, 9 Dec 2011 04:00:27 +0000 (23:00 -0500)]
Remove version 2.18.1 - going right to 2.19

13 years agoNote bugzilla items, per recent email.
Greg Sabino Mullane [Mon, 28 Nov 2011 19:37:39 +0000 (14:37 -0500)]
Note bugzilla items, per recent email.

13 years agoFix xlog formula: ff000000 not ffffffff
Euler Taveira de Oliveira [Sun, 27 Nov 2011 13:10:18 +0000 (08:10 -0500)]
Fix xlog formula: ff000000 not ffffffff
See http://eulerto.blogspot.com/2011/11/understanding-wal-nomenclature.html

13 years agoRevert bug 92 tweak, per point from Robert Treat.
Greg Sabino Mullane [Sat, 26 Nov 2011 20:46:37 +0000 (15:46 -0500)]
Revert bug 92 tweak, per point from Robert Treat.
No more late night coding for me. #easilybrokenpromises

13 years agoExclude IIT from txn_time
Greg Sabino Mullane [Thu, 24 Nov 2011 05:07:01 +0000 (00:07 -0500)]
Exclude IIT from txn_time

13 years agoMerge branch 'master' of bucardo.org:/var/lib/git/check_postgres
Greg Sabino Mullane [Wed, 23 Nov 2011 14:16:17 +0000 (09:16 -0500)]
Merge branch 'master' of bucardo.org:/var/lib/git/check_postgres

13 years agoNote latest fix.
Greg Sabino Mullane [Wed, 23 Nov 2011 14:16:07 +0000 (09:16 -0500)]
Note latest fix.

13 years agoChange join to pg_user to a left join, as the database may be owned by a role.
Greg Sabino Mullane [Wed, 23 Nov 2011 14:13:46 +0000 (09:13 -0500)]
Change join to pg_user to a left join, as the database may be owned by a role.
Thanks to Emmanuel Lesouef for the bug report and help in tracking this down.
There are probably other incorrect inner joins to pg_user in the code.

13 years agoUpdate history
Cédric Villemain [Wed, 9 Nov 2011 11:10:40 +0000 (12:10 +0100)]
Update history

13 years agoAdd MRTG to test for settings_checksum
Cédric Villemain [Wed, 9 Nov 2011 10:57:53 +0000 (11:57 +0100)]
Add MRTG to test for settings_checksum

13 years agoAdd a test for checkpoint and --assume-standby-mode
Cédric Villemain [Wed, 9 Nov 2011 10:57:11 +0000 (11:57 +0100)]
Add a test for checkpoint and --assume-standby-mode

13 years agoAdd cluster_id test
Cédric Villemain [Wed, 9 Nov 2011 10:56:00 +0000 (11:56 +0100)]
Add cluster_id test

for automatic testing too.

13 years agoAdd an --assume-prod option
Cédric Villemain [Mon, 7 Nov 2011 13:00:02 +0000 (14:00 +0100)]
Add an --assume-prod option

This is based on --assume-standby-mode. Reduce the option name per suggestion
from Greg (but I kept the original one for standby mode).

The option is only used in check_postgres_checkpoint and allows to confirm or
emit a critical if the server is not in the expected mode.

Note: this can be used in other places, and maybe improved (to reduce the
number og open_controldata calls)

TODO/FIXME:
* I found that --assume-p or --assume-s are viewed by GetOpt like the longer
version of the option, a bug ?
* The original code to call pg_controldata does not work in French (because of
regex/locale). Why not use LANG=C in those checks where there is NO point to
use locale and error prone regex ?

13 years agoReduce code duplicates around pg_controldata
Cédric Villemain [Mon, 7 Nov 2011 12:57:19 +0000 (13:57 +0100)]
Reduce code duplicates around pg_controldata

Use the open_controldata where pg_controldata was used previously.
Also split the code for make_sure_standby_mode to reduce code for the future
option make_sure_prod.

13 years agoAdd a check cluster_id
Cédric Villemain [Mon, 7 Nov 2011 12:51:15 +0000 (13:51 +0100)]
Add a check cluster_id

This check is responsible to confirm that the Database System Identifier found
by pg_controldata is the one expected.
warning and critical allowed (like check_postgres_checksum) and must be run on
PostgreSQL server (like check_postgres_checkpoint)

While here, I created a new function open_controldata which can be used in
other places where pg_controldata is used.

13 years agoNote last changes
Greg Sabino Mullane [Sat, 8 Oct 2011 13:02:44 +0000 (09:02 -0400)]
Note last changes

13 years agoCreate a man 3 entry
Greg Sabino Mullane [Sat, 8 Oct 2011 13:01:40 +0000 (09:01 -0400)]
Create a man 3 entry

13 years agoWe already have check_postgres.pl listed as an EXE, so prevent Makefile from putting...
Greg Sabino Mullane [Sat, 8 Oct 2011 12:50:54 +0000 (08:50 -0400)]
We already have check_postgres.pl listed as an EXE, so prevent Makefile from putting it into the Perl lib path as well.

13 years agoFix typo.
Greg Sabino Mullane [Sat, 8 Oct 2011 12:44:08 +0000 (08:44 -0400)]
Fix typo.

13 years agoFix uninitialized string warnings when host or port not specified (eg using dbservice)
Mike Blackwell [Fri, 7 Oct 2011 18:09:54 +0000 (13:09 -0500)]
Fix uninitialized string warnings when host or port not specified (eg using dbservice)

13 years agoRedo latest orderby tweaks
Greg Sabino Mullane [Thu, 6 Oct 2011 20:53:36 +0000 (16:53 -0400)]
Redo latest orderby tweaks

13 years agoCredit last patch
Greg Sabino Mullane [Thu, 6 Oct 2011 20:16:25 +0000 (16:16 -0400)]
Credit last patch

13 years agoShow dbservice if used at start of same_schema header.
Mike Blackwell [Thu, 6 Oct 2011 20:15:40 +0000 (16:15 -0400)]
Show dbservice if used at start of same_schema header.

13 years agoCredit bloat change.
Greg Sabino Mullane [Thu, 6 Oct 2011 19:08:19 +0000 (15:08 -0400)]
Credit bloat change.

13 years agoGet version 2.18.1 ready
Greg Sabino Mullane [Thu, 6 Oct 2011 19:06:43 +0000 (15:06 -0400)]
Get version 2.18.1 ready

13 years agoUse the full path when getting sequence information for same_schema.
Greg Sabino Mullane [Thu, 6 Oct 2011 19:04:01 +0000 (15:04 -0400)]
Use the full path when getting sequence information for same_schema.
Thanks to Cindy Wise for the bug report.

13 years agoShow bloat when indexes are high too
Greg Sabino Mullane [Thu, 6 Oct 2011 16:39:26 +0000 (12:39 -0400)]
Show bloat when indexes are high too

13 years agoUpdate french translation.
Guillaume Lelarge [Wed, 5 Oct 2011 10:55:03 +0000 (12:55 +0200)]
Update french translation.

13 years agoFix query_time action when using --dbservice option
Guillaume Lelarge [Wed, 5 Oct 2011 10:09:12 +0000 (12:09 +0200)]
Fix query_time action when using --dbservice option

When using --dbservice option, $db->{dbname} is not set. So the $whodunit
variable initialization should first check if the $db->{dbname} is set.

Actually, we only initialize it for the MRTG output as it is not important in
the Nagios output.

13 years agoFix query time action
Jehan-Guillaume (ioguix) de Rorthais [Tue, 4 Oct 2011 19:40:53 +0000 (21:40 +0200)]
Fix query time action

The query_time action works before 8.1 if the query doesn't include the
xact_start column. But we need this column for the txn_time action. So, I
changed the query so that the query_time can work with 8.1 and upwards, and
that the txn_time works with 8.3 and upwards.

13 years agoAllow the check of multiple db with connection action
Guillaume Lelarge [Sun, 25 Sep 2011 19:47:30 +0000 (21:47 +0200)]
Allow the check of multiple db with connection action

We still stop at the first error.

Per request from Aziz Boultabi.

13 years agoPGP sig for 2.18.0
Greg Sabino Mullane [Sun, 2 Oct 2011 17:27:44 +0000 (13:27 -0400)]
PGP sig for 2.18.0

13 years agoFinal tweaks for 2.18.0 2.18.0
Greg Sabino Mullane [Sun, 2 Oct 2011 17:25:43 +0000 (13:25 -0400)]
Final tweaks for 2.18.0

13 years agoSignature for 2.18.0
Greg Sabino Mullane [Sun, 2 Oct 2011 17:24:27 +0000 (13:24 -0400)]
Signature for 2.18.0

13 years agoSpellcheck updates
Greg Sabino Mullane [Wed, 28 Sep 2011 18:27:27 +0000 (14:27 -0400)]
Spellcheck updates

13 years agoMessage/translation cleanups.
Greg Sabino Mullane [Wed, 28 Sep 2011 18:11:09 +0000 (14:11 -0400)]
Message/translation cleanups.

13 years agoTypo.
Greg Sabino Mullane [Sun, 11 Sep 2011 13:58:13 +0000 (09:58 -0400)]
Typo.

13 years agoFix some "make test" issues
Guillaume Lelarge [Sat, 3 Sep 2011 10:21:53 +0000 (12:21 +0200)]
Fix some "make test" issues

* backends test issue
  Critical and warning values were wrong for the negative number check.
  And the output message for the --include check was wrong too.

* check_replicate_row issue
  The UPDATE must be executed on the first server only.

* fsm_pages and fsm_relations test issue
  The version test (ie max_fsm_* not available on 8.4 and later releases) must be done earlier.

* doc test issue
  check_standby_mode rename to make_sure_standby_mode because all check_*
  functions are expected to have documentation, but check_standby_mode is an
  internal function.

* another doc test issue
  pgbouncer_checksum documentation wasn't at the right location.

* drop_schema_if_exists issue
  There was an unexpected return in the middle of the function, and so the
  schema was never dropped.

13 years agoNew french update
Guillaume Lelarge [Mon, 29 Aug 2011 10:09:41 +0000 (12:09 +0200)]
New french update

13 years agoNote latest changes. Quick document of same_schema --replace
Greg Sabino Mullane [Fri, 19 Aug 2011 16:27:49 +0000 (12:27 -0400)]
Note latest changes. Quick document of same_schema --replace

13 years agoFix space in perfdata for hot_standby_delay action.
Nicolas Thauvin [Fri, 19 Aug 2011 16:25:31 +0000 (12:25 -0400)]
Fix space in perfdata for hot_standby_delay action.

13 years agoDon't allow this test unless in RELEASE mode.
Greg Sabino Mullane [Thu, 18 Aug 2011 14:28:21 +0000 (10:28 -0400)]
Don't allow this test unless in RELEASE mode.

13 years agoNote the special ignore/exclude handling in the bloat routine, per discussion on...
Greg Sabino Mullane [Mon, 1 Aug 2011 15:43:04 +0000 (11:43 -0400)]
Note the special ignore/exclude handling in the bloat routine, per discussion on the mailing list.

13 years agoNew option "replace" to allow replacing the audit file after a run.
Greg Sabino Mullane [Wed, 27 Jul 2011 15:17:17 +0000 (11:17 -0400)]
New option "replace" to allow replacing the audit file after a run.

13 years agoMore prosrc filtering tweaks.
Greg Sabino Mullane [Wed, 27 Jul 2011 15:07:31 +0000 (11:07 -0400)]
More prosrc filtering tweaks.

13 years agoDon't tell us about the sequence number changing over time!
Greg Sabino Mullane [Tue, 12 Jul 2011 14:38:01 +0000 (10:38 -0400)]
Don't tell us about the sequence number changing over time!

13 years agoSupport per-version SQL for same_schema action.
Greg Sabino Mullane [Tue, 12 Jul 2011 12:26:19 +0000 (08:26 -0400)]
Support per-version SQL for same_schema action.

13 years agoUse the entire sub call for the "totaltime" counter for same_schema.
Greg Sabino Mullane [Tue, 12 Jul 2011 11:45:26 +0000 (07:45 -0400)]
Use the entire sub call for the "totaltime" counter for same_schema.

13 years agoDo not show connection variants for historical database.
Greg Sabino Mullane [Tue, 12 Jul 2011 02:23:53 +0000 (22:23 -0400)]
Do not show connection variants for historical database.

13 years agoSwitch around probin munging.
Greg Sabino Mullane [Tue, 12 Jul 2011 02:21:09 +0000 (22:21 -0400)]
Switch around probin munging.

13 years agoCredit last commit
Greg Sabino Mullane [Mon, 11 Jul 2011 14:24:18 +0000 (10:24 -0400)]
Credit last commit

13 years agoFix typo in dbstats action.
Stas Vitkovsky [Mon, 11 Jul 2011 14:23:22 +0000 (10:23 -0400)]
Fix typo in dbstats action.

13 years agoClean up all versions of test database dirs and their sockets.
Greg Sabino Mullane [Tue, 5 Jul 2011 15:03:26 +0000 (11:03 -0400)]
Clean up all versions of test database dirs and their sockets.

13 years agoKeep the fake schema around, as we modify search_path with ALTER USER
Greg Sabino Mullane [Tue, 5 Jul 2011 14:54:53 +0000 (10:54 -0400)]
Keep the fake schema around, as we modify search_path with ALTER USER

13 years agoVarious testing fixes.
Greg Sabino Mullane [Mon, 4 Jul 2011 21:59:24 +0000 (17:59 -0400)]
Various testing fixes.

13 years agoThe database name is not always available (e.g. check_checkpoint)
Greg Sabino Mullane [Mon, 4 Jul 2011 18:44:42 +0000 (14:44 -0400)]
The database name is not always available (e.g. check_checkpoint)

13 years agoTweak backend tests to account for new output
Greg Sabino Mullane [Mon, 4 Jul 2011 18:42:20 +0000 (14:42 -0400)]
Tweak backend tests to account for new output

13 years agoRemove a tab that snuck in.
Greg Sabino Mullane [Mon, 4 Jul 2011 18:38:15 +0000 (14:38 -0400)]
Remove a tab that snuck in.

13 years agoBetter tests for non-superuser in txn_idle and friends.
Greg Sabino Mullane [Mon, 4 Jul 2011 18:37:04 +0000 (14:37 -0400)]
Better tests for non-superuser in txn_idle and friends.
Attempts to fix bug 59.

13 years agoprintf fixes.
Greg Sabino Mullane [Mon, 4 Jul 2011 14:01:57 +0000 (10:01 -0400)]
printf fixes.

13 years agoNote that txn_idle and query_time require 8.3 (Thomas Guettler)
Greg Sabino Mullane [Sun, 3 Jul 2011 02:45:22 +0000 (22:45 -0400)]
Note that txn_idle and query_time require 8.3 (Thomas Guettler)

13 years agoBe clear that we are checking the pg_listener table. Per suggestion from Thomas Guettler.
Greg Sabino Mullane [Sun, 3 Jul 2011 02:38:58 +0000 (22:38 -0400)]
Be clear that we are checking the pg_listener table. Per suggestion from Thomas Guettler.
Note the failure to work at versions >= 9.0

13 years agoDoc typo in prepared_txns section.
Thomas Guettler [Sun, 3 Jul 2011 02:36:48 +0000 (22:36 -0400)]
Doc typo in prepared_txns section.

13 years agoCredit Thomas Guettler with last commit idea.
Greg Sabino Mullane [Sun, 3 Jul 2011 02:35:25 +0000 (22:35 -0400)]
Credit Thomas Guettler with last commit idea.

13 years agoSet some defaults for archive_ready and wal_files. Adjustements welcome.
Greg Sabino Mullane [Sun, 3 Jul 2011 02:34:05 +0000 (22:34 -0400)]
Set some defaults for archive_ready and wal_files. Adjustements welcome.
Also make the output for both actions clearer.

13 years agoCleanup the History section.
Greg Sabino Mullane [Sun, 3 Jul 2011 02:05:23 +0000 (22:05 -0400)]
Cleanup the History section.

13 years agoAllow the --schema argument for the slony_status action to take multiple values,...
Greg Sabino Mullane [Sun, 3 Jul 2011 02:03:26 +0000 (22:03 -0400)]
Allow the --schema argument for the slony_status action to take multiple values, and map those back into the targetdbs as needed. Also detect multiple slonys per database if no --schema is given. Per idea from Jehan-Guillaume de Rorthais.

13 years agoFix tests for new naming.
Greg Sabino Mullane [Thu, 30 Jun 2011 03:05:02 +0000 (23:05 -0400)]
Fix tests for new naming.

13 years agoRename test files
Greg Sabino Mullane [Thu, 30 Jun 2011 03:03:38 +0000 (23:03 -0400)]
Rename test files

13 years agoTest file tweaks for new output.
Greg Sabino Mullane [Thu, 30 Jun 2011 03:02:53 +0000 (23:02 -0400)]
Test file tweaks for new output.

13 years agoBump to 2.18.0.
Greg Sabino Mullane [Thu, 30 Jun 2011 02:53:57 +0000 (22:53 -0400)]
Bump to 2.18.0.
Update Changes

13 years agoSpell check updates.
Greg Sabino Mullane [Thu, 30 Jun 2011 02:37:17 +0000 (22:37 -0400)]
Spell check updates.

13 years agoComplete rewrite of the same_schema action.
Greg Sabino Mullane [Thu, 30 Jun 2011 02:24:53 +0000 (22:24 -0400)]
Complete rewrite of the same_schema action.
Now supports >2 databases for comparison,
as well as "historical" comparisons of the same db over time!

13 years agoFix ORDER BY in the last vacuum/analyze action
Nicolas Thauvin [Mon, 27 Jun 2011 15:26:47 +0000 (17:26 +0200)]
Fix ORDER BY in the last vacuum/analyze action

Before this patch, the "ORDER BY" was on the relname column. This fixes it to
get an ORDER BY on the last time column, which is more interesting
(especially when you have a perflimit).

13 years agoFix check_hot_standby_delay perfdata output
Nicolas Thauvin [Mon, 27 Jun 2011 15:05:54 +0000 (17:05 +0200)]
Fix check_hot_standby_delay perfdata output

There was a missing space in the perfdata output for this action.

13 years agoFix the archive_ready action
Nicolas Thauvin [Mon, 27 Jun 2011 14:55:06 +0000 (16:55 +0200)]
Fix the archive_ready action

The .ready files are not in the pg_xlog directory, but in the
pg_xlog/archive_ready one. This patch adds another argument to the
check_wal_files() function so that it could find the subdirectory in which it
has to look for files.

13 years agoRename recent tests: 'database' is implicit for most things.
Greg Sabino Mullane [Mon, 27 Jun 2011 14:50:48 +0000 (10:50 -0400)]
Rename recent tests: 'database' is implicit for most things.
Plus, I didn't want to have to re-line up everything inside $action_info :)

13 years agoAdd the hitratio action
Guillaume Lelarge [Mon, 27 Jun 2011 14:15:54 +0000 (16:15 +0200)]
Add the hitratio action

This new action allows a user to track the hit ratio, ie the difference
between cache and disk reads, in each database.

13 years agoAdd the commitratio action
Guillaume Lelarge [Tue, 19 Apr 2011 12:40:43 +0000 (14:40 +0200)]
Add the commitratio action

This new action allows a user to track the commit ratio, ie the difference
between commit and rollback, in each database.

13 years agoMake sure --action overrides the naming trick.
Greg Sabino Mullane [Fri, 24 Jun 2011 17:50:55 +0000 (13:50 -0400)]
Make sure --action overrides the naming trick.

13 years agoQuick fix for cases when client_port is set to an empty string, per bug report 79...
Greg Sabino Mullane [Wed, 22 Jun 2011 16:02:58 +0000 (12:02 -0400)]
Quick fix for cases when client_port is set to an empty string, per bug report 79 from Fabrice Metge