Np net connect verbose (#1277)

waja notifications at github.com
Mon Jul 28 23:20:00 CEST 2014


This patch will add the IP and port, or socket name, to the error message
and thus simplify the problem debugging: no need to check for this
information in the Nagios configuration.
This function is only used by 'check_tcp.c'.

Without the patch:

$ ./plugins/check_tcp -H 127.0.0.1 -p 21
Connection refused
$ ./plugins/check_tcp -H /var/spool/nagios/cmd/nagios.cmd
Permission denied

With the patch:

$ ./plugins/check_tcp -H 127.0.0.1 -p 21
connect to address 127.0.0.1 and port 21: Connection refused
$ ./plugins/check_tcp -H /var/spool/nagios/cmd/nagios.cmd
connect to socket /var/spool/nagios/cmd/nagios.cmd: Permission denied

See https://github.com/nagios-plugins/nagios-plugins/pull/37
You can merge this Pull Request by running:

  git pull https://github.com/waja/monitoring-plugins np_net_connect_verbose

Or you can view, comment on it, or merge it online at:

  https://github.com/monitoring-plugins/monitoring-plugins/pull/1277

-- Commit Summary --

  * This patch will add the IP and port, or socket name, to the error
  message and
  * netutils.c - A few more changes

-- File Changes --

    M plugins/netutils.c (15)

-- Patch Links --

https://github.com/monitoring-plugins/monitoring-plugins/pull/1277.patch
https://github.com/monitoring-plugins/monitoring-plugins/pull/1277.diff

-- 
Reply to this email on GitHub:
https://github.com/monitoring-plugins/monitoring-plugins/pull/1277
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20140728/696150fb/attachment.html>


More information about the Devel mailing list