> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:nagios-users- > [EMAIL PROTECTED] On Behalf Of Shabu Khan > Sent: Thursday, April 03, 2008 2:21 PM > To: nagios-users@lists.sourceforge.net > Subject: [Nagios-users] check_http question > > > > 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
Please don't test your plugins as root. Root has greater access than the nagios user. > 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. check_http only works with htaccess authentication. Is that what you're using? > 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= It's following the redirection and sending the htaccess authentication (Authorization) as it should. > <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> I have a feeling the above are going to be relevant. > HTTP CRITICAL - string not found|time=0.027586s;;;0.000000 size=1319B;;;0 I'm not sure why it's returning this since you didn't tell it to search for a string above. Is the above the complete command line you used? -- Marc ------------------------------------------------------------------------- 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 _______________________________________________ Nagios-users mailing list Nagios-users@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