Unable to login via script

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
njain213

Unable to login via script

Post 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
njain213

Re: Unable to login via script

Post by njain213 »

I have also attached screen shot for the same in which I want to login.
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Unable to login via script

Post 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.
Former Nagios Employee
njain213

Re: Unable to login via script

Post 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
njain213

Re: Unable to login via script

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Unable to login via script

Post 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.
Former Nagios employee
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Unable to login via script

Post 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.
Former Nagios employee
njain213

Re: Unable to login via script

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Unable to login via script

Post 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.
Former Nagios Employee
Locked