summaryrefslogtreecommitdiffstats
path: root/plugins/check_pgsql.c
diff options
context:
space:
mode:
authorSebastian Harl <sh@teamix.net>2011-04-07 09:13:49 (GMT)
committerSebastian Harl <sh@teamix.net>2012-07-05 09:36:57 (GMT)
commita241ab0b9de9aa1dca32745d8461d649c48b4cc2 (patch)
tree69b87f134ed82432fbc57a47360a61a00cd260cc /plugins/check_pgsql.c
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/check_pgsql.c')
-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 cf526a6..c20c991 100644
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
@@ -321,7 +321,7 @@ process_arguments (int argc, char **argv)
321 query_warning = optarg; 321 query_warning = optarg;
322 break; 322 break;
323 case 'H': /* host */ 323 case 'H': /* host */
324 if (!is_host (optarg)) 324 if ((*optarg != '/') && (!is_host (optarg)))
325 usage2 (_("Invalid hostname/address"), optarg); 325 usage2 (_("Invalid hostname/address"), optarg);
326 else 326 else
327 pghost = optarg; 327 pghost = optarg;