Bump version to 2.17.0, not recent commit in changes.
authorGreg Sabino Mullane <[email protected]>
Mon, 24 Jan 2011 17:37:44 +0000 (12:37 -0500)
committerGreg Sabino Mullane <[email protected]>
Mon, 24 Jan 2011 17:37:44 +0000 (12:37 -0500)
META.yml
Makefile.PL
check_postgres.pl
check_postgres.pl.html

index 1389151d59781741f102437972333f747a8ca631..fdb7ba71164327c9fd7f02e35d59b16c54560939 100644 (file)
--- 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 <[email protected]>
@@ -30,7 +30,7 @@ recommends:
 provides:
   check_postgres:
     file                    : check_postgres.pl
-    version                 : 2.16.0
+    version                 : 2.17.0
 
 keywords:
   - Postgres
index 1f19a858a40f45faeb93d018fd7636844a41d099..24f6d5bffc3fe84b954c62ad68611dbb395601f7 100644 (file)
@@ -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";
index c7ce25880e787b19c3a3f47d6382f5fa77c2293a..f43b859d3051208f3bf57dabc7e83eb5985eaf8c 100755 (executable)
@@ -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<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
 
 =head1 SYNOPSIS
 
@@ -8938,6 +8938,10 @@ Items not specifically attributed are by Greg Sabino Mullane.
 
 =over 4
 
+=item B<Version 2.17.0>
+
+  Allow "and", "or" inside arguments (David E. Wheeler)
+
 =item B<Version 2.16.0> January 20, 2011
 
   Add new action 'hot_standby_delay' (Nicolas Thauvin)
index 613464e13aaaed3313763c768e0f001eeeda5dc2..6769fac4fc0b0a9603f06377e1ba728ba334b940 100644 (file)
 <hr />
 <h1><a name="name">NAME</a></h1>
 <p><strong>check_postgres.pl</strong> - a Postgres monitoring script for Nagios, MRTG, Cacti, and others</p>
-<p>This documents describes check_postgres.pl version 2.16.0</p>
+<p>This documents describes check_postgres.pl version 2.17.0</p>
 <p>
 </p>
 <hr />
@@ -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 <em>--include</em> and <em>--exclude</em> options can be used to filter out which tables 
 to look at. See the <a href="#basic_filtering">BASIC FILTERING</a> section for more details.</p>
-<p>The <em>--warning</em> and <em>--critical</em> options can be specified as sizes or percents.
+<p>The <em>--warning</em> and <em>--critical</em> 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.</p>
 <p>Example 1: Warn if any table on port 5432 is over 100 MB bloated, and critical if over 200 MB</p>
 <pre>
-  check_postgres_bloat --port=5432 --warning='100 M', --critical='200 M'</pre>
+  check_postgres_bloat --port=5432 --warning='100 M' --critical='200 M'</pre>
 <p>Example 2: Give a critical if table 'orders' on host 'sami' has more than 10 megs of bloat</p>
 <pre>
   check_postgres_bloat --host=sami --include=orders --critical='10 MB'</pre>
 <p>Example 3: Give a critical if table 'q4' on database 'sales' is over 50% bloated</p>
 <pre>
   check_postgres_bloat --db=sales --include=q4 --critical='50%'</pre>
+<p>Example 4: Give a critical any table is over 20% bloated <em>and</em> has over 150
+MB of bloat:</p>
+<pre>
+  check_postgres_bloat --port=5432 --critical='20% and 150 M'</pre>
+<p>Example 5: Give a critical any table is over 40% bloated <em>or</em> has over 500 MB
+of bloat:</p>
+<pre>
+  check_postgres_bloat --port=5432 --warning='500 M or 40%'</pre>
 <p>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.</p>
 that you have the executable &quot;/bin/df&quot; available to report on disk sizes, and it 
 also needs to be run as a superuser, so it can examine the <strong>data_directory</strong> 
 setting inside of Postgres. The <em>--warning</em> and <em>--critical</em> 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%'.</p>
@@ -790,6 +798,13 @@ maps to a file system: these can be included or excluded. See the
 <p>Example 2: Check that all file systems starting with /dev/sda are smaller than 10 GB and 11 GB (warning and critical)</p>
 <pre>
   check_postgres_disk_space --port=5432 --warning='10 GB' --critical='11 GB' --include=&quot;~^/dev/sda&quot;</pre>
+<p>Example 4: Make sure that no file system is both over 50% <em>and</em> has over 15 GB</p>
+<pre>
+  check_postgres_disk_space --critical='50% and 15 GB'</pre>
+<p>Example 5: Issue a warning if any file system is either over 70% full <em>or</em> has
+more than 1T</p>
+<pre>
+  check_postgres_disk_space --warning='1T or 75'</pre>
 <p>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.</p>
 <p>