Page 1 of 2

Web Check - Nagios XI

Posted: Mon Apr 11, 2011 4:29 pm
by akanaujia
Hi,

I am trying to build a webcheck to log-in to an application and then sign out. Just to make sure the application is available.

I used Nagios XI configuration wizard to set up web monitoring.

I see in the configuration program check_xi_service_webinject being called. I tried to find this on the nagios server but cannot. Where can I find this program.

When Nagios run this - check_xi_service_webinject!win2k3_ps2__PS_FMS_SignIn_SignOut_config.xml through its own utility tool it gives the following error:
PS-FMS-SignIn-SignOut
Critical 4d 5h 10m 36s 5/5 04/11/2011 17:26:17 (null)

I am not sure where the log file is to check what happened here. Please let me know where I can find the log file.

Here is the XML script.
======================================================================================
<testcases repeat="1">

<testvar varname="BASE_URL-in">http://10.1.1.232:8001/psp/ps/?cmd=login</testvar>
<testvar varname="BASE_URL-ooo">http://10.1.1.232:8001/psp/ps/EMPLOYEE/ ... T</testvar>
<testvar varname="BASE_URL-out">http://10.1.1.232:8001/psp/ps/EMPLOYEE/ ... t</testvar>
<testvar varname="LOGIN1">VP1</testvar>
<testvar varname="PASSWD1">VP1</testvar>
<case
id="1"
description1="Connecting to Login Page"
method="get"
url="${BASE_URL-in}"
errormessage="Unable to load login page"
/>
<case
id="2"
description1="Authentication"
method="post"
url="${BASE_URL-in}"
postbody="name=${LOGIN1}&pass=${PASSWD1}&form_id=Submit=Sign+In"
errormessage="Login Post Problem"
/>
<case
id="3"
description1="SignOut"
method="post"
url="${BASE_URL-out}"
errormessage="Login Post Problem"
/>
</testcases>

Re: Web Check - Nagios XI

Posted: Wed Apr 13, 2011 10:48 am
by tonyyarusso
In your _config.xml file, change "<reporttype>nagios</reporttype>" to standard, as described on http://www.webinject.org/manual.html#cfgreporttype , then run it directly from the command line and read the files generated. This is all found in the /usr/local/nagiosxi/etc/components/webinject/ directory.

Re: Web Check - Nagios XI

Posted: Wed Apr 13, 2011 4:39 pm
by akanaujia
Thanks for pointing me to the manual.

I downloaded the windows version and fixed the test data file and it works fine now on windows using the windows utility. But it still has a problem running through Nagios.

When I try to run it via prompt on nagios server I get following:
[nagios@localhost webinject]$ ./webinject.pl -c win2k3_ps2__PSFMS_Signin_and_Signout_config.xml win2k3_ps2__PSFMS_Signin_and_Signout_testdata.xml
Can't do setuid (cannot exec sperl)

looks like its not able to execute sperl. Then I installed this package - yum install perl-suidperl.

Now id get different error.

[nagios@localhost webinject]$ ./webinject.pl -c win2k3_ps2__PSFMS_Signin_and_Signout_config.xml -o win2k3_ps2__PSFMS_Signin_and_Signout_results.xml win2k3_ps2__PSFMS_Signin_and_Signout_testdata.xml
Insecure dependency in open while running setuid at ./webinject.pl line 122.

I tried different option with or without output file or testdata.xml same result.

Any advise!

Re: Web Check - Nagios XI

Posted: Tue Apr 19, 2011 9:08 am
by akanaujia
Any update here?

Re: Web Check - Nagios XI

Posted: Tue Apr 19, 2011 9:42 am
by tonyyarusso
What operating system / version / architecture is this running on? How did you install XI? I haven't seen that error before.

Re: Web Check - Nagios XI

Posted: Tue Apr 19, 2011 2:21 pm
by akanaujia
centos 5.5, Nagios XI 2009R1.4B, its on a virtual box vm. Nagios was installed manually as specified in you Nagios XI - Manual Installation instruction.

Re: Web Check - Nagios XI

Posted: Wed Apr 20, 2011 9:37 am
by rdedon
You may want to try this:
If you are running a Perl script with the setuid bit, it actually runs a slightly modified version of Perl so that it is a bit more cautious. On a CentOS box, you need to install the ‘perl-suidperl’ package to get the necessary files installed.
This information is a bit dated but could still be relevant.

Re: Web Check - Nagios XI

Posted: Wed Apr 20, 2011 1:04 pm
by akanaujia
Thanks will try and get back to you.

Re: Web Check - Nagios XI

Posted: Wed Apr 20, 2011 1:15 pm
by rdedon
That sounds good, just touch base if this does or doesn't resolve the issue. :-)

Re: Web Check - Nagios XI

Posted: Wed Apr 20, 2011 1:26 pm
by akanaujia
I just realized that I have already installed this. If you read one of my earlier posts you will see I updated:

"looks like its not able to execute sperl. Then I installed this package - yum install perl-suidperl"

So..this package is already there. Let me know if you have any other thoughts.