check_postgres.git
11 years agoCredit recent change.
Greg Sabino Mullane [Wed, 28 Aug 2013 15:27:05 +0000 (11:27 -0400)]
Credit recent change.

11 years agoUpdate check_postgres.pl
mintsoft [Wed, 28 Aug 2013 09:03:17 +0000 (10:03 +0100)]
Update check_postgres.pl

Fixing issue with SQL steps in check_pgagent_jobs for jobs which perform deletes, these return non-0 yet are still successful.
Behaviour should now be that <>0 on batch is a failure, but only -1 is a failure for sql steps.

11 years agoREADME: Fix two typos
Christoph Berg [Thu, 4 Jul 2013 11:17:57 +0000 (13:17 +0200)]
README: Fix two typos

11 years agot/02_settings_checksum.t: Accept hex digits
Christoph Berg [Tue, 2 Jul 2013 13:27:58 +0000 (15:27 +0200)]
t/02_settings_checksum.t: Accept hex digits

Previously, this check only worked by chance if the returned checksum
started with a plain digit.

11 years agoSignatures for 2.20.1 2.20.1
Greg Sabino Mullane [Tue, 25 Jun 2013 02:59:13 +0000 (22:59 -0400)]
Signatures for 2.20.1

11 years agoFinal html doc tweak
Greg Sabino Mullane [Tue, 25 Jun 2013 02:56:34 +0000 (22:56 -0400)]
Final html doc tweak

11 years agoLet's get 2.20.1 out the door
Greg Sabino Mullane [Tue, 25 Jun 2013 02:55:50 +0000 (22:55 -0400)]
Let's get 2.20.1 out the door

11 years agoCannot test for bad sequences in that manner: we already exclude temp schemas!
Greg Sabino Mullane [Tue, 25 Jun 2013 02:50:20 +0000 (22:50 -0400)]
Cannot test for bad sequences in that manner: we already exclude temp schemas!

11 years agoNo tabs please.
Greg Sabino Mullane [Tue, 25 Jun 2013 02:37:24 +0000 (22:37 -0400)]
No tabs please.

11 years agoMove issue tracking from Bugzilla to github
Greg Sabino Mullane [Tue, 25 Jun 2013 02:36:14 +0000 (22:36 -0400)]
Move issue tracking from Bugzilla to github

11 years agoBump version to 2.20.1; update docs
Greg Sabino Mullane [Tue, 25 Jun 2013 02:34:37 +0000 (22:34 -0400)]
Bump version to 2.20.1; update docs

11 years agoUpdate credits.
Greg Sabino Mullane [Tue, 25 Jun 2013 02:32:26 +0000 (22:32 -0400)]
Update credits.

11 years agoBetter "simple" output
Greg Sabino Mullane [Tue, 25 Jun 2013 02:28:31 +0000 (22:28 -0400)]
Better "simple" output

11 years agoDon't compare the new 'relallvisible' ccolumn
Greg Sabino Mullane [Mon, 24 Jun 2013 12:57:50 +0000 (08:57 -0400)]
Don't compare the new 'relallvisible' ccolumn

11 years agoUpdate TODO file
Greg Sabino Mullane [Mon, 24 Jun 2013 12:42:24 +0000 (08:42 -0400)]
Update TODO file

11 years agoCredit recent change
Greg Sabino Mullane [Wed, 8 May 2013 21:32:20 +0000 (17:32 -0400)]
Credit recent change

11 years agoRemove host reordering in hot_standby_delay check
Josh Williams [Wed, 8 May 2013 19:26:10 +0000 (15:26 -0400)]
Remove host reordering in hot_standby_delay check

This was resulting in the master queries being sent to the replica and
vice versa, if the replica is listed first.  Will probably still want to
reorder the hosts in output (or just list them all) later.
Thanks to Jacobo Blasco for debug assistance.

12 years agoCredit the 9.2 fixes
Greg Sabino Mullane [Wed, 1 May 2013 02:08:10 +0000 (22:08 -0400)]
Credit the 9.2 fixes

12 years agoTypo
Greg Sabino Mullane [Wed, 1 May 2013 01:55:35 +0000 (21:55 -0400)]
Typo

12 years agoDo things the right way and run different versions of the bloat query depending on...
Greg Sabino Mullane [Wed, 1 May 2013 01:35:55 +0000 (21:35 -0400)]
Do things the right way and run different versions of the bloat query depending on the target version.

12 years agoDo not use pg_stats "inherited" column in bloat query, if the database is 8.4 or...
Greg Sabino Mullane [Wed, 1 May 2013 01:18:37 +0000 (21:18 -0400)]
Do not use pg_stats "inherited" column in bloat query, if the database is 8.4 or older.
Technically, we are not checking the target's version.

