check_http can't follow redirect properly, no cookies!
David Price
david_price at byu.edu
Thu Aug 17 18:11:49 CEST 2006
Hari Sekhon wrote:
> Ton Voon wrote:
>> No cookies in check_http, I'm afraid. It would be a nightmare enhance
>> it to hold sessions.
>>
>> If you are good with perl, look at WWW::Mechanize. This allows you to
>> store cookies and interact with a website as if you were a browser.
>> We use this to login to monitor a betting site and retrieve funds
>> information.
>>
>> On 17 Aug 2006, at 12:18, Hari Sekhon wrote:
>>
>>> Hi,
>>> I've got check_http doing a login which works fine and I'm using the
>>> --onredirect=follow to make sure I can fetch the secured page it's
>>> redirected to.
>>>
>>> The problem is that when the page is fetched it is fetched without the
>>> previously supplied credentials and therefore I get a login page
>>> instead
>>> of the page within the secure area.
>>>
>>> I really really need to get the page in the secure area. Does anybody
>>> know how to make it store and use the credentials for the redirect.
>>> It's
>>> obviously not using it's cookie and I've looked through the --help but
>>> it makes not mention of cookies...
>>>
>>
>> http://www.altinity.com
>> T: +44 (0)870 787 9243
>> F: +44 (0)845 280 1725
>> Skype: tonvoon
>>
>>
>
> that's a real pain, but I understand. Curl can actually deal with
> cookies so I may end up rustling up a quick script in bash with that,
> I've already done some cli tests with it and it works nicely, but
> longer term I think I'll have to brush up my perl (I know the very
> basics) and do something with Mechanize. I think that this will be a
> good opportunity for me to do something useful in Perl.
>
> Thanks for the pointer.
>
> Hari
>
>
Check out the WebInject Nagios plugin. I have it setup to check several
pages in a secure website and it handles cookies. It could save you
the hassle of creating your our script.
http://www.webinject.org/plugin.html
David Price
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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