[Nagiosplug-devel] check_by_ssh feature proposal

Dirk Räbiger dirk at mti.ag
Tue Jan 31 06:22:03 CET 2006


Hello.

= Goal =
An option to turn off host-lookups for a given host in check_by_ssh.

= Motivation =
We're using Nagios to supervise our network, using a master-Nagios "ANU"
and two slave-Nagii :) on hosts located overseas ("UK", "US"). In order
to check wether the master-Nagios is still running, we'd like to use
check_by_ssh e.g. on host US.

Unfortunately, our master-Nagios is behind our firewall host "FW". Thus,
FW will forward a port (e.g. 2222) to port 22 (ssh) of ANU. That way we
can establish a ssh-connection from US to ANU by targeting FW, port
2222. On the other hand, the target-hostname should remain "ANU",
because we do not want to mess with our ssh-hostkeys! No problem, we
just configure ssh on US that way:

Host ANU
  port 2222

The only remaining problem was that "check_by_ssh -H ANU" tried to
double-check the host ANU by calling getaddrinfo() and it isn't able to
resolve that host, because it is hidden behind our firewall FW.

= Proposal =
I think the call to getaddrinfo() isn't necessary, and we could just
drop it without loosing functionality.

On the other hand, I understand that it improves the user interface, and
that our needs are somewhat special. So I'd like to propose an option to
turn it off.

= Patch =
Attached to this mail, you'll find a patch to the current version 1.36
of "check_by_ssh" that implements my proposal. It features an
command-line option "-g" in order not to call getaddrinfo() for the
given hostname.

We really hope to see that switch in the official branch.

Thanks alot,
Dirk Räbiger

-- 
Modern Technologies Inc.
John Henry Building
St. John's
Antigua & Barbuda
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: check_by_ssh.c.diff
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20060131/952f9917/attachment.ksh>


More information about the Devel mailing list