check_http : able to check authentication?
David Gitman
David at feedroom.com
Tue Sep 9 15:51:04 CEST 2003
RTFM, http://nagios.sourceforge.net/docs/1_0/plugins.html
Try running a check_http -help. The -a option should do the trick.
./check_http --help
check_http (nagios-plugins 1.3.1) 1.24.2.4
The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
Copyright (c) 1999-2001 Ethan Galstad/Karl DeBisschop <kdebisschop at users.sourceforge.net>
This plugin tests the HTTP service on the specified host. It can test
normal (http) and secure (https) servers, follow redirects, search for
strings and regular expressions, check connection times, and report on
certificate expiration times.
Usage:
check_http (-H <vhost> | -I <IP-address>) [-u <uri>] [-p <port>]
[-w <warn time>] [-c <critical time>] [-t <timeout>] [-L]
[-a auth] [-f <ok | warn | critcal | follow>] [-e <expect>]
[-s string] [-l] [-r <regex> | -R <case-insensitive regex>]
[-P string]
check_http (-h | --help) for detailed help
check_http (-V | --version) for version information
NOTE: One or both of -H and -I must be specified
Options:
-H, --hostname=ADDRESS
Host name argument for servers using host headers (virtual host)
-I, --IP-address=ADDRESS
IP address or name (use numeric address if possible to bypass DNS lookup).
-e, --expect=STRING
String to expect in first (status) line of server response (default: HTTP/1.)
If specified skips all other status line logic (ex: 3xx, 4xx, 5xx processing)
-s, --string=STRING
String to expect in the content
-u, --url=PATH
URL to GET or POST (default: /)
-p, --port=INTEGER
Port number (default: 80)
-P, --post=STRING
URL encoded http POST data
-w, --warning=INTEGER
Response time to result in warning status (seconds)
-c, --critical=INTEGER
Response time to result in critical status (seconds)
-t, --timeout=INTEGER
Seconds before connection times out (default: 10)
--authorization=AUTH_PAIR
Username:password on sites with basic authentication
-L, --link=URL
Wrap output in HTML link (obsoleted by urlize)
-f, --onredirect=<ok|warning|critical|follow>
How to handle redirected pages
-S, --ssl
Connect via SSL
-C, --certificate=INTEGER
Minimum number of days a certificate has to be valid.
(when this option is used the url is not checked.)
-l, --linespan
Allow regex to span newlines (must precede -r or -R)
-r, --regex, --ereg=STRING
Search page for regex STRING
-R, --eregi=STRING
Search page for case-insensitive regex STRING
-v, --verbose
Show details for command-line debugging (do not use with nagios server)
-h, --help
Print detailed help screen
-V, --version
Print version information
This plugin can also check whether an SSL enabled web server is able to
serve content (optionally within a specified time) or whether the X509
certificate is still valid for the specified number of days.
CHECK CONTENT: check_http -w 5 -c 10 --ssl www.verisign.com
When the 'www.verisign.com' server returns its content within 5 seconds, a
STATE_OK will be returned. When the server returns its content but exceeds
the 5-second threshold, a STATE_WARNING will be returned. When an error occurs,
a STATE_CRITICAL will be returned.
CHECK CERTIFICATE: check_http www.verisign.com -C 14
When the certificate of 'www.verisign.com' is valid for more than 14 days, a
STATE_OK is returned. When the certificate is still valid, but for less than
14 days, a STATE_WARNING is returned. A STATE_CRITICAL will be returned when
the certificate is expired.
[-d]
-----Original Message-----
From: Alan Murrell [mailto:alan at zoolink.net]
Sent: Monday, September 08, 2003 6:09 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] check_http : able to check authentication?
Hello,
We are running Nagios v1.0, and I had a question about the check_http plugin. One of our clients has a website they would like monitored, but it requires authentication (via the IIS popup box). It is normally possibly to get in with your web browser using a URL similar to:
http://user:password@www.domain.tld
I was wondering if it's possible to do something siliar in the Nagios setup, or if such a feature to the plugin is planned/feasible?
I look forward to hearing back from you.
TIA.
Alan Murrell <alan at zoolink.net>
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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