monitor web sites with XI
Posted: Thu Mar 31, 2011 2:00 pm
Hi,
We have this configuration:
Red Hat Enterprise Linux Server release 5.3; 32 bit; VMWare Image of NagiosXI; No special configurations.Using Mozilla Firefox3.6.8.
We are trying to use WebTransaction Plugin following the testcases from the manual How to monitor web sites with XI, but after creating a new valid account and replacing the values for USER and PASS; none test past succesfully. Below I pasted both files used: config.xml and testdata.xml.
http://library.nagios.com/library/produ ... -nagios-xi
******************************************************************************
orey_testdata.xml
<testcases repeat="1">
<testvar varname="USER">[email protected]</testvar>
<testvar varname="PASS">password</testvar>
<case
id="1"
description1="Login page"
url="https://members.oreilly.com/account/login"
parseresponse='_authentication_token" type="hidden" value="|"|escape'
verifypositive="Sign in"
/>
<case
id="2"
description1="Sign in"
url="https://members.oreilly.com/account/login"
method="post"
postbody="email=${USER}&password=${PASS}&_authentication_token={PARSEDRESULT}"
verifypositive="https://members.oreilly.com/account/benefits"
parseresponse="found at |;"
/>
<case
id="3"
description1="Members page"
url="{PARSEDRESULT}"
verifypositive="view or edit your account information"
/>
<case
id="4"
description1="Book price"
url="http://oreilly.com/catalog/9781593271794/"
verifypositive="59.95"
/>
<case
id="5"
description1="Book added to cart"
url="https://epoch.oreilly.com/shop/cart.orm ... 71794.BOOK"
verifypositive="Nagios, 2Ed"
/>
<case
id="6"
description1="Book still in cart"
url="https://epoch.oreilly.com/shop/cart.orm"
verifypositive="Nagios, 2Ed"
verifynegative="Backorder"
/>
<case
id="7"
description1="Logout"
url="https://members.oreilly.com/account/logout"
verifypositive="http://oreilly.com/"
parseresponse="found at |;"
/>
<case
id="8"
description1="Main page"
url="{PARSEDRESULT}"
verifypositive="News & Commentary"
/>
</testcases>
**************************
more orey_config.xml
<testcasefile>orey_testdata.xml</testcasefile>
<useragent>User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firef
ox/3.6.8</useragent>
<timeout>20</timeout>
<globaltimeout>40</globaltimeout>
################################ OUTPUT ######################33
[nagios@nagioscwp webinject]$ ./webinject.pl -c orey_config.xml
Starting WebInject Engine...
-------------------------------------------------------
Test: orey_testdata.xml - 1
Login page
Verify : "Sign in"
[nagios@nagioscwp webinject]$ vi orey_testdata.xml
[nagios@nagioscwp webinject]$ ./webinject.pl -c orey_config.xml
Starting WebInject Engine...
-------------------------------------------------------
Test: orey_testdata.xml - 1
Login page
Verify : "Sign in"
Failed Positive Verification
Failed - No Response
Use of uninitialized value in substitution (s///) at ./webinject.pl line 1161.
TEST CASE FAILED
Response Time = 196.038 sec
-------------------------------------------------------
Use of uninitialized value in substitution (s///) at ./webinject.pl line 1148.
Test: orey_testdata.xml - 2
Sign in
Verify : "https://members.oreilly.com/account/benefits"
Failed Positive Verification
Failed - No Response
TEST CASE FAILED
Response Time = 200.539 sec
-------------------------------------------------------
Use of uninitialized value in substitution (s///) at ./webinject.pl line 1148.
Test: orey_testdata.xml - 3
Members page
Verify : "view or edit your account information"
Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.8.8/HTTP/Cookies.pm line
Failed Positive Verification
Failed - No Response
TEST CASE FAILED
Response Time = 0 sec
-------------------------------------------------------
Test: orey_testdata.xml - 4
Book price
Verify : "59.95"
Failed Positive Verification
Failed - No Response
TEST CASE FAILED
Response Time = 20.605 sec
-------------------------------------------------------
Test: orey_testdata.xml - 5
Book added to cart
We have this configuration:
Red Hat Enterprise Linux Server release 5.3; 32 bit; VMWare Image of NagiosXI; No special configurations.Using Mozilla Firefox3.6.8.
We are trying to use WebTransaction Plugin following the testcases from the manual How to monitor web sites with XI, but after creating a new valid account and replacing the values for USER and PASS; none test past succesfully. Below I pasted both files used: config.xml and testdata.xml.
http://library.nagios.com/library/produ ... -nagios-xi
******************************************************************************
orey_testdata.xml
<testcases repeat="1">
<testvar varname="USER">[email protected]</testvar>
<testvar varname="PASS">password</testvar>
<case
id="1"
description1="Login page"
url="https://members.oreilly.com/account/login"
parseresponse='_authentication_token" type="hidden" value="|"|escape'
verifypositive="Sign in"
/>
<case
id="2"
description1="Sign in"
url="https://members.oreilly.com/account/login"
method="post"
postbody="email=${USER}&password=${PASS}&_authentication_token={PARSEDRESULT}"
verifypositive="https://members.oreilly.com/account/benefits"
parseresponse="found at |;"
/>
<case
id="3"
description1="Members page"
url="{PARSEDRESULT}"
verifypositive="view or edit your account information"
/>
<case
id="4"
description1="Book price"
url="http://oreilly.com/catalog/9781593271794/"
verifypositive="59.95"
/>
<case
id="5"
description1="Book added to cart"
url="https://epoch.oreilly.com/shop/cart.orm ... 71794.BOOK"
verifypositive="Nagios, 2Ed"
/>
<case
id="6"
description1="Book still in cart"
url="https://epoch.oreilly.com/shop/cart.orm"
verifypositive="Nagios, 2Ed"
verifynegative="Backorder"
/>
<case
id="7"
description1="Logout"
url="https://members.oreilly.com/account/logout"
verifypositive="http://oreilly.com/"
parseresponse="found at |;"
/>
<case
id="8"
description1="Main page"
url="{PARSEDRESULT}"
verifypositive="News & Commentary"
/>
</testcases>
**************************
more orey_config.xml
<testcasefile>orey_testdata.xml</testcasefile>
<useragent>User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firef
ox/3.6.8</useragent>
<timeout>20</timeout>
<globaltimeout>40</globaltimeout>
################################ OUTPUT ######################33
[nagios@nagioscwp webinject]$ ./webinject.pl -c orey_config.xml
Starting WebInject Engine...
-------------------------------------------------------
Test: orey_testdata.xml - 1
Login page
Verify : "Sign in"
[nagios@nagioscwp webinject]$ vi orey_testdata.xml
[nagios@nagioscwp webinject]$ ./webinject.pl -c orey_config.xml
Starting WebInject Engine...
-------------------------------------------------------
Test: orey_testdata.xml - 1
Login page
Verify : "Sign in"
Failed Positive Verification
Failed - No Response
Use of uninitialized value in substitution (s///) at ./webinject.pl line 1161.
TEST CASE FAILED
Response Time = 196.038 sec
-------------------------------------------------------
Use of uninitialized value in substitution (s///) at ./webinject.pl line 1148.
Test: orey_testdata.xml - 2
Sign in
Verify : "https://members.oreilly.com/account/benefits"
Failed Positive Verification
Failed - No Response
TEST CASE FAILED
Response Time = 200.539 sec
-------------------------------------------------------
Use of uninitialized value in substitution (s///) at ./webinject.pl line 1148.
Test: orey_testdata.xml - 3
Members page
Verify : "view or edit your account information"
Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.8.8/HTTP/Cookies.pm line
Failed Positive Verification
Failed - No Response
TEST CASE FAILED
Response Time = 0 sec
-------------------------------------------------------
Test: orey_testdata.xml - 4
Book price
Verify : "59.95"
Failed Positive Verification
Failed - No Response
TEST CASE FAILED
Response Time = 20.605 sec
-------------------------------------------------------
Test: orey_testdata.xml - 5
Book added to cart