Page 1 of 1

nagios webinject

Posted: Fri Apr 13, 2012 3:28 am
by tman-gram
I followed these instructions to install nagios on a clean cent 0s 5.8 machine

http://assets.nagios.com/downloads/nagi ... ctions.pdf

I followed instructions on page 4 of http://assets.nagios.com/downloads/nagi ... ith_XI.pdf
to configure a basic web monitor but I get a status of Critical and status information as null(see screen grab)

these are the config files

www_google_com_au__Google_test_config.xml
<testcasefile>www_google_com_au__Google_test_testdata.xml</testcasefile>
<useragent>WebInject Application Tester</useragent>
<timeout>10</timeout>
<globaltimeout>30</globaltimeout>
<globalhttplog>yes</globalhttplog>
<reporttype>nagios</reporttype>

www_google_com_au__Google_test_testdata.xml
<testcases repeat="1">

<case
id="1"
url="http://www.google.com.au"
/>

</testcases>

how can I resolve this?

when I run it on the command line it works fine

Re: nagios webinject

Posted: Fri Apr 13, 2012 9:24 am
by scottwilkerson
If it works fine from the commandline it is likely a permissions problem, can you show us

Code: Select all

ls -l /usr/local/nagiosxi/etc/components/webinject

Re: nagios webinject

Posted: Fri Apr 13, 2012 9:48 am
by tman-gram
ls -l /usr/local/nagiosxi/etc/components/webinject
total 84
-rwsrwsr-x 1 apache nagios 63271 Apr 13 16:57 webinject.pl
-rw-r--r-- 1 apache nagios 248 Apr 13 17:25 www_google_com_au__Google_test_config.xml
-rw-r--r-- 1 apache nagios 97 Apr 13 17:02 www_google_com_au__Google_test_testdata.xml

Re: nagios webinject

Posted: Fri Apr 13, 2012 9:49 am
by tman-gram
command line result

[root@localhost webinject]# ./webinject.pl -c www_google_com_au__Google_test_config.xml www_google_com_au__Google_test_testdata.xml
WebInject OK - All tests passed successfully in 0.74 seconds |time=0.74;30;;0

Re: nagios webinject

Posted: Fri Apr 13, 2012 10:26 am
by scottwilkerson
your webinject.pl has incorrect permissions, run

Code: Select all

cd /usr/local/nagiosxi/etc/components/webinject
chmod ug-s webinject.pl

Re: nagios webinject

Posted: Tue Apr 17, 2012 6:58 am
by tman-gram
yes that solved the issue

thanx

just wondering why did the full install give it wrong permissions?

Re: nagios webinject

Posted: Tue Apr 17, 2012 10:09 am
by scottwilkerson
This is a good question, I just looked at the permissions on a fresh fullinstall and all was correct.

Did your base machine have any modifications to the umask before running fullinstall?