[nagiosplug] check_pgsql: Allow UNIX socket directories as ...
"Nagios Plugin Development" <[email protected]> Sat, 17 Aug 2013 20:50:41 +0000
| Newsgroups | gmane.network.nagios.plugins.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module: nagiosplug Branch: master Commit: a241ab0b9de9aa1dca32745d8461d649c48b4cc2 Author: Sebastian Harl <[email protected]> Date: Thu Apr 7 11:13:49 2011 +0200 URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=a241ab0 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/. --- plugins/check_pgsql.c | 2 +- 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) query_warning = optarg; break; case 'H': /* host */ - if (!is_host (optarg)) + if ((*optarg != '/') && (!is_host (optarg))) usage2 (_("Invalid hostname/address"), optarg); else pghost = optarg; ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk