Page 1 of 2

Monitoring HTTP

Posted: Mon Aug 19, 2013 5:50 am
by NagAlf
Hi!
I'm trying to monitor Intel (Windows) device hardware-included http (on specific port) using host name rather than IP. And it does work when device is switched off, but it does not when device is on. Using host name. When I do use IP it does work ok on both occasion. Any ideas?
More thanks, Alar.

Re: Monitoring HTTP

Posted: Mon Aug 19, 2013 9:58 am
by slansing
We need a bit more information, what check plugin are you using? Can you share the command definition you are using to check this with? It would also be helpful to see the service definition itself, if you do share it, remove any confidential information. Thanks!

Re: Monitoring HTTP

Posted: Mon Aug 19, 2013 10:23 am
by NagAlf
Hi and thanks!
I'm using check_http. I'm trying from command line "/usr/lib/nagios/plugins/check_http -H <host_name>/<IP> -p 16992". It does work when device is down. (16992 is for a Intel AMT WebUI access.) When device is up and I'm using host name it does not work eg. I'm getting error "CRITICAL - Socket timeout after 10 seconds". When device is up and I'm using IP it does work.
Service descriptions etc. is as default. (On one Windows Desktop with Intel AMT present device I have also another web-service running and checking is ok.)
define service{
use generic-service ; Name of service template to use
host_name <host_name>
service_description HTTP Intel AMT
check_command check_http!--port 16992
notifications_enabled 0
}
More thanks, Alar.
Btw. - no problem checking this using another monitoring solution. I mean, this Intel AMT is just another special port running web-service, nothing much.

Re: Monitoring HTTP

Posted: Mon Aug 19, 2013 12:59 pm
by abrist
Sounds like a dns problem. When the device is on, do an nslookup for the name:

Code: Select all

nslookup <hostname>

Re: Monitoring HTTP

Posted: Mon Aug 19, 2013 1:00 pm
by lmiltchev
Can you show us both commands (that one that works, and the one that doesn't), ran from the command line, along with the output of them?

Re: Monitoring HTTP

Posted: Tue Aug 20, 2013 8:13 am
by NagAlf
Hi and thanks!
Nope, with DNS is everything fine.
Alar.

Hi and thanks!
# /usr/lib/nagios/plugins/check_http -H <DNS_name> -p 16992
CRITICAL - Socket timeout after 10 seconds

# ping <DNS_name>
PING <DNS_name> (<IP_address>) 56(84) bytes of data.
64 bytes from <IP_address>: icmp_seq=1 ttl=126 time=0.776 ms
64 bytes from <IP_address>: icmp_seq=2 ttl=126 time=0.621 ms
64 bytes from <IP_address>: icmp_seq=3 ttl=126 time=0.619 ms
^C
--- <DNS_name> ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.619/0.672/0.776/0.073 ms

# /usr/lib/nagios/plugins/check_http -H <IP_address> -p 16992
HTTP OK - HTTP/1.1 303 See Other - 0.008 second response time |time=0.008060s;;;0.000000 size=120B;;;0

Thought a firewall issue (don't explain why IP does work), but no, switched fw off and ... just a same.
Just checked ... problematic devices are Windows 7, don't see this problem with XP! So, probably I missed something, but can't figure out what and ... with same firewall exceptions it (Intel AMT HTTP check) does work with WhatsUp! Well, yeah, fw disabled ... as I wrote ... and still does not work. Ahjaa, when I try connect to this http via FireFox from Nagios server ... it does work as well.
More thanks, Alar.

Re: Monitoring HTTP

Posted: Tue Aug 20, 2013 9:24 am
by slansing
Is this problem resolved now? The following paragraph was a bit confusing:
Thought a firewall issue (don't explain why IP does work), but no, switched fw off and ... just a same.
Just checked ... problematic devices are Windows 7, don't see this problem with XP! So, probably I missed something, but can't figure out what and ... with same firewall exceptions it (Intel AMT HTTP check) does work with WhatsUp! Well, yeah, fw disabled ... as I wrote ... and still does not work. Ahjaa, when I try connect to this http via FireFox from Nagios server ... it does work as well.
More thanks, Alar

Are you absolutely sure that port "16992" is open to the host name you are providing? It seems like you are having some sort of DNS run-in.

Re: Monitoring HTTP

Posted: Tue Aug 20, 2013 10:24 am
by NagAlf
Hi and thanks!
Sorry, my English. Nope, problem still there as it is.
With FireFox check I meant http://<DNS_name>:16992, it does work from Nagios server (I can login, so port is ok), but does not work from command line I described when (W7) device is switched on and DNS_name is used for check.
More thanks, Alar.

Re: Monitoring HTTP

Posted: Tue Aug 20, 2013 2:53 pm
by abrist
Could you please do an nslookup from the XI server to the dns name of the host. Does it match the IP address of the host in question?

Re: Monitoring HTTP

Posted: Wed Aug 21, 2013 5:03 am
by NagAlf
Hi and thanks!
Actually, I'm using version 3.0.6 of Nagios, bundled with SLES 11. Does this make any difference?
Anyway, nslookup return correct IP address and using this address in query does work as expected.
More thanks, Alar.