Xymon Mailing List Archive search

Using POST to test web pages

3 messages in this thread

list Frédéric Mangeant · Thu, 14 Sep 2006 11:45:19 +0200 ·
Hi

I'm trying to monitor a web application (Cacti) which needs a login/password.
Here is the form :

<form name="login" method="post" action="index.php">
<input type="text" name="login_username" size="40" style="width: 295px;">
<input type="password" name="login_password" size="40" style="width: 295px;">
<input type="submit" value="Login">
<input type="hidden" name="action" value="login">
</form>


I've tried this in bb-hosts :

post;http://10.20.30.40/cacti/;login_username=foo&login_password=bar;Logged

The 'content' test is red, and running in debug mode gives no error but :

2006-09-14 11:16:20 Calc content color host phoenix : 2006-09-14 11:16:20 Content check on http://10.20.30.40/cacti/ is red
2006-09-14 11:16:20 Adding to combo msg: status phoenix.content red Thu Sep 14 11:16:20 2006: Content match failed


The 'http' test is green.

I've tested with Hobbit 4.1.2p2 and 4.2.0 (patched).

Could it be related to cookies ?

Thanks in advance.

-- 

Frédéric Mangeant

Steria EDC Sophia-Antipolis
list Ralph Mitchell · Thu, 14 Sep 2006 06:09:57 -0500 ·
quoted from Frédéric Mangeant
On 9/14/06, Frédéric Mangeant <user-b6ea1d850181@xymon.invalid> wrote:
Hi

I'm trying to monitor a web application (Cacti) which needs a
login/password.
Here is the form :

<form name="login" method="post" action="index.php">
<input type="text" name="login_username" size="40" style="width: 295px;">
<input type="password" name="login_password" size="40" style="width:
295px;">
<input type="submit" value="Login">
<input type="hidden" name="action" value="login">
</form>


I've tried this in bb-hosts :

post;http://10.20.30.40/cacti/;login_username=foo&login_password=bar;Logged

The 'content' test is red, and running in debug mode gives no error but :

2006-09-14 11:16:20 Calc content color host phoenix : 2006-09-14
11:16:20 Content check on http://10.20.30.40/cacti/ is red
2006-09-14 11:16:20 Adding to combo msg: status phoenix.content red Thu
Sep 14 11:16:20 2006: Content match failed


The 'http' test is green.

I've tested with Hobbit 4.1.2p2 and 4.2.0 (patched).

Could it be related to cookies ?
Yep, could be cookies.  There's a Firefox extension called
LiveHTTPHeaders that is excellent for tracking down this kind of
thing.  It grabs all the headers, both sent and received, so that you
can see exactly what's going on.  If the server is sending you
cookies, you'll see them in the received headers.

I've done this a lot with Big Brother scripts to monitor web pages..:)
Ralph Mitchell
list Francisco Carmona Leon · Thu, 14 Sep 2006 08:30:44 -0500 ·
have you try just this way:

http://proxy.in.case.you.need.it:8080/http://foo:bar at 10.20.30.40/cacti/
quoted from Frédéric Mangeant


On Thu, 2006-09-14 at 11:45 +0200, Frédéric Mangeant wrote:
Hi

I'm trying to monitor a web application (Cacti) which needs a login/password.
Here is the form :

<form name="login" method="post" action="index.php">
<input type="text" name="login_username" size="40" style="width: 295px;">
<input type="password" name="login_password" size="40" style="width: 295px;">
<input type="submit" value="Login">
<input type="hidden" name="action" value="login">
</form>


I've tried this in bb-hosts :

post;http://10.20.30.40/cacti/;login_username=foo&login_password=bar;Logged

The 'content' test is red, and running in debug mode gives no error but :

2006-09-14 11:16:20 Calc content color host phoenix : 2006-09-14 11:16:20 Content check on http://10.20.30.40/cacti/ is red
2006-09-14 11:16:20 Adding to combo msg: status phoenix.content red Thu Sep 14 11:16:20 2006: Content match failed


The 'http' test is green.

I've tested with Hobbit 4.1.2p2 and 4.2.0 (patched).

Could it be related to cookies ?

Thanks in advance.