12 years agoCredit last change
Greg Sabino Mullane [Wed, 1 May 2013 01:07:54 +0000 (21:07 -0400)]
Credit last change

12 years agobloat query: fix totalwastedbytes
Michael Renner [Wed, 3 Apr 2013 10:40:39 +0000 (12:40 +0200)]
bloat query: fix totalwastedbytes

totalwastedbytes returned only the number of wasted pages - fix that by
multiplying with the blocksize

12 years agoCredit last change
Greg Sabino Mullane [Wed, 1 May 2013 01:00:08 +0000 (21:00 -0400)]
Credit last change

12 years agocause the --reverse flag to invert string comparisons in custom queries
Nathaniel Waisbrot [Mon, 1 Apr 2013 15:33:18 +0000 (11:33 -0400)]
cause the --reverse flag to invert string comparisons in custom queries

12 years agoCredit last change
Greg Sabino Mullane [Sat, 23 Mar 2013 16:14:06 +0000 (12:14 -0400)]
Credit last change

12 years agoMake sure connection checks return CRITICAL rather than UNKNOWN.
Dominic Hargreaves [Sat, 23 Mar 2013 16:09:34 +0000 (12:09 -0400)]
Make sure connection checks return CRITICAL rather than UNKNOWN.
Patch by Dominic Hargreaves with minor tweaks by Greg Sabino Mullane.
Thanks to Christoph Berg for the forward (this came in via the Debian bugs system)

12 years agoNew signatures
Greg Sabino Mullane [Wed, 13 Mar 2013 18:48:00 +0000 (14:48 -0400)]
New signatures

12 years agoSignature for 2.20.0 2.20.0
Greg Sabino Mullane [Wed, 13 Mar 2013 18:41:43 +0000 (14:41 -0400)]
Signature for 2.20.0

12 years agoManifest tweaks.
Greg Sabino Mullane [Wed, 13 Mar 2013 18:41:27 +0000 (14:41 -0400)]
Manifest tweaks.

12 years agoMinor tweaks to get ready for 2.20.0
Greg Sabino Mullane [Wed, 13 Mar 2013 18:38:12 +0000 (14:38 -0400)]
Minor tweaks to get ready for 2.20.0

12 years agoDon't barf when schema does not exist.
Greg Sabino Mullane [Wed, 13 Mar 2013 18:37:56 +0000 (14:37 -0400)]
Don't barf when schema does not exist.

12 years agoDon't assume that everyone has a home. Per github issue #23
Greg Sabino Mullane [Thu, 21 Feb 2013 02:25:49 +0000 (21:25 -0500)]
Don't assume that everyone has a home. Per github issue #23

12 years agoForce slave to be defined, per github issue 19: https://github.com/bucardo/check_post...
Greg Sabino Mullane [Mon, 11 Feb 2013 21:27:40 +0000 (16:27 -0500)]
Force slave to be defined, per github issue 19: https://github.com/bucardo/check_postgres/issues/19

12 years agoAdjust docs from earlier remote merge.
Greg Sabino Mullane [Mon, 11 Feb 2013 21:24:31 +0000 (16:24 -0500)]
Adjust docs from earlier remote merge.

12 years agoForce tests to use port 5432 in case PGPORT is conflicting.
Greg Sabino Mullane [Mon, 11 Feb 2013 21:23:46 +0000 (16:23 -0500)]
Force tests to use port 5432 in case PGPORT is conflicting.

12 years agoBetter debug output: check for dbdir and datadir separately.
Greg Sabino Mullane [Mon, 11 Feb 2013 21:22:25 +0000 (16:22 -0500)]
Better debug output: check for dbdir and datadir separately.

12 years ago Fix the check_bloat SQL to take inherited tables into account, and assume 2k for...
gp [Mon, 14 Jan 2013 12:45:43 +0000 (13:45 +0100)]
  Fix the check_bloat SQL to take inherited tables into account, and assume 2k for non-analyzed columns.

12 years agoCredit recent change.
Greg Sabino Mullane [Mon, 11 Feb 2013 20:04:09 +0000 (15:04 -0500)]
Credit recent change.

12 years agoGet rid of "uninitialized value" warnings.
Henrik Ahlgren [Fri, 14 Sep 2012 07:11:20 +0000 (10:11 +0300)]
Get rid of "uninitialized value" warnings.

12 years agoCredit recent change
Greg Sabino Mullane [Mon, 11 Feb 2013 19:55:33 +0000 (14:55 -0500)]
Credit recent change

