Page 1 of 1

Got error when running plugin check_tomcat.pl

Posted: Wed Jan 08, 2014 5:00 am
by Frédéric GRANAT
Hi,
I've got the followin error when running : /usr/local/nagios/libexec/check_tomcat.pl -H server (I downloaded it from http://exchange.nagios.org/directory/Pl ... pl/details)

Can't locate XML/XPath.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8 /i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_ perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-mul ti /usr/lib/perl5/5.8.8 .) at ./check_tomcat.pl line 27.
BEGIN failed--compilation aborted at ./check_tomcat.pl line 27.

Seems I need to install :
LWP - The World-Wide Web library for Perl
XML::XPath - for parsing and evaluating XPath statements

How could I easily install that ?

Please help me.

Frederic

Re: Got error when running plugin check_tomcat.pl

Posted: Wed Jan 08, 2014 10:12 am
by tmcdonald
If you are on a system that uses Yum to manage packages, you can do:

Code: Select all

yum install perl-libwww-perl perl-XML-XPath

Re: Got error when running plugin check_tomcat.pl

Posted: Wed Jan 08, 2014 11:21 am
by Frédéric GRANAT
Thanks,
Perfect, I installed it

Now I've got the following error :


Testing check from command line...

COMMAND: /usr/local/nagios/libexec/check_tomcat.pl -H IP -p 8086 -l -a -w -c
OUTPUT: WARNING: http://IP:8086/manager/status?XML=true HTTP/1.1 401 Non-Autoris

How can I do ?

Re: Got error when running plugin check_tomcat.pl

Posted: Wed Jan 08, 2014 12:35 pm
by slansing
Make sure the username and password are correct when you run the plugin script. The user MUST be assigned on the Apache tomcat server with manager privileges.

Re: Got error when running plugin check_tomcat.pl

Posted: Thu Jan 09, 2014 9:04 am
by Frédéric GRANAT
Hi,
Thank you very much.
It works fine now.
You can close the post

Frederic