[Nagiosplug-help] help with check_http + string check
Marcel
mitsuto at gmail.com
Thu Nov 26 21:48:42 CET 2009
I've always used the -u flag with the URI parameter, or URL path.
What happens if you issue the *exact* command defined by nagios?
/path/to/check_http -I <uranus_ip_address> -H uranus -u "
http://uranus/uri/path/to/resource/indicator?query&string=parameters"
If I understand correctly, check_http will connect to <uranus_ip_address>,
then send the "Host: uranus" header, and then request for:
GET /<parameter of the -u flag> HTTP/1.X
I think you are doing the -u flag parameter with the full URL location,
intead of just the URI path.
Cheers,
On Wed, Nov 25, 2009 at 11:59 PM, Thomas Guyot-Sionnest <dermoth at aei.ca>wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 25/11/09 07:34 PM, Eric wrote:
> > # 'check_http' command definition
> > define command{
> > command_name check_http
> > command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
> > }
> >
> > Do I need to add "$ARG2$" ?
>
> No. $ARG2$ and so on are defined only if you have more "!" in the
> check_command definition.
>
> The only thing I notice here is that if uranus do not resolve to
> $HOSTADDRESS$ (the "address" defined on the host which has this service)
> then you're not checking the same host.
>
> Other than than, a trick could be to add "echo" begore the command line:
>
> command_line echo $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
>
> Then instead of getting the real result you will get the exact command
> (don't forget to re-add any single/double quote though) so you can try
> and see what's wrong.
>
> - --
> Thomas
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFLDeDn6dZ+Kt5BchYRAopwAJ99C4yMX1Q74u+65MgDLbTbGHSCMwCgqkhw
> Yph0iKQBrMQZuqSNVamVBX4=
> =hwfF
> -----END PGP SIGNATURE-----
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20091126/96b3a131/attachment.html>
More information about the Help
mailing list