12 years agocheck_txn_idle: fix query_time --excludeuser query
Mika Eloranta [Wed, 30 Jan 2013 19:23:15 +0000 (21:23 +0200)]
check_txn_idle: fix query_time --excludeuser query

Parenthesis are required:

"a OR b AND usename <> 'foo'" -> "(a OR b) AND usename <> 'foo'"

Fixes at least "query_time --includeuser/--excludeuser".

12 years agoCredit recent change
Greg Sabino Mullane [Mon, 11 Feb 2013 19:44:24 +0000 (14:44 -0500)]
Credit recent change

12 years agoFix userclause handling in check_txn_idle
Michael van Bracht [Mon, 11 Feb 2013 10:38:32 +0000 (11:38 +0100)]
Fix userclause handling in check_txn_idle

For databases > Postgrs 9.1, irrelevant records are discarded
with two ORed conditions. This makes the optional userclause
associate with the right hand side of the condition. The expression
needs to be grouped to get the desired effect regardless of the
evaluation of the previous condition.

12 years agoBump year to 2013 and some minor HTML adjustments.
Greg Sabino Mullane [Sat, 9 Feb 2013 04:24:06 +0000 (23:24 -0500)]
Bump year to 2013 and some minor HTML adjustments.

12 years agoMake sure hot_standby_delay doesn't return negative values
Guillaume Lelarge [Thu, 27 Dec 2012 08:57:55 +0000 (09:57 +0100)]
Make sure hot_standby_delay doesn't return negative values

Before this patch, the hot_standby_delay action could return negative values.
To minimize the risk, we first query the slave, then the master. And to make
sure, we never get negative values, we set them to zero if we have a negative
value.

Report and ideas from Filip Rembiałkowski.

12 years agoCredit recent change
Greg Sabino Mullane [Thu, 4 Oct 2012 03:43:54 +0000 (23:43 -0400)]
Credit recent change

12 years agoMake sure SQL2 is defined, per github issue 16
Greg Sabino Mullane [Thu, 4 Oct 2012 03:41:44 +0000 (23:41 -0400)]
Make sure SQL2 is defined, per github issue 16

12 years agoPostgres 9.2 compatibility
Josh Williams [Tue, 11 Sep 2012 16:58:29 +0000 (12:58 -0400)]
Postgres 9.2 compatibility

check_txn_idle and check_backends (and the backends test) have been
updated to use the new pg_stat_activity.  And check_disk_space now uses
pg_tablespace_location().

12 years agoFix disk_space docs
Guillaume Lelarge [Thu, 23 Aug 2012 17:50:39 +0000 (19:50 +0200)]
Fix disk_space docs

Comments from Lance Raymond.

12 years agoBegin support for new 9.2 pg_stat_activity.
Greg Sabino Mullane [Thu, 31 May 2012 17:52:25 +0000 (13:52 -0400)]
Begin support for new 9.2 pg_stat_activity.
This is just the groundwork: it will not work, as we have to use the new 'state'
column instead of parsing the text of current_query.

12 years agoCredits
Greg Sabino Mullane [Mon, 28 May 2012 22:09:35 +0000 (18:09 -0400)]
Credits

12 years agoFor the locks action, always output all databases with values of zero as needed....
Greg Sabino Mullane [Mon, 28 May 2012 15:34:32 +0000 (11:34 -0400)]
For the locks action, always output all databases with values of zero as needed. Per request from the mailing list. Also adjust the help messages to use : as a separator, not ;

12 years agoMerge remote branch 'f0rk/f0rk/empty_tables_bloat'
Greg Sabino Mullane [Mon, 28 May 2012 15:11:44 +0000 (11:11 -0400)]
Merge remote branch 'f0rk/f0rk/empty_tables_bloat'

12 years agoForce to port 5432 for funky systems.
Greg Sabino Mullane [Wed, 23 May 2012 03:50:07 +0000 (23:50 -0400)]
Force to port 5432 for funky systems.

12 years agoBail out early if the test server is completely unreachable
Greg Sabino Mullane [Wed, 23 May 2012 03:32:56 +0000 (23:32 -0400)]
Bail out early if the test server is completely unreachable

12 years agoNote that locks args can contain colons or semicolons or anything else: make the...
Greg Sabino Mullane [Wed, 23 May 2012 00:14:05 +0000 (20:14 -0400)]
Note that locks args can contain colons or semicolons or anything else: make the docs use colons.

12 years agoAdd label for the recent next.
Greg Sabino Mullane [Mon, 21 May 2012 20:32:11 +0000 (16:32 -0400)]
Add label for the recent next.

