aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Sebastian Harl <sh@teamix.net> 2011-04-07 11:13:49 +0200
committerGravatar Sebastian Harl <sh@teamix.net> 2012-07-05 11:36:57 +0200
commita241ab0b9de9aa1dca32745d8461d649c48b4cc2 (patch)
tree69b87f134ed82432fbc57a47360a61a00cd260cc /plugins
parentf3e2ebd974c2b0c07321663fc7255c7ace916ba5 (diff)
downloadmonitoring-plugins-a241ab0b9de9aa1dca32745d8461d649c48b4cc2.tar.gz
check_pgsql: Allow UNIX socket directories as hostname as well.
PostgreSQL accepts the directory name of its UNIX socket as hostname as well, e.g. /var/run/postgresql/.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_pgsql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index cf526a6e..c20c9914 100644
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
@@ -321,7 +321,7 @@ process_arguments (int argc, char **argv)
query_warning = optarg;
break;
case 'H': /* host */
- if (!is_host (optarg))
+ if ((*optarg != '/') && (!is_host (optarg)))
usage2 (_("Invalid hostname/address"), optarg);
else
pghost = optarg;