summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 20cc276)
raw | patch | inline | side by side (parent: 20cc276)
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Sat, 8 Feb 2003 06:00:51 +0000 (06:00 +0000) | ||
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Sat, 8 Feb 2003 06:00:51 +0000 (06:00 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@295 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_pgsql.c | patch | blob | history |
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index 613ff2612bedee4e352ad5ef68839d5dbb97b386..2d80fad1bb04560c89fafc1dcd1c639ad942bcc0 100644 (file)
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
-H, --hostname=STRING\n\
Name or numeric IP address of machine running backend\n\
-P, --port=INTEGER\n\
- Port running backend (default: %s)\n\
+ Port running backend (default: %d)\n\
-d, --database=STRING\n\
Database to check (default: %s)\n\
-l, --logname = STRING\n\
#define DEFAULT_DB "template1"
#define DEFAULT_HOST "127.0.0.1"
-#define DEFAULT_PORT "5432"
-#define DEFAULT_WARN 2
-#define DEFAULT_CRIT 8
-#define DEFAULT_TIMEOUT 30
+enum {
+ DEFAULT_PORT = 5432,
+ DEFAULT_WARN = 2,
+ DEFAULT_CRIT = 8,
+ DEFAULT_TIMEOUT = 30
+};
#include "config.h"
#include "common.h"
char *pghost = NULL; /* host name of the backend server */
char *pgport = NULL; /* port of the backend server */
-char default_port[4] = DEFAULT_PORT;
+int default_port = DEFAULT_PORT;
char *pgoptions = NULL;
char *pgtty = NULL;
char dbName[NAMEDATALEN] = DEFAULT_DB;