From: Greg Sabino Mullane Date: Mon, 24 Jan 2011 17:37:44 +0000 (-0500) Subject: Bump version to 2.17.0, not recent commit in changes. X-Git-Tag: 2.18.0~129 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=e3414845479f01d5137f5bcb96132f2636159d1f;p=check_postgres.git Bump version to 2.17.0, not recent commit in changes. --- diff --git a/META.yml b/META.yml index 1389151d5..fdb7ba711 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name : check_postgres.pl -version : 2.16.0 +version : 2.17.0 abstract : Postgres monitoring script author: - Greg Sabino Mullane @@ -30,7 +30,7 @@ recommends: provides: check_postgres: file : check_postgres.pl - version : 2.16.0 + version : 2.17.0 keywords: - Postgres diff --git a/Makefile.PL b/Makefile.PL index 1f19a858a..24f6d5bff 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -6,7 +6,7 @@ use strict; use warnings; use 5.006001; -my $VERSION = '2.16.0'; +my $VERSION = '2.17.0'; if ($VERSION =~ /_/) { print "WARNING! This is a test version ($VERSION) and should not be used in production!\n"; diff --git a/check_postgres.pl b/check_postgres.pl index c7ce25880..f43b859d3 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -30,7 +30,7 @@ $Data::Dumper::Varname = 'POSTGRES'; $Data::Dumper::Indent = 2; $Data::Dumper::Useqq = 1; -our $VERSION = '2.16.0'; +our $VERSION = '2.17.0'; use vars qw/ %opt $PSQL $res $COM $SQL $db /; @@ -7326,7 +7326,7 @@ sub check_archive_ready { B - a Postgres monitoring script for Nagios, MRTG, Cacti, and others -This documents describes check_postgres.pl version 2.16.0 +This documents describes check_postgres.pl version 2.17.0 =head1 SYNOPSIS @@ -8938,6 +8938,10 @@ Items not specifically attributed are by Greg Sabino Mullane. =over 4 +=item B + + Allow "and", "or" inside arguments (David E. Wheeler) + =item B January 20, 2011 Add new action 'hot_standby_delay' (Nicolas Thauvin) diff --git a/check_postgres.pl.html b/check_postgres.pl.html index 613464e13..6769fac4f 100644 --- a/check_postgres.pl.html +++ b/check_postgres.pl.html @@ -117,7 +117,7 @@

NAME

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

-

This documents describes check_postgres.pl version 2.16.0

+

This documents describes check_postgres.pl version 2.17.0


@@ -516,7 +516,7 @@ by use of the VACUUM command.) This action requires that stats collection be enabled on the target databases, and requires that ANALYZE is run frequently. The --include and --exclude options can be used to filter out which tables to look at. See the BASIC FILTERING section for more details.

-

The --warning and --critical options can be specified as sizes or percents. +

The --warning and --critical options can be specified as sizes, percents, or both. Valid size units are bytes, kilobytes, megabytes, gigabytes, terabytes, exabytes, petabytes, and zettabytes. You can abbreviate all of those with the first letter. Items without units are assumed to be 'bytes'. The default values are '1 GB' and '5 GB'. The value @@ -538,13 +538,21 @@ index size is even more of a guess than the correct table size, but both should give a rough idea of how bloated things are.

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'

Example 3: Give a critical if table 'q4' on database 'sales' is over 50% bloated

   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'
+

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%'

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 @@ -770,7 +778,7 @@ the name of the table and the name of the trigger for each disabled trigger.

that you have the executable "/bin/df" available to report on disk sizes, and it also needs to be run as a superuser, so it can examine the data_directory setting inside of Postgres. The --warning and --critical options are -given in either sizes or percentages. If using sizes, the standard unit types +given in either sizes or percentages or both. If using sizes, the standard unit types are allowed: bytes, kilobytes, gigabytes, megabytes, gigabytes, terabytes, or exabytes. Each may be abbreviated to the first letter only; no units at all indicates 'bytes'. The default values are '90%' and '95%'.

@@ -790,6 +798,13 @@ maps to a file system: these can be included or excluded. See the

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"
+

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'
+

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'

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.