Page 1 of 1
Alerts from host with ping disabled
Posted: Tue Sep 30, 2014 5:50 pm
by toleolu
We have an external dns server that sits outside our internal network and has ping disabled. We're running a command that that checks DNS by sending out the ip of that server and looking for it to resolve to our domain name, hhsc.org which works, but we're not getting notifications when that service check fails. I am assuming it's because it shows the host is down since it can't ping it, but for what it's worth I'm not getting alerts on the host being down either, but I don't know if that's related, or a separate issue.
Since we won't be able to enable ping on that server, is there any other way I can do a host alive check without ping, or a way I can get an alert on the service even though the host appears to be down.
Mahalo
Re: Alerts from host with ping disabled
Posted: Wed Oct 01, 2014 9:14 am
by tmcdonald
Any check that can be run on a service can be run on a check. If it won't respond to a ping, try changing the check to some other service running on the machine like HTTP, FTP, etc. That'll help with your host down issue, then we can tackle to other issues that may rely on it.
Re: Alerts from host with ping disabled
Posted: Wed Oct 01, 2014 12:07 pm
by toleolu
The check we are running on DNS is working. So are you saying that even though the ping check isn't working and it appears to Nagios that the host is down, I should still be getting alerts when the DNS service check fails?
Re: Alerts from host with ping disabled
Posted: Wed Oct 01, 2014 2:34 pm
by lmiltchev
You can try using "check-host-alive-http" on the host.
http://assets.nagios.com/downloads/nagi ... _In_XI.pdf
Let me know if this helped.
Re: Alerts from host with ping disabled
Posted: Wed Oct 01, 2014 5:35 pm
by toleolu
Tried that already, it fails:
COMMAND: /usr/local/nagios/libexec/check_ping -H xxx.xxx.xxx.xxx -w 3000.0,80% -c 5000.0,100% -p 1
OUTPUT: PING CRITICAL - Packet loss = 100%|rta=5000.000000ms;3000.000000;5000.000000;0.000000 pl=100%;80;100;0
Packet loss = 100% is the same error I get with ping.
But going back to my earlier question, should I, or should I not, be getting alerts from the DNS service check that is working on this host?
Re: Alerts from host with ping disabled
Posted: Thu Oct 02, 2014 9:54 am
by lmiltchev
Tried that already, it fails:
COMMAND: /usr/local/nagios/libexec/check_ping -H xxx.xxx.xxx.xxx -w 3000.0,80% -c 5000.0,100% -p 1
OUTPUT: PING CRITICAL - Packet loss = 100%|rta=5000.000000ms;3000.000000;5000.000000;0.000000 pl=100%;80;100;0
Packet loss = 100% is the same error I get with ping.
You are still using "check_ping"... What happens when you use "check_http"?
/usr/local/nagios/libexec/check_http xxx.xxx.xxx.xxx
Re: Alerts from host with ping disabled
Posted: Thu Oct 02, 2014 12:46 pm
by toleolu
Result= "Critical Socket Timeout After 60 Seconds.
Which makes sense because IIS is not running on that server. But that's not a total loss since check_http will work for our external web server, but doesn't do anything for us on the External DNS Server.
Here's the check_dns command that does work on that External DNS Server:
[root@hhscnagios ~]# /usr/local/nagios/libexec/check_dns -H dns.hhsc.org -s XXX.XXX.XXX.XXX
DNS OK: 0.007 seconds response time. dns.hhsc.org returns XXX.XXX.XXX.XXX|time=0.007238s;;;0.000000
Re: Alerts from host with ping disabled
Posted: Thu Oct 02, 2014 2:15 pm
by toleolu
Got it working. Using the check_dns for the host command and the alerts work.
Thanks
Re: Alerts from host with ping disabled
Posted: Thu Oct 02, 2014 2:18 pm
by lmiltchev
You can simply run "check_tcp" check against an open port, for example:
Code: Select all
./check_tcp -p 53 dns.hhsc.org
TCP OK - 0.308 second response time on port 53|time=0.307866s;;;0.000000;10.000000
Re: Alerts from host with ping disabled
Posted: Thu Oct 02, 2014 2:19 pm
by lmiltchev
You were too fast.

I am glad the issue is resolved! Locking the topic.