Page 1 of 2

Installing webinject (split topic)

Posted: Mon Nov 11, 2013 11:55 am
by vivithemage
Looks like I got it working a bit better, but those sterr I am seeing is probably related to web inject not being installed on this new server. Is there an easy way to run the install for webinject?

Re: Installing webinject (split topic)

Posted: Mon Nov 11, 2013 12:33 pm
by scottwilkerson

Re: Installing webinject (split topic)

Posted: Tue Nov 12, 2013 3:05 pm
by vivithemage
I ran through the perl dependencies and installed them ... I see this error in the log a bunch now:

^G[1384286574] SERVICE ALERT: p021_node02;client1207;CRITICAL;SOFT;2;(No output on stdout) stderr: Can't locate Crypt/SSLeay.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/lib/perl5/site_perl/5.8.8/Webinject.pm line 29.

Re: Installing webinject (split topic)

Posted: Tue Nov 12, 2013 3:10 pm
by slansing
Looks like you are missing the Crypt::SSLeay dependencies, please run:

Code: Select all

yum install perl-Crypt-SSLeay

Re: Installing webinject (split topic)

Posted: Tue Nov 12, 2013 3:16 pm
by vivithemage
okay, now I see:

[1384287348] SERVICE ALERT: p026_node01;client1251;CRITICAL;SOFT;1;(No output on stdout) stderr: Can't locate XML/Parser.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/lib/perl5/site_perl/5.8.8/Webinject.pm line 30.

Re: Installing webinject (split topic)

Posted: Tue Nov 12, 2013 3:18 pm
by vivithemage
ran: yum install perl-XML-Parser

now I see a lot of:


[1384287502] SERVICE ALERT: us002_node01;client6018;UNKNOWN;SOFT;2;ERROR: Failed to open /nagios.xml file: No such file or directory
[1384287502] SERVICE ALERT: t002_node02;train0018;UNKNOWN;SOFT;1;ERROR: Failed to open /nagios.xml file: No such file or directory
[1384287502] SERVICE ALERT: sb005_node01;sb1058;UNKNOWN;SOFT;1;ERROR: Failed to open /nagios.xml file: No such file or directory
[1384287502] SERVICE ALERT: p016_node01;client1160;UNKNOWN;SOFT;1;ERROR: Failed to open /nagios.xml file: No such file or directory
[1384287502] SERVICE ALERT: uat362_node01;uat362;UNKNOWN;SOFT;1;ERROR: Failed to open /nagios.xml file: No such file or directory
[1384287502] SERVICE ALERT: sb003_node01;sb1016;UNKNOWN;SOFT;1;(No output on stdout) stderr:
[1384287503] SERVICE ALERT: us002_node01;client6017;UNKNOWN;SOFT;1;(No output on stdout) stderr:
[1384287503] SERVICE ALERT: t001_node02;train0004;UNKNOWN;SOFT;2;(No output on stdout) stderr:
[1384287503] SERVICE ALERT: client328_node02;client328;UNKNOWN;HARD;3;(No output on stdout) stderr:

Re: Installing webinject (split topic)

Posted: Tue Nov 12, 2013 4:19 pm
by abrist
Can you show us the xml config for webinject and one of the failing webinject checks from the cli?

Re: Installing webinject (split topic)

Posted: Wed Nov 13, 2013 8:36 am
by shodg001
/nagios.xml might be referring to the test case file. Check your config.xml and look for this tag:

<testcasefile></testcasefile>

Mine for example is <testcasefile>testcase.xml</testcasefile>
testcase.xml is located in the same directory as the rest of the Nagios Plugins, to include check_webinject (/usr/local/nagios/libexec) I use Ubuntu.

From the command line I call a web service like so:

sudo ./check_webinject -s baseurl=http://url/ testcase.xml

Re: Installing webinject (split topic)

Posted: Wed Nov 13, 2013 11:44 am
by vivithemage
all my nagios.xml file says is:

<globaltimeout>20</globaltimeout>
<reporttype>nagios</reporttype>

located in:

/usr/local/nagios/libexec/webinject

this is how it is on my old nagios as well, which is not throwing the error.

Re: Installing webinject (split topic)

Posted: Wed Nov 13, 2013 11:50 am
by vivithemage
I ran a test:

./check_webinject -s baseurl=client1261.xxxxxxx.com webinject/401prod.xml

but get:

WebInject CRITICAL - case #1: Failed - No valid HTTP response: 500 Can't connect to ${url}:8080 (Bad hostname)
Content-Type: text/plain
Client-Date: Wed, 13 Nov 2013 16:49:46 GMT
Client-Warning: Redirect loop detected (max_redirect = 0)

Can't connect to ${url}:8080 (Bad hostname)

LWP::Protocol::http::Socket: Bad hostname '${url}' at /usr/lib/perl5/site_perl/5.8.8/LWP/Protocol/http.pm line 51.


Test: webinject/401prod.xml - 1
Desc: Check LDAP Cache
GET Request: http://${url}:8080/RNJ/action/LDAPCacheDisplay
Failed - No valid HTTP response:
500 Can't connect to ${url}:8080 (Bad hostname)
Content-Type: text/plain
Client-Date: Wed, 13 Nov 2013 16:49:46 GMT
Client-Warning: Redirect loop detected (max_redirect = 0)

Can't connect to ${url}:8080 (Bad hostname)

LWP::Protocol::http::Socket: Bad hostname '${url}' at /usr/lib/perl5/site_perl/5.8.8/LWP/Protocol/http.pm line 51.
TEST CASE FAILED : case #1: Failed - No valid HTTP response: 500 Can't connect to ${url}:8080 (Bad hostname)
Content-Type: text/plain
Client-Date: Wed, 13 Nov 2013 16:49:46 GMT
Client-Warning: Redirect loop detected (max_redirect = 0)

Can't connect to ${url}:8080 (Bad hostname)

LWP::Protocol::http::Socket: Bad hostname '${url}' at /usr/lib/perl5/site_perl/5.8.8/LWP/Protocol/http.pm line 51.

Response Time = 0.023 sec
-------------------------------------------------------

Test Cases Run: 1
Test Cases Passed: 0
Test Cases Failed: 1
Verifications Passed: 0
Verifications Failed: 1

|time=0.149;0;0;0;0 case1=0.023;0;0;0;0 case2=0;0;0;0;0


I wonder if the way to reference the bsae_url has changed in the new version?