View previous topic :: View next topic |
Author |
Message |
brent_weaver Guru
Joined: 01 Jul 2004 Posts: 510 Location: Burlington, VT
|
Posted: Mon Nov 16, 2009 7:59 pm Post subject: nagios check_http and web server path |
|
|
I need to use check_http on a path that is http://servername/ping.asp. I do not know how to use check_http to look at a path other than the / (root). I see the -u but it does not work and gives me an error.
nssmonitor plugins # ./check_http -H 198.181.235.123
HTTP OK HTTP/1.1 200 OK - 346 bytes in 0.003 seconds |time=0.002832s;;;0.000000 size=346B;;;0
nssmonitor plugins # ./check_http -H 198.181.235.123 -u idxwfping.asp
HTTP WARNING: HTTP/1.1 400 Bad Request
How do I get this plugin to check http://198.181.235.123/idxwfping.asp ? Thanks! _________________ Brent Weaver |
|
Back to top |
|
|
ursusca Apprentice
Joined: 10 Sep 2008 Posts: 284 Location: Toronto ON, CANADA
|
Posted: Mon Nov 16, 2009 8:09 pm Post subject: |
|
|
Hi,
Did you try to run it with "-I" option instead of "-H"?
Code: | I, --IP-address=ADDRESS
IP address or name (use numeric address if possible to bypass DNS lookup). |
_________________ You deserve free software! |
|
Back to top |
|
|
brent_weaver Guru
Joined: 01 Jul 2004 Posts: 510 Location: Burlington, VT
|
Posted: Mon Nov 16, 2009 9:12 pm Post subject: |
|
|
thanks for the response. I need to know how to check a full URL path not just the root of the server _________________ Brent Weaver |
|
Back to top |
|
|
born2chill n00b
Joined: 14 Aug 2006 Posts: 10
|
Posted: Wed Nov 18, 2009 8:27 am Post subject: |
|
|
Hello,
try this:
Code: |
./check_http -H servername -p 80 -u "/ping.asp"
|
br,
b2c |
|
Back to top |
|
|
brent_weaver Guru
Joined: 01 Jul 2004 Posts: 510 Location: Burlington, VT
|
Posted: Sun Nov 29, 2009 12:57 am Post subject: |
|
|
unfort that does not work. _________________ Brent Weaver |
|
Back to top |
|
|
gimpel Advocate
Joined: 15 Oct 2004 Posts: 2720 Location: Munich, Bavaria
|
Posted: Sun Nov 29, 2009 8:42 am Post subject: |
|
|
Above should work. In your first example you forgot the leading /. Try specifying the full url, like
./check_http -H servername -u "http://198.181.235.123/idxwfping.asp"
If that works you could set something like -u "http://$HOSTADDRESS$/$ARG1$" and use !idxwfping.asp _________________ http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
|
|
Back to top |
|
|
brent_weaver Guru
Joined: 01 Jul 2004 Posts: 510 Location: Burlington, VT
|
Posted: Wed Dec 02, 2009 2:53 am Post subject: |
|
|
Thanks for the response. No soup!
Code: |
nssmonitor plugins # ./check_http -H 198.181.235.123 -u "http://198.181.235.123/idxwfping.asp"
CRITICAL - Socket timeout after 10 seconds
|
_________________ Brent Weaver |
|
Back to top |
|
|
chrisyu Apprentice
Joined: 10 Apr 2003 Posts: 207 Location: China
|
|
Back to top |
|
|
|