12 years agoVersion bump
Greg Sabino Mullane [Mon, 21 May 2012 20:12:51 +0000 (16:12 -0400)]
Version bump

12 years agoSpelling fixes.
Greg Sabino Mullane [Mon, 21 May 2012 20:12:46 +0000 (16:12 -0400)]
Spelling fixes.

12 years agoMinor cleanups.
Greg Sabino Mullane [Mon, 21 May 2012 20:12:26 +0000 (16:12 -0400)]
Minor cleanups.

12 years agoSpelling fixes
Greg Sabino Mullane [Mon, 21 May 2012 20:12:16 +0000 (16:12 -0400)]
Spelling fixes

12 years agoCache our specific sequence information during same_schema.
Greg Sabino Mullane [Mon, 21 May 2012 19:48:20 +0000 (15:48 -0400)]
Cache our specific sequence information during same_schema.
This greatly speeds things up for large schemas!

12 years agoMerge remote branch 'bucardo/master' into f0rk/empty_tables_bloat
Ryan P. Kelly [Thu, 17 May 2012 22:11:47 +0000 (18:11 -0400)]
Merge remote branch 'bucardo/master' into f0rk/empty_tables_bloat

12 years agoRestore totalwastedbytes
Ryan P. Kelly [Thu, 17 May 2012 22:10:34 +0000 (18:10 -0400)]
Restore totalwastedbytes

12 years agoMerge remote branch 'f0rk/f0rk/ignore_temp_sequences'
Greg Sabino Mullane [Sun, 13 May 2012 01:17:36 +0000 (21:17 -0400)]
Merge remote branch 'f0rk/f0rk/ignore_temp_sequences'

12 years agoCache the pg_typmod lookups.
Greg Sabino Mullane [Thu, 10 May 2012 19:21:33 +0000 (15:21 -0400)]
Cache the pg_typmod lookups.

12 years agoMake check_bloat gracefully deal with empty tables
Ryan P. Kelly [Wed, 9 May 2012 18:32:04 +0000 (14:32 -0400)]
Make check_bloat gracefully deal with empty tables

12 years agoIgnore sequences in the temporary namespace
Ryan P. Kelly [Wed, 9 May 2012 14:18:59 +0000 (10:18 -0400)]
Ignore sequences in the temporary namespace

13 years agoBetter --dbservice docs, as pointed out by Jason Ryan on the mailing list.
Greg Sabino Mullane [Mon, 30 Apr 2012 14:48:11 +0000 (10:48 -0400)]
Better --dbservice docs, as pointed out by Jason Ryan on the mailing list.

13 years agoMerge branch 'master' of bucardo.org:/var/lib/git/check_postgres
Greg Sabino Mullane [Mon, 23 Apr 2012 19:08:09 +0000 (15:08 -0400)]
Merge branch 'master' of bucardo.org:/var/lib/git/check_postgres

13 years agoRemove odd whitespace junk.
Greg Sabino Mullane [Mon, 23 Apr 2012 19:07:50 +0000 (15:07 -0400)]
Remove odd whitespace junk.

13 years agoFix check_postgres_hitratio documentation
Christoph Berg [Thu, 8 Mar 2012 08:44:42 +0000 (09:44 +0100)]
Fix check_postgres_hitratio documentation

check_postgres_hitratio was wrong called
check_postgres_database_hitratio in the documentation.

13 years agoAllow txn_idle to work again for < 8.3 servers by switching to query_time.
Greg Sabino Mullane [Mon, 20 Feb 2012 20:54:08 +0000 (15:54 -0500)]
Allow txn_idle to work again for < 8.3 servers by switching to query_time.

13 years agoBetter detection of stats_command_string being off.
Greg Sabino Mullane [Mon, 20 Feb 2012 20:34:54 +0000 (15:34 -0500)]
Better detection of stats_command_string being off.
Start work to allow txn_idle on old systems.

13 years agoCleaner "ERROR" output
Greg Sabino Mullane [Mon, 20 Feb 2012 20:27:32 +0000 (15:27 -0500)]
Cleaner "ERROR" output

13 years agoFix French UTF-8 character.
Greg Sabino Mullane [Mon, 20 Feb 2012 07:57:03 +0000 (02:57 -0500)]
Fix French UTF-8 character.

13 years agoAllow spaces within items within same_schema action.
Greg Sabino Mullane [Mon, 13 Feb 2012 21:50:21 +0000 (16:50 -0500)]
Allow spaces within items within same_schema action.
Bump version to 2.20.0

13 years agoNote recent change
Greg Sabino Mullane [Fri, 10 Feb 2012 16:24:20 +0000 (11:24 -0500)]
Note recent change

