Page 1 of 2

xml help web transaction wizard

Posted: Tue Jul 24, 2012 3:42 pm
by mbotier
Hey guys, i am trying to setup a test case via the documentation found regarding the xml but the way its written but i got the following:

Configuration submitted for processing...
Waiting for configuration verification.....
Configuration verification failed.

here is my testcase:

<testcases repeat="1">
<testvar varname="USER">nagiosadmin</testvar>
<testvar varname="PASS">cds@dmin</testvar>

<case
id="1"
description="Login Page"
url="https://research.relsci.com/Account/LogOn?ReturnUrl=%2f"
parseresponse='_authentication_token" type="hidden" value="|"|escape'
verifyresponse="Sign In"

/>

<case
id="2"
description="Sign In"
url="https://research.relsci.com/"
method="post"
postbody="username=${USER}&password=${PASS}&_authentication_token={PARSEDRESULT}"
verifypositive="https://research.relsci.com/Search?q="
parseresponse="Logged In!"
/>

<case
id="3"
description="Search Page"
url="https://research.relsci.com/DataEntry/P ... 098@Matrix"
verifypositive="1956"
parseresponse="Found his birthday"
/>

</testcases>

Re: xml help web transaction wizard

Posted: Tue Jul 24, 2012 3:55 pm
by scottwilkerson
Please to the following so we can see what the errors are

Configure -> CCM -> Tools -> Write Config Files
Click the top 3 items, if there are no errors click the restart option, if you get new errors about Duplicate definition do the following then repete the top 3 items in Configure -> CCM -> Tools -> Write Config Files

ONLY ONCE There are no Errors, click the 4th button. If there are errors we need to fix them and then repeat step 3).

Once there are no errors click the 4th Go button, then wait a couple minutes.

Go to Configure -> CCM -> Apply Configuration -> Apply Configuration

Re: xml help web transaction wizard

Posted: Wed Jul 25, 2012 8:24 am
by mbotier
Here is the error(s) that i get when i click the third button:

Error: Contact 'nagiosadmin' specified in service 'Web Transaction' for host 'research.cdsapp.com' is not defined anywhere!
Error: Contact 'nagiosadmin' specified in service 'DNS IP Match' for host 'research.relsci.com' is not defined anywhere!
Error: Contact 'nagiosadmin' specified in service 'DNS Resolution' for host 'research.relsci.com' is not defined anywhere!
Error: Contact 'nagiosadmin' specified in service 'HTTP' for host 'research.relsci.com' is not defined anywhere!
Error: Contact 'nagiosadmin' specified in service 'Ping' for host 'research.relsci.com' is not defined anywhere!
Error: Contact 'nagiosadmin' specified in service 'Relsci Search' for host 'research.relsci.com' is not defined anywhere!
Error: Contact 'nagiosadmin' specified in service 'SSL Certificate' for host 'research.relsci.com' is not defined anywhere!
Error: Contact 'nagiosadmin' specified in service 'Web Page Content' for host 'research.relsci.com' is not defined anywhere!
Error: Contact 'nagiosadmin' specified in service 'Web Transaction' for host 'research.relsci.com' is not defined anywhere!
Error: Contact 'nagiosadmin' specified in host 'research.cdsapp.com' is not defined anywhere!
Error: Contact 'nagiosadmin' specified in host 'research.relsci.com' is not defined anywhere!
Total Warnings: 0
Total Errors: 11

Re: xml help web transaction wizard

Posted: Wed Jul 25, 2012 11:31 am
by scottwilkerson
It looks like you removed your nagiosadmin contact

Go to CCM -> Contacts
Add New
Contact Name = nagiosadmin
Time period hosts/services* = nagiosadmin_notification_times
Host/Service command* = xi_host/service_notification_handler

Misc Settings Tab
Select xi_contact_generic from Template Name
Click Insert
Click Save

then repeat the Write Config steps above

Re: xml help web transaction wizard

Posted: Wed Jul 25, 2012 12:14 pm
by mbotier
So those errors are resolved now. The issue now is that the actual Web Transaction is not working and i am getting this message:

WebInject CRITICAL - Test case number 2 failed

How can i modify the actual XML file. Do i have to SSH into the host?

Re: xml help web transaction wizard

Posted: Wed Jul 25, 2012 12:28 pm
by lmiltchev
I believe you can edit the xml file directly in "/usr/local/nagiosxi/etc/components/webinject/...".

Re: xml help web transaction wizard

Posted: Wed Jul 25, 2012 3:30 pm
by mbotier
How do i determine exactly what the issue is though. I am by no means an XML expert and the example given in the nagios documentation is not that helpful.

Re: xml help web transaction wizard

Posted: Wed Jul 25, 2012 4:55 pm
by scottwilkerson
I don't know how the logic of your website works but with what you posted above, in case 2 you are posting to https://research.relsci.com/ not https://research.relsci.com/Account/LogOn?ReturnUrl=%2f

Also, are you sure you have a hidden field named _authentication_token because I couldn't see it in the HTML of the page...

Re: xml help web transaction wizard

Posted: Mon Jul 30, 2012 9:04 am
by mbotier
is there anyway i can work with someone on this over the phone? i dont have experience with XML and most of the code of the site is hidden from me.

Re: xml help web transaction wizard

Posted: Mon Jul 30, 2012 9:30 am
by scottwilkerson