$Data::Dumper::Indent = 2;
$Data::Dumper::Useqq = 1;
-our $VERSION = '1.6.0';
+our $VERSION = '1.6.1';
use vars qw/ %opt $PSQL $res $COM $SQL $db /;
'showtime=i',
'timeout|t=i',
'test',
+ 'symlinks',
'action=s',
'warning=s',
-v, --verbose verbosity level; can be used more than once to increase the level
-h, --help display this help information
-t X, --timeout=X how long in seconds before we timeout. Defaults to 10 seconds.
+ --symlinks create named symlinks to the main program for each action
Actions:
Which test is determined by the --action option, or by the name of the program
$action_usage
-Special actions:
- rebuild_symlinks - Make named symlinks to the main program for each action
- rebuild_symlinks_force - Same as above, but removes existing symlinks first.
-
For a complete list of options and full documentation, please view the POD for this file.
Two ways to do this is to run:
pod2text $ME | less
exit;
}
+build_symlinks() if $opt{symlinks};
+
$action =~ /\w/ or die $USAGE;
## Be nice and figure out what they meant
=head1 VERSION
-This documents describes B<check_postgres.pl> version 1.6.0
+This documents describes B<check_postgres.pl> version 1.6.1
=head1 SYNOPSIS
## Create all symlinks
- check_postgres.pl --action=build_symlinks
+ check_postgres.pl --symlinks
## Check connection to Postgres database 'pluto':
check_postgres.pl --action=connection --db=pluto
check_postgres_timesync
All the symlinks are created for you in the current directory
-if use the action "build_symlinks":
+if use the option --symlinks
- perl check_postgres.pl --action="build_symlinks"
+ perl check_postgres.pl --symlinks
If the file name already exists, it will not be overwritten. If the file exists
-and is a symlink, you can force it to overwrite by using "build_symlinks_force"
+and is a symlink, you can force it to overwrite by using "--action=build_symlinks_force"
Most actions take a B<--warning> and an B<--critical> option, indicating at what
point we change from OK to WARNING, and what point we go to CRITICAL. Note that
but simply creates symlinks in the current directory for each action, in the form
B<check_postgres_E<lt>action_nameE<gt>>.
If the file already exists, it will not be overwritten. If the action is rebuild_symlinks_force,
-then symlinks will be overwritten.
+then symlinks will be overwritten. The option --symlinks is a shorter way of saying
+--action=rebuild_symlinks
=item B<settings_checksum> (symlink: C<check_postgres_settings_checksum>)
=item B<Version 1.6.0> (May 11, 2008)
+Add --symlinks arg as a shortcut to --action=rebuild_symlinks
+
+=item B<Version 1.6.0> (May 11, 2008)
+
Add the custom_query action.
=item B<Version 1.5.2> (May 2, 2008)