13 years agoMerge branch 'master' of bucardo.org:/var/lib/git/check_postgres
Greg Sabino Mullane [Fri, 10 Feb 2012 16:22:56 +0000 (11:22 -0500)]
Merge branch 'master' of bucardo.org:/var/lib/git/check_postgres

13 years agoMake sure STDOUT is using utf8. Per report from Emmanuel Lesouef
Greg Sabino Mullane [Fri, 10 Feb 2012 16:20:21 +0000 (11:20 -0500)]
Make sure STDOUT is using utf8. Per report from Emmanuel Lesouef

13 years agoUpdate the french translation
Guillaume Lelarge [Fri, 10 Feb 2012 15:34:35 +0000 (16:34 +0100)]
Update the french translation

13 years agoFix repository entry in META.yml
Cédric Villemain [Tue, 24 Jan 2012 12:54:03 +0000 (13:54 +0100)]
Fix repository entry in META.yml

just a trailling / and a s/https/git/ change

13 years agoAllows PGBINDIR in check_postgresrc
Cédric Villemain [Sun, 22 Jan 2012 22:44:11 +0000 (23:44 +0100)]
Allows PGBINDIR in check_postgresrc

This is the same approach as it is with PSQL variable (the $NO_PSQL_OPTION
variable har-coded *MUST* be set to 0 to use them).

PGBINDIR can be set in ENV, hard-coded in check_postgres.pl or set via
command-line argument.
PGCONTROLDATA and PSQL can still be used but should be deprecated.

the logic is if NO_PSQL_OPTION=1 :
 * that PGBINDIR can be set via environment variable, but not via config
file or command-line argument.
 * that PSQL can not be set explicitly, but derived from PGBINDIR

13 years agoFix the createlang during init
Cédric Villemain [Sun, 22 Jan 2012 22:51:12 +0000 (23:51 +0100)]
Fix the createlang during init

There was a copy-n-paste error, only affecting < 8.1 .

13 years agoRevert "Minor change in bloat test"
Cédric Villemain [Sun, 22 Jan 2012 14:38:00 +0000 (15:38 +0100)]
Revert "Minor change in bloat test"

This reverts commit 7788d081ab5ed74d53f699bc7333e00f2bb59d9a.

GSM: Data::Dumper is handy for when you do want to Dump something.

13 years agoNote the symlink for generic tarball
Greg Sabino Mullane [Sun, 22 Jan 2012 14:28:07 +0000 (09:28 -0500)]
Note the symlink for generic tarball

13 years agoUpdate History for 2.20.0
Cédric Villemain [Sun, 22 Jan 2012 13:11:30 +0000 (14:11 +0100)]
Update History for 2.20.0

Add check for pgagent jobs (David E. Wheeler)

13 years agoMinor change in bloat test
Cédric Villemain [Sun, 22 Jan 2012 12:54:34 +0000 (13:54 +0100)]
Minor change in bloat test

The test was loading Data::Dumepr but not using it.

13 years agoAdd `pgagent_jobs` test.
Cédric Villemain [Sun, 22 Jan 2012 12:46:43 +0000 (13:46 +0100)]
Add `pgagent_jobs` test.

From: "David E. Wheeler" <[email protected]>

This patch adds support for checking for failed pgAgent jobs within a specified
period of time. You can specify either --critical or --warning as a period of
time, and it will report on failures within that period of time previous to the
current time. Job failures are determined by a non-0 status in a job step
record.

Using this test obviously requiers that the pgAgent schema be installed. I've
also included a bunch of unit tests to make sure it works the way I would expect
(the test will create a schema for testing) and documentation.

As part of this, I've introduced the `any_warning` argument to
`validate_range()`. The `pgagent_jobs` test does not care if you specify a
warning value greater than the critical value (indeed, I expect that if one used
both at all, the warning would be much longer). So this new argument prevents
the `range-warnbigtime` or `range-warnbigsize` failures from being triggered.

Cedric: I sorted the POD and added the action_info so that t/05_docs.t is ok.
I also built and push the new .html

13 years agoAdd link
Greg Sabino Mullane [Wed, 18 Jan 2012 16:23:16 +0000 (11:23 -0500)]
Add link

13 years agoMore tweaks to the release process.
Greg Sabino Mullane [Wed, 18 Jan 2012 03:37:17 +0000 (22:37 -0500)]
More tweaks to the release process.

13 years agoNote need to commit before the tagging.
Greg Sabino Mullane [Wed, 18 Jan 2012 02:57:36 +0000 (21:57 -0500)]
Note need to commit before the tagging.

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.