Page 1 of 4

Unable to login via script

Posted: Thu Apr 21, 2016 5:45 am
by njain213
Hi Team,

I have installed nagios XI trial version and doing one user journey. I want to hit a URL and after that I want to login into that page.For this I have added below script to web transaction saction and getting below error.

Error: Web Transaction;CRITICAL;HARD;5;(No output on stdout) stderr: Can't do setuid (cannot exec sperl)


Script:


<testcases repeat="1">

<testvar varname="LOGIN_URL">http://<URL></testvar>
<testvar varname="Username">username</testvar>
<testvar varname="Password">password</testvar>
<testvar varname="SUCCESSFULL_TEST_TEXT">Welcome Mars</testvar>

<case
id="1"
description1="login test case"
description2="verify string login"
method="post"
url="${LOGIN_URL}"
postbody="login=${Username}&passwd=${Password}"
verifypositive="${SUCCESSFULL_TEST_TEXT}"
/>

</testcases>

Could you please help me out so that I will show demo to management and will buy this tool for monitoring.

Thanks
Naman

Re: Unable to login via script

Posted: Thu Apr 21, 2016 11:15 am
by njain213
I have also attached screen shot for the same in which I want to login.

Re: Unable to login via script

Posted: Thu Apr 21, 2016 12:55 pm
by rkennedy
;(No output on stdout) stderr: Can't do setuid (cannot exec sperl)
For one, it looks like you're running into a permission issue here. For two, it looks like you're missing the variable for 'Account ID'.

Check the permissions on your files that are part of the web check, and you may need to rewrite your transaction.

Re: Unable to login via script

Posted: Fri Apr 22, 2016 1:28 am
by njain213
Hi,

If I don't want to enter anything in Account Id will it not work?

I have not attached any file so you are refering to which file permission?

Could you please elaborate and tel me the pre steps.

Thanks
Naman

Re: Unable to login via script

Posted: Fri Apr 22, 2016 1:57 am
by njain213
Could you also let me know if any database is required for monitoring purpose in Nagios XI?

Also if I am recording it under IDE recorder and in command option I have added verifyTextPresent.

After that in target if I want add document for certain steps,could you please provide me trial steps document which I can add and check user journey.

I am following below documents for recording in IDE recorder.

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

(Documentation here - http://www.seleniumhq.org/docs/02_selen ... extpresent )


Thanks
Naman

Re: Unable to login via script

Posted: Fri Apr 22, 2016 2:08 pm
by tmcdonald
Can you please post the full URLs that you are using? They seem to have been cut off.
njain213 wrote:Could you also let me know if any database is required for monitoring purpose in Nagios XI?
Yes, XI uses databases to store various pieces of information and they are required to function.

Re: Unable to login via script

Posted: Sat Apr 23, 2016 4:33 am
by njain213

Re: Unable to login via script

Posted: Mon Apr 25, 2016 2:10 pm
by tmcdonald
I'm a bit confused here - in your first post you include what looks like a Webinject script, but you are referencing Selenium documentation. These are two separate projects and I don't think their syntax is interchangeable. You are also posting XI install instructions, which I don't think are relevant here - did you mean to post something else?
njain213 wrote:If I don't want to enter anything in Account Id will it not work?
If the application is expecting this value, then you likely will need to include it to log in properly.

Re: Unable to login via script

Posted: Tue Apr 26, 2016 12:02 am
by njain213
Hi,

Apology for creating confusion here. yes you are right there are two different projects. Initially I was checking if monitoring can be done through web transaction option or not .


Secondly I got to know that if I want to do complete monitoring like login into any application and search string or anything else, I have to follow above documents that I have already shared with you.

Could you please suggest how I would proceed if I want to do complete monitoring of applications?

Thanks
Naman

Re: Unable to login via script

Posted: Tue Apr 26, 2016 4:54 pm
by rkennedy
Take a look at these documents to see if they help -
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

It sounds like you're trying to check websites, and Webinject / Selenium may work for you, depending on what you're looking to accomplish exactly.