Page 1 of 1

Command to ping one host from another?

Posted: Thu Apr 05, 2012 9:31 am
by Brian_M
Hello All,

Due to my inexperience with Nagios I'm struggling a bit and would appreciate some input from the community.

I need to verify connectivity between two hosts - e.g. host1 is an application server which needs to communicate with other hosts on various ports to verify LDAP, SQL, SMTP, POP3 is available to host1. I basically need a command that would tell host1 to communicate with host2 on port x and report critical if the connection cannot be established.

The IP addresses and port numbers would vary by host, so I would need $ARG$ variables in the place of those parameters. I created a simple check ($USER1$/check_tcp -H $ARG1$ -p $ARG2$ ) that works for host and port, but I can't figure out how to define a "source IP" for the connectivity check (example check only verifies connectivity between Xi and target apparently).

I'm currently running Xi on the vendor supplied VM, 2011r2.2
Monitored servers are a mixture of Win2k3, Win2k8 using NSClient++ as the agent

Much Appreciated,
Brian

Re: Command to ping one host from another?

Posted: Thu Apr 05, 2012 12:01 pm
by scottwilkerson
If you need to ping FROM the windows machines I would suggest
http://exchange.nagios.org/directory/Pl ... 29/details

If you need to check connections from Linux/Unix OS, I would recommend NRPE with the check_ping command
http://library.nagios.com/library/produ ... using-nrpe

Re: Command to ping one host from another?

Posted: Thu Apr 12, 2012 1:00 am
by Brian_M
Thanks for your suggestion, sorry it's taken so long to reply due to the holiday weekend.

Was aiming to ping one windows server from another, I'll give the first option you provided a go.

Thanks Again,
Brian

Re: Command to ping one host from another?

Posted: Thu Apr 12, 2012 10:09 am
by scottwilkerson
Yep, the first option should get you there.