Tomcat error

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.
Locked
Siddharth Hegde
Posts: 70
Joined: Mon Aug 07, 2017 4:19 am

Tomcat error

Post 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
User avatar
Pitone_Maledetto
Posts: 69
Joined: Fri Jul 01, 2016 4:11 am
Location: Liverpool, United Kingdom

Re: Tomcat error

Post by Pitone_Maledetto »

Hi Siddharth Hegde,
What version of Tomcat are you trying to check?
What plugin do you use? (there are few).
Regards
"It is impossible to work in information technology without also engaging in social engineering"
Jaron Lanier
Siddharth Hegde
Posts: 70
Joined: Mon Aug 07, 2017 4:19 am

Re: Tomcat error

Post 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
User avatar
Pitone_Maledetto
Posts: 69
Joined: Fri Jul 01, 2016 4:11 am
Location: Liverpool, United Kingdom

Re: Tomcat error

Post 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
"It is impossible to work in information technology without also engaging in social engineering"
Jaron Lanier
Siddharth Hegde
Posts: 70
Joined: Mon Aug 07, 2017 4:19 am

Re: Tomcat error

Post 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
User avatar
Pitone_Maledetto
Posts: 69
Joined: Fri Jul 01, 2016 4:11 am
Location: Liverpool, United Kingdom

Re: Tomcat error

Post 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.
"It is impossible to work in information technology without also engaging in social engineering"
Jaron Lanier
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Tomcat error

Post 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%
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Siddharth Hegde
Posts: 70
Joined: Mon Aug 07, 2017 4:19 am

Re: Tomcat error

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Tomcat error

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked