Installing webinject (split topic)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Installing webinject (split topic)

Post 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?
Last edited by abrist on Mon Nov 11, 2013 12:01 pm, edited 1 time in total.
Reason: Split topic from http://support.nagios.com/forum/viewtopic.php?f=7&t=21922
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Installing webinject (split topic)

Post by scottwilkerson »

Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: Installing webinject (split topic)

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Installing webinject (split topic)

Post by slansing »

Looks like you are missing the Crypt::SSLeay dependencies, please run:

Code: Select all

yum install perl-Crypt-SSLeay
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: Installing webinject (split topic)

Post 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.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: Installing webinject (split topic)

Post 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:
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Installing webinject (split topic)

Post by abrist »

Can you show us the xml config for webinject and one of the failing webinject checks from the cli?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
shodg001
Posts: 19
Joined: Wed Oct 23, 2013 5:18 am

Re: Installing webinject (split topic)

Post 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
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: Installing webinject (split topic)

Post 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.
vivithemage
Posts: 102
Joined: Tue May 21, 2013 2:52 pm

Re: Installing webinject (split topic)

Post 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?
Locked