Webinject Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Webinject Error

Post by rkennedy »

Can you try moving the XML files to the /usr/local/nagiosxi/etc/components/webinject/ directory? I took a look at the check_webinject.sh script, and I believe that's where it's looking for the files.

Here's the code for reference -

Code: Select all

config=$1

#echo "USING CONFIG FILE: ${config}"

cd /usr/local/nagiosxi/etc/components/webinject
#pwd

./webinject.pl -c "${config}" -n
Former Nagios Employee
sutenag
Posts: 59
Joined: Thu Dec 10, 2015 6:39 am
Location: Stockholm, Sweden

Re: Webinject Error

Post by sutenag »

i have copy the file to /usr/local/nagiosxi/etc/components/webinject/ from my local windows client through wincp , dont know which service to restart if where are any, so i reboot the server .. :oops:

ls -l is

-rwxr-xr-x 1 root nagios 254 Dec 2 16:03 SLSV65ACC_Test_BOI.xml

result is now

(No output on stdout) stderr:
Error: Failed to open test case file
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Webinject Error

Post by rkennedy »

I think the permissions need to be apache:nagios in order for this to work. Try changing them and run the check over the CLI once again.

Code: Select all

chown apache:nagios SLSV65ACC_Test_BOI.xml
Former Nagios Employee
sutenag
Posts: 59
Joined: Thu Dec 10, 2015 6:39 am
Location: Stockholm, Sweden

Re: Webinject Error

Post by sutenag »

change permission doesnt help, same error as before.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Webinject Error

Post by rkennedy »

Let's check your version, run this command let me know the output.

Code: Select all

/usr/local/nagiosxi/etc/components/webinject/webinject.pl -v
Can you also post the full input / output from running the command over the CLI?

Lastly, can you supply a copy of the XML file so that I can try to replicate this?
Former Nagios Employee
sutenag
Posts: 59
Joined: Thu Dec 10, 2015 6:39 am
Location: Stockholm, Sweden

Re: Webinject Error

Post by sutenag »

[root@searnantmon01 ~]# /usr/local/nagiosxi/etc/components/webinject/webinject.pl -v
WebInject version 1.41
For more info: http://www.webinject.org

CommandLine

COMMAND: /usr/local/nagios/libexec/check_webinject.sh SLSV65ACC_Test_BOI.xml
OUTPUT:
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: Webinject Error

Post by rkennedy »

Should your <useragent> formatted the way it is?

When looking at http://www.webinject.org/plugin.html, it suggests -

Code: Select all

<useragent>WebInject Application Tester</useragent>
Can you check your system for all of the dependencies located at this page? http://www.webinject.org/build.html
Former Nagios Employee
sutenag
Posts: 59
Joined: Thu Dec 10, 2015 6:39 am
Location: Stockholm, Sweden

Re: Webinject Error

Post by sutenag »

I have change it to <useragent>WebInject Application Tester</useragent> but no differens, same error as before

"Can you check your system for all of the dependencies located at this page? http://www.webinject.org/build.html"

Its a lot of info and read here,what is it on this page specific i looking for and i can check in my system?

And on our production server that running Nagios XI 2012 R1.7 on centos 6.5 we have another webinject problem.

(Return code of 127 is out of bounds - plugin may be missing)

COMMAND: /usr/local/nagios/libexec/check_webinject.sh SLSV65_Test_BOI.xml, the xml file is in this path and have also copy the xml file to ../webinject

i have gone thru https://nebul4ck.files.wordpress.com/20 ... utions.pdf but this is about nrpe check and not webinject.sh
But in nrpe.cfg i cant find any webinject.sh on this server or the test server i we have this case problem on.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Webinject Error

Post by rkennedy »

You may be missing these perl dependencies -

Code: Select all

Required Perl Modules for WebInject Engine (webinject.pl)

    LWP
    HTTP::Cookies
    HTTP::Request::Common
    Time::HiRes
    Getopt::Long;
    Error
    XML::Parser
    XML::Simple
    Crypt::SSLeay*
To keep things on track, can we keep this thread to one issue at a time? Let's figure it out on one server, and then move to the other one.
Former Nagios Employee
sutenag
Posts: 59
Joined: Thu Dec 10, 2015 6:39 am
Location: Stockholm, Sweden

Re: Webinject Error

Post by sutenag »

OK, im sorry but we have an prio job on this production server and a lote of alerts to handle.

Im still not understand what im looking for on these url's you send about webinject and check this on the server?
Locked