check_http not returning expected 502

Hugo van der Kooij hvdkooij at vanderkooij.org
Sun Dec 7 23:53:58 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

jimj wrote:

> I've got nagios installed and seems to be running ok except for one thing. I'm running https checks with "check_http" and get the expected result when I run it on the command line:
> 
> ./check_http -H somehost.com -S
> 
> HTTP CRITICAL: HTTP/1.1 502 Bad Gateway
> 
> 
> But in the UI its giving me:
> 
> HTTP OK HTTP/1.1 200 OK
> 
> My config runs it like this:
> 
> check_command   check_http!-S -t 30

This will not work as you expect. There must be plenty of samples in the
mailinglist archives to show you how it can done.

But to add one more to the archives:

define command{
        command_name    check_https_credentials
        command_line    $USER1$/check_http -H $HOSTADDRESS$ -S -a $ARG1$
        }

define service{
        use                             waakhond.net-service
        host_name                       https_with_login-server
        service_description             HTTPS
        check_command
check_https_credentials!user:password
        contact_groups                  customers
        }

I always will advocate to add your own check_http like commands and use
them in your services.

Hugo.

- --
hvdkooij at vanderkooij.org               http://hugo.vanderkooij.org/
PGP/GPG? Use: http://hugo.vanderkooij.org/0x58F19981.asc

	A: Yes.
	>Q: Are you sure?
	>>A: Because it reverses the logical flow of conversation.
	>>>Q: Why is top posting frowned upon?

Bored? Click on http://spamornot.org/ and rate those images.

Nid wyf yn y swyddfa ar hyn o bryd. Anfonwch unrhyw waith i'w gyfieithu.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFJPFQEBvzDRVjxmYERAkG8AJ9ad5+Dx6QdGvIvLWH6ZAo3bRNYUQCggK8g
MM/ZrbI+2AMlraWjdb3G7+8=
=0rc6
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list