[check_postgres] [commit] Move default user and port higher up in the file.
check_postgres at bucardo.org
check_postgres at bucardo.org
Fri Dec 12 17:04:43 UTC 2008
Committed by Greg Sabino Mullane <greg at endpoint.com>
Move default user and port higher up in the file.
---
check_postgres.pl | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/check_postgres.pl b/check_postgres.pl
index fc6d834..78182aa 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -32,6 +32,15 @@ our $VERSION = '2.5.1';
use vars qw/ %opt $PSQL $res $COM $SQL $db /;
+## Which user to connect as if --dbuser is not given
+$opt{defaultuser} = 'postgres';
+
+## Which port to connect to if --dbport is not given
+$opt{defaultport} = 5432;
+
+## What type of output to use by default
+our $DEFAULT_OUTPUT = 'nagios';
+
## If psql is not in your path, it is recommended that hardcode it here,
## as an alternative to the --PSQL option
$PSQL = '';
@@ -39,18 +48,9 @@ $PSQL = '';
## If this is true, $opt{PSQL} is disabled for security reasons
our $NO_PSQL_OPTION = 1;
-## What type of output to use by default
-our $DEFAULT_OUTPUT = 'nagios';
-
## If true, we show how long each query took by default. Requires Time::HiRes to be installed.
$opt{showtime} = 1;
-## Which user to connect as if --dbuser is not given
-$opt{defaultuser} = 'postgres';
-
-## Which port to connect to if --dbport is not given
-$opt{defaultport} = 5432;
-
## If true, we show "after the pipe" statistics
$opt{showperf} = 1;
--
1.5.5.4
More information about the Check_postgres
mailing list