From: Sebastian Harl Date: Thu, 7 Apr 2011 09:13:49 +0000 (+0200) Subject: check_pgsql: Allow UNIX socket directories as hostname as well. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6b0b1a046a07224b4061929357abd6785390c686;p=nagiosplug.git 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 b2e1876..6251e0b 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;