Xymon Mailing List Archive search

Monitoring a webpage that requires auth

5 messages in this thread

list Shane Presley · Fri, 4 Feb 2011 09:21:01 -0500 ·
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
list Ryan Novosielski · Fri, 4 Feb 2011 10:05:10 -0500 ·
Doesn't browsing to the second page directly prompt you to auth too?

-- Sent from my Palm Pre
quoted from Shane Presley
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
list Shane Presley · Fri, 4 Feb 2011 10:10:52 -0500 ·
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.
quoted from Ryan Novosielski


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

list Phil Meech · Fri, 4 Feb 2011 15:19:27 +0000 ·
I do a similar thing with a load of Procurve Mobility Controllers,
though I used a custom ext script to achive it; it's relatively simple
to do with Curl.
quoted from Shane Presley

On 4 February 2011 15:10, 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

list Ralph Mitchell · Fri, 4 Feb 2011 12:15:47 -0500 ·
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
quoted from Shane Presley


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