From 85f3e45ca99ba5e779d77b6c326803897ee84cfb Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Mon, 28 Jul 2008 20:04:57 -0400 Subject: [PATCH] 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 3d9642504..2752d29fc 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 e84aea700..d3ec78b91 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 version 2.1.1 +This documents describes B 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 (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 (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 564b85931..d29b2e163 100644 --- a/check_postgres.pl.html +++ b/check_postgres.pl.html @@ -63,7 +63,7 @@


VERSION

-

This documents describes check_postgres.pl version 2.1.1

+

This documents describes check_postgres.pl version 2.1.2


@@ -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 --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.

Nagios output

@@ -1367,6 +1369,13 @@ feature requests, and commit notices, send email to HISTORY

Items not specifically attributed are by Greg Sabino Mullane.

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

+
+
Version 2.1.1 (July 22, 2008)
diff --git a/index.html b/index.html index ab90704cd..f39ebbbac 100644 --- a/index.html +++ b/index.html @@ -21,13 +21,13 @@ h1 {

check_postgres.pl

-

check_postgres.pl 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 End Point Corporation and is BSD-licensed. The latest version is 2.1.1, and was released on July 22, 2008.

+

check_postgres.pl 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 End Point Corporation and is BSD-licensed. The latest version is 2.1.2, and was released on July 28, 2008.

diff --git a/t/99_spellcheck.t b/t/99_spellcheck.t index 6c2e2d5a1..1cf779597 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 -- 2.30.2