From a241ab0b9de9aa1dca32745d8461d649c48b4cc2 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 7 Apr 2011 11:13:49 +0200 Subject: 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/. 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) query_warning = optarg; break; case 'H': /* host */ - if (!is_host (optarg)) + if ((*optarg != '/') && (!is_host (optarg))) usage2 (_("Invalid hostname/address"), optarg); else pghost = optarg; -- cgit v0.10-9-g596f