From 85f3e45ca99ba5e779d77b6c326803897ee84cfb Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Mon, 28 Jul 2008 20:04:57 -0400 Subject: Add --simple option. Bump version to 2.1.2. --- check_postgres.pl | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'check_postgres.pl') 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. -- cgit v1.2.3