Xymon Mailing List Archive search

Monitoring a webpage that requires auth

list Ralph Mitchell
Fri, 4 Feb 2011 12:15:47 -0500
Message-Id: <AANLkTikie2gYvcEsA1D_Vj4UMFcxgzbEJ=user-12a26f2d41f5@xymon.invalid>

If it's "remembering" the authentication via cookies, something like this
would probably work:

   #!/bin/bash
   CURLOPTS="-b cookies -c cookies -s -S -L -m 30"
   curl $CURLOPTS -o authpage.html http://cisco-thing.domain.com
   curl $CURLOPTS -o statuspage.html
http://cisco-thing.domain.com/statuspage.html

then you extract whatever you need from the status page to test it for
"correctness" and send the result to Xymon:

   $BB $BBDISP "status cisco-thing,domain,com.status $COLOR `date`
   $MESSAGE"

The COLOR & MESSAGE variables would be constructed during the check for
"correctness".

Ralph Mitchell


On Fri, Feb 4, 2011 at 10:10 AM, Shane Presley <user-f946ba3135e0@xymon.invalid>wrote:
I'm afraid not.  If I start my session with the URL of the status
page, it redirects me to the front auth page.  But once I authenticate
it takes me to the generic start page.  Not my status page.


On Fri, Feb 4, 2011 at 10:05 AM, Ryan Novosielski <user-ae4522577e16@xymon.invalid>
wrote:
Doesn't browsing to the second page directly prompt you to auth too?

-- Sent from my Palm Pre
On Feb 4, 2011 9:23, Shane Presley <user-f946ba3135e0@xymon.invalid> wrote:

I have a Cisco web application that shows me the status of my
environment. However, in order to access the status page, I first
need to authenticate.

I realize xymon has auth capabilities built into the http content
test. But that doesn't seem to work in my environment. Once I log
into the front page, I need to navigate to a second page..which is
where my status is displayed.

Is there any way to grab http content tests from that second page?

Thanks