diff options
author | Greg Sabino Mullane | 2008-12-12 17:04:27 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2008-12-12 17:04:27 +0000 |
commit | b883abcd6ded565d7168307d059d56c17e9ec8d3 (patch) | |
tree | 4b49c66041e637b08a6c1c8d9896b785cffc87d3 /check_postgres.pl | |
parent | 238f6aa44969f9d6852d876af70fd202a7abbd8a (diff) |
Move default user and port higher up in the file.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index fc6d8342c..78182aa64 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; |