[check_postgres] [commit] Add --simple option.

check_postgres at bucardo.org check_postgres at bucardo.org
Tue Jul 29 00:05:41 UTC 2008


Committed by Greg Sabino Mullane <greg at endpoint.com>

Add --simple option.
Bump version to 2.1.2.

---
 .perlcriticrc          |    2 +-
 check_postgres.pl      |   16 ++++++++++++++--
 check_postgres.pl.html |   11 ++++++++++-
 index.html             |    6 +++---
 t/99_spellcheck.t      |    3 ++-
 5 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/.perlcriticrc b/.perlcriticrc
index 3d96425..2752d29 100644
--- a/.perlcriticrc
+++ b/.perlcriticrc
@@ -4,7 +4,7 @@ verbose = 8
 severity = 1
 
 [Documentation::PodSpelling]
-stop_words = Mullane Nagios Slony nols salesrep psql dbname postgres USERNAME usernames dbuser pgpass nagios stderr showperf symlinked timesync criticals quirm lancre exabytes sami includeuser excludeuser flagg tardis WAL tablespaces tablespace perflimit burrick mallory grimm oskar ExclusiveLock garrett artemus queryname speedtest checksum checksums morpork klatch pluto faceoff slon greg watson franklin wilkins scott Sabino Seklecki dbpass autovacuum Astill refactoring NAGIOS localhost cronjob symlink symlinks backends snazzo logfile syslog parens plugin Cwd Ioannis Tambouras schemas SQL MRTG mrtg uptime
+stop_words = Mullane Nagios Slony nols salesrep psql dbname postgres USERNAME usernames dbuser pgpass nagios stderr showperf symlinked timesync criticals quirm lancre exabytes sami includeuser excludeuser flagg tardis WAL tablespaces tablespace perflimit burrick mallory grimm oskar ExclusiveLock garrett artemus queryname speedtest checksum checksums morpork klatch pluto faceoff slon greg watson franklin wilkins scott Sabino Seklecki dbpass autovacuum Astill refactoring NAGIOS localhost cronjob symlink symlinks backends snazzo logfile syslog parens plugin Cwd Ioannis Tambouras schemas SQL MRTG mrtg uptime datallowconn
 
 ## Severity 5:
 [-Subroutines::ProhibitNestedSubs]
diff --git a/check_postgres.pl b/check_postgres.pl
index e84aea7..d3ec78b 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -28,7 +28,7 @@ $Data::Dumper::Varname = 'POSTGRES';
 $Data::Dumper::Indent = 2;
 $Data::Dumper::Useqq = 1;
 
-our $VERSION = '2.1.1';
+our $VERSION = '2.1.2';
 
 use vars qw/ %opt $PSQL $res $COM $SQL $db /;
 
@@ -86,6 +86,7 @@ die $USAGE unless
 			   'verbose|v+',
 			   'help|h',
 			   'output=s',
+			   'simple',
 			   'showperf=i',
 			   'perflimit=i',
 			   'showtime=i',
