summaryrefslogtreecommitdiffstats
path: root/plugins/check_pgsql.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_pgsql.c')
-rw-r--r--plugins/check_pgsql.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index b532d68..2d2f6d3 100644
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
@@ -29,8 +29,7 @@
29enum { 29enum {
30 DEFAULT_PORT = 5432, 30 DEFAULT_PORT = 5432,
31 DEFAULT_WARN = 2, 31 DEFAULT_WARN = 2,
32 DEFAULT_CRIT = 8, 32 DEFAULT_CRIT = 8
33 DEFAULT_TIMEOUT = 30
34}; 33};
35 34
36#include "config.h" 35#include "config.h"
@@ -125,6 +124,10 @@ Please note that all tags must be lowercase to use the DocBook XML DTD.
125void 124void
126print_help (void) 125print_help (void)
127{ 126{
127 char *myport;
128
129 asprintf (&myport, "%d", DEFAULT_PORT);
130
128 print_revision (progname, revision); 131 print_revision (progname, revision);
129 132
130 printf (_(COPYRIGHT), copyright, email); 133 printf (_(COPYRIGHT), copyright, email);
@@ -135,7 +138,9 @@ print_help (void)
135 138
136 printf (_(HELP_VRSN)); 139 printf (_(HELP_VRSN));
137 140
138 printf (_(HOST_PORT_46), 'P', "5432"); 141 printf (_(HOST_PORT), 'P', myport);
142
143 printf (_(IPv46));
139 144
140 printf (S_("\ 145 printf (S_("\
141 -d, --database=STRING\n\ 146 -d, --database=STRING\n\
@@ -143,7 +148,7 @@ print_help (void)
143 -l, --logname = STRING\n\ 148 -l, --logname = STRING\n\
144 Login name of user\n\ 149 Login name of user\n\
145 -p, --password = STRING\n\ 150 -p, --password = STRING\n\
146 Password (BIG SECURITY ISSUE)\n\n"), DEFAULT_DB); 151 Password (BIG SECURITY ISSUE)\n"), DEFAULT_DB);
147 152
148 printf (_(WARN_CRIT_TO), DEFAULT_SOCKET_TIMEOUT); 153 printf (_(WARN_CRIT_TO), DEFAULT_SOCKET_TIMEOUT);
149 154