check_http question
Shabu Khan
hishabu at gmail.com
Thu Apr 3 21:20:43 CEST 2008
Folks,
How do I get check_http to input username/password for a particular url?
This is what I am doing:
# /opt/nagios/libexec/check_http -ssl -a myusername:mypassword -H
myhostname.fqdn -u /websitemanager/ControllerServlet -f follow -v
There is a redirection that happens and hence the -f follow switch/option,
after which it gets to a login page -
https://myhostname.fqdn/security/LoginFrameset.jsp this is where it needs to
input the username/password, but I don't think it goes past this, and I get
a 'string not found' error.
Here is the complete message (edited):
#-----------------------------------------------------------------#
GET /websitemanager/ControllerServlet HTTP/1.0
User-Agent: check_http/v1861 (nagios-plugins 1.4.11)
Connection: close
Host: myhostname.fqdn
Authorization: Basic Y2JsdC1pdDowbjN3QHl0MWNrM3Q=
http://myhostname.fqdn:80/websitemanager/ControllerServlet is 1602
characters
STATUS: HTTP/1.1 302 Moved Temporarily
**** HEADER ****
Date: Wed, 02 Apr 2008 22:37:58 GMT
Server: Apache/2.0.52 (Red Hat) DAV/2
Set-Cookie: Apache=209.67.79.1.1207175878098830; path=/; expires=Fri,
02-Apr-10 22:37:58 GMT
Location: https://myhostname.fqdn/security/LoginFrameset.jsp
Set-Cookie:
JSESSIONID=H0KG5KjlQH0yr7XzJWDnMhkKQRKJmLmTDvG9QQ572nX6TXTKShn3!-1692630720;
path=/
Set-Cookie: BIGipServercert-1-nitracluster.dealer=1046154250.13601.0000;
path=/
Connection: close
Content-Type: text/html
Set-Cookie: BIGipServercert-1-staticweb=878382090.20480.0000; path=/
**** CONTENT ****
<html><head><title>302 Moved Temporarily</title></head>
<body bgcolor="#FFFFFF">
<p>This document you requested has moved temporarily.</p>
<p>It's now at <a href="https://myhostname.fqdn/security/LoginFrameset.jsp">
https://myhostname.fqdn/security/LoginFrameset.jsp</a>.</p>
</body></html>
<html>
<head>
<title>Welcome!</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript">
<!--
function topLoader() {
if (window != top) {
top.location.href = window.location.href;
}
}
//-->
</script>
</head>
<frameset rows="66,1*,40" frameborder="NO" border="0" framespacing="0"
onload="topLoader()">
<frame noresize src="/security/LoginHeader.jsp" name="header"
scrolling="NO">
<frame noresize src="/security/Login.jsp" name="content"
scrolling="AUTO">
<frame noresize src="/security/footer.jsp" name="footer" scrolling="NO">
</frameset>
<noframes>
<body bgcolor="#FFFFFF">
</body>
</noframes>
</html>
Redirection to https://myhostname.fqdn:443/security/LoginFrameset.jsp
GET /security/LoginFrameset.jsp HTTP/1.0
User-Agent: check_http/v1861 (nagios-plugins 1.4.11)
Connection: close
Host: myhostname.fqdn
Authorization: Basic Y2JsdC1pdDowbjN3QHl0MWNrM3Q=
https://myhostname.fqdn:443/security/LoginFrameset.jsp is 1319 characters
STATUS: HTTP/1.1 200 OK
**** HEADER ****
Date: Wed, 02 Apr 2008 22:37:58 GMT
Server: Apache/2.0.52 (Red Hat) DAV/2
Set-Cookie: Apache=209.67.79.1.1207175878115366; path=/; expires=Fri,
02-Apr-10 22:37:58 GMT
Pragma: no-cache
Content-Length: 721
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie:
JSESSIONID=H0KGJfyJpp2jcMXXgJTdPt27SxnhT1GTSBpCdkDgHqbdMXjl2Y1L!1822486824;
path=/
Cache-Control: no-store
Set-Cookie: BIGipServercert-1-nitracluster.dealer=1029377034.13601.0000;
path=/
Connection: close
Content-Type: text/html;charset=utf-8
Set-Cookie: BIGipServercert-1-staticweb=861604874.20480.0000; path=/
**** CONTENT ****
<html>
<head>
<title>Welcome!</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript">
<!--
function topLoader() {
if (window != top) {
top.location.href = window.location.href;
}
}
//-->
</script>
</head>
<frameset rows="66,1*,40" frameborder="NO" border="0" framespacing="0"
onload="topLoader()">
<frame noresize src="/security/LoginHeader.jsp" name="header"
scrolling="NO">
<frame noresize src="/security/Login.jsp" name="content"
scrolling="AUTO">
<frame noresize src="/security/footer.jsp" name="footer" scrolling="NO">
</frameset>
<noframes>
<body bgcolor="#FFFFFF">
</body>
</noframes>
</html>
HTTP CRITICAL - string not found|time=0.027586s;;;0.000000 size=1319B;;;0
#-----------------------------------------------------------------#
Any assistance would be greatly appreciated.
Thanks,
--
Shabu Khan | Mentis Systems Inc | W: (425) 649-1130 | C: (425) 301-1948 | F:
(425) 256-2819
--
Shabu Khan | Mentis Systems Inc | W: (425) 649-1130 | C: (425) 301-1948 | F:
(425) 256-2819
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080403/6e6208bd/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
-------------- next part --------------
_______________________________________________
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