@@ -138,6 +139,9 @@ if (!$OUTPUT) {
 	if ($dir =~ /(nagios|mrtg|simple)/io) {
 		$OUTPUT = lc $1;
 	}
+	elsif ($opt{simple}) {
+		$OUTPUT = 'simple';
+	}
 	else {
 		$OUTPUT = $DEFAULT_OUTPUT;
 	}
@@ -3261,7 +3265,7 @@ check_postgres.pl - Postgres monitoring script for Nagios, MRTG, and others
 
 =head1 VERSION
 
-This documents describes B<check_postgres.pl> version 2.1.1
+This documents describes B<check_postgres.pl> version 2.1.2
 
 =head1 SYNOPSIS
 
@@ -3305,6 +3309,9 @@ if no --output argument is given, and if the current directory has one of the
 output options in its name. For example, creating a directory named mrtg and 
 populating it with symlinks via the I<--symlinks> argument would ensure that 
 any actions run from that directory will always default to an output of "mrtg"
+As a shortcut for --output=simple, you can enter --simple, which also overrides 
+the directory naming trick.
+
 
 =head3 Nagios output
 
@@ -4327,6 +4334,11 @@ Items not specifically attributed are by Greg Sabino Mullane.
 
 =over 4
 
+=item B<Version 2.1.2> (July 28, 2008)
+
+Fix sorting error in the "disk_space" action for non-Nagios output.
+Allow --simple as a shortcut for --output=simple.
+
 =item B<Version 2.1.1> (July 22, 2008)
 
 Don't check databases with datallowconn false for the "autovac_freeze" action.
diff --git a/check_postgres.pl.html b/check_postgres.pl.html
index 564b859..d29b2e1 100644
--- a/check_postgres.pl.html
+++ b/check_postgres.pl.html
@@ -63,7 +63,7 @@
 </p>
 <hr />
 <h1><a name="version">VERSION</a></h1>
-<p>This documents describes <strong>check_postgres.pl</strong> version 2.1.1</p>
+<p>This documents describes <strong>check_postgres.pl</strong> version 2.1.2</p>
 <p>
 </p>
 <hr />
@@ -110,6 +110,8 @@ if no --output argument is given, and if the current directory has one of the
 output options in its name. For example, creating a directory named mrtg and 
 populating it with symlinks via the <em>--symlinks</em> argument would ensure that 
 any actions run from that directory will always default to an output of &quot;mrtg&quot;</p>
+As a shortcut for --output=simple, you can enter --simple, which also overrides 
+the directory naming trick.
 <p>
 </p>
 <h3><a name="nagios_output">Nagios output</a></h3>
@@ -1367,6 +1369,13 @@ feature requests, and commit notices, send email to <a href="mailto:check_postgr
 <h1><a name="history">HISTORY</a></h1>
 <p>Items not specifically attributed are by Greg Sabino Mullane.</p>
 <dl>
+<dt><strong><a name="1" class="item"><strong>Version 2.1.2</strong> (July 28, 2008)</a></strong>
+
+<dd>
+<p>Fix sorting error in the "disk_space" action for non-Nagios output.
+Allow --simple as a shortcut for --output=simple.</p>
+</dd>
+</li>
 <dt><strong><a name="1" class="item"><strong>Version 2.1.1</strong> (July 22, 2008)</a></strong>
 
 <dd>
diff --git a/index.html b/index.html
index ab90704..f39ebbb 100644
--- a/index.html
+++ b/index.html
@@ -21,13 +21,13 @@ h1 {
 
 <h1>check_postgres.pl</h1>
 
-<p><b>check_postgres.pl</b> is a script for checking the state of one or more Postgres databases and reporting back in a Nagios-friendly manner. It was developed by Greg Sabino Mullane of <a href="http://www.endpoint.com/">End Point Corporation</a> and is BSD-licensed. The latest version is <b>2.1.1</b>, and was released on July 22, 2008.</p>
+<p><b>check_postgres.pl</b> is a script for checking the state of one or more Postgres databases and reporting back in a Nagios-friendly manner. It was developed by Greg Sabino Mullane of <a href="http://www.endpoint.com/">End Point Corporation</a> and is BSD-licensed. The latest version is <b>2.1.2</b>, and was released on July 28, 2008.</p>
 
 <ul>
- <li><a href="/check_postgres/check_postgres.pl.html">Documentation for check_postgres 2.1.1</a></li>
+ <li><a href="/check_postgres/check_postgres.pl.html">Documentation for check_postgres 2.1.2</a></li>
 </ul>
 <ul>
- <li><a href="/check_postgres/check_postgres.pl">Download check_postgres.pl 2.1.1</a></li>
+ <li><a href="/check_postgres/check_postgres.pl">Download check_postgres.pl 2.1.2</a></li>
  <li><a href="/check_postgres/check_postgres.pl.asc">PGP signature for check_postgres.pl</a></li>
 </ul>
 
diff --git a/t/99_spellcheck.t b/t/99_spellcheck.t
index 6c2e2d5..1cf7795 100644
--- a/t/99_spellcheck.t
+++ b/t/99_spellcheck.t
@@ -99,7 +99,7 @@ SKIP: {
 ## Now the comments
 SKIP: {
 	if (!eval { require File::Comments; 1 }) {
-		skip 'Need File::Comments to test the spelling inside comments', 2;
+		skip 'Need File::Comments to test the spelling inside comments', 4;
 	}
 	my $fc = File::Comments->new();
 
@@ -187,6 +187,7 @@ checksums
 cperl
 criticals
 cronjob
+datallowconn
 dbname
 dbpass
 dbuser
-- 
1.5.5.4



More information about the Check_postgres mailing list