Add support for showing name (DNS) resolution in the `check_ping` plugin output (STDOUT). (#1284)
Mark A. Ziesemer
notifications at github.com
Fri Aug 1 23:05:40 CEST 2014
Add support for showing name (DNS) resolution in the `check_ping` plugin
output (STDOUT).
As written (alternate suggestions welcome), after being enabled with `-s` or
`--show-resolution`, the output of a sample command (including the shorthand
`-s` combined with the standard `-H`):
check_ping -sH someHost -w 3000.0,80% -c 5000.0,100% -p 5
... will be presented as:
PING OK - Packet loss = 0%, RTA = 0.63 ms - someHost.myDomain.com (10.1.2.3)
.. instead of the typical:
PING OK - Packet loss = 0%, RTA = 0.63 ms
In my monitoring configurations, DNS names are used whenever possible - to
ensure that any failures in DNS resolution (either of the DNS service as a
whole, or just for a given entry) are also reflected in the status of a host
check. The reduces the cost of recurring maintenance, as the monitoring
configurations don't also need to be updated every time there is
something as simple as an IP change. Having a local DNS cache on the server
(e.g. `dnsmasq`) makes any added performance expense trivial.
The default `ping` output already includes the following as the first line
(as of version `iputils-sss20071127`):
PING someHost (10.1.2.3) 56(84) bytes of data.
This is potentially useful information, and this change simply makes the
resolved hostname (potentially different than an input hostname) and
resolved IP address available for display on the plugin output.
You can merge this Pull Request by running:
git pull https://github.com/ziesemer/monitoring-plugins master
Or you can view, comment on it, or merge it online at:
https://github.com/monitoring-plugins/monitoring-plugins/pull/1284
-- Commit Summary --
* Update check_ping.c
* Update check_ping.c
-- File Changes --
M plugins/check_ping.c (75)
-- Patch Links --
https://github.com/monitoring-plugins/monitoring-plugins/pull/1284.patch
https://github.com/monitoring-plugins/monitoring-plugins/pull/1284.diff
--
Reply to this email on GitHub:
https://github.com/monitoring-plugins/monitoring-plugins/pull/1284
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20140801/cd03b7a2/attachment.html>
More information about the Devel
mailing list