Page 1 of 1

Tomcat error

Posted: Fri May 31, 2019 4:55 am
by Siddharth Hegde
Hi,

client.cfg

Code: Select all

check_command = check_tomcat!80!user!password!10%,10%!5%,5%
I'm getting the following alert for the above

Code: Select all

WARNING: memory in use 210 MiB (1708 MiB): Warning: No tomcat connectors matched name =~ /-80$/ 
80 is suppose to be port number right?

Please help me understand and fix the issue

Regards,
Siddarth Hegde

Re: Tomcat error

Posted: Fri May 31, 2019 6:06 am
by Pitone_Maledetto
Hi Siddharth Hegde,
What version of Tomcat are you trying to check?
What plugin do you use? (there are few).
Regards

Re: Tomcat error

Posted: Fri May 31, 2019 6:26 am
by Siddharth Hegde
Hi @Pitone_Maledetto

Tomcat version is 7

Plugin used

Code: Select all

https://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/Apache-Tomcat/check_tomcat-2Epl/details
command.cfg

Code: Select all

#Check tomcat service
define command{
        command_name    check_tomcat
        command_line   /bin/sh -c  "$USER1$/check_tomcat.pl -H $HOSTADDRESS$ -p $ARG1$ -l $ARG2$ -a $ARG3$ -w $ARG4$ -c $ARG5$"
        }
Regards,
Siddarth Hegde

Re: Tomcat error

Posted: Fri May 31, 2019 6:46 am
by Pitone_Maledetto
Assuming check_tomcat.pl,v 1.4

Try to add the following to match all connectors:

Code: Select all

-n .
or specify one e.g. -n http-8080

Re: Tomcat error

Posted: Fri May 31, 2019 8:45 am
by Siddharth Hegde
Hi @Pitone_Maledetto

I'm getting this message

Code: Select all

(No output on stdout) stderr: Port must be a decimal number, eg "-p 8080"
Regards,
Siddarth Hegde

Re: Tomcat error

Posted: Fri May 31, 2019 9:48 am
by Pitone_Maledetto
Skip -p since it is optional when not different from default value of 8080.
Is the plugin the latest version?
Have you set the -n has per above?
Please share again your updated command.

Re: Tomcat error

Posted: Fri May 31, 2019 1:29 pm
by cdienger
Also, make sure you can run the command directly:

/usr/local/nagios/libexec/check_tomcat.pl -H HOSTADDRESS -p 80 -l USER -a PASSWORD -w 10%,10% -c 5%,5%

Re: Tomcat error

Posted: Mon Jun 03, 2019 2:27 am
by Siddharth Hegde
Thanks @Pitone_Maledetto and @cdienger

Tomcat seems to be working now. I removed the plugin and put it back and restarted both servers.

Regards,
Siddarth Hegde

Re: Tomcat error

Posted: Mon Jun 03, 2019 7:07 am
by scottwilkerson
Siddharth Hegde wrote:Thanks @Pitone_Maledetto and @cdienger

Tomcat seems to be working now. I removed the plugin and put it back and restarted both servers.

Regards,
Siddarth Hegde
Great!

Locking