Page 2 of 4

Re: Webinject Error

Posted: Tue Jan 05, 2016 4:41 pm
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

Re: Webinject Error

Posted: Thu Jan 07, 2016 8:21 am
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

Re: Webinject Error

Posted: Thu Jan 07, 2016 10:26 am
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

Re: Webinject Error

Posted: Fri Jan 08, 2016 6:15 am
by sutenag
change permission doesnt help, same error as before.

Re: Webinject Error

Posted: Fri Jan 08, 2016 2:09 pm
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?

Re: Webinject Error

Posted: Mon Jan 11, 2016 3:11 am
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:

Re: Webinject Error

Posted: Mon Jan 11, 2016 10:27 am
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

Re: Webinject Error

Posted: Tue Jan 12, 2016 3:31 am
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.

Re: Webinject Error

Posted: Tue Jan 12, 2016 10:39 am
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.

Re: Webinject Error

Posted: Wed Jan 13, 2016 1:29 am
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?