Issue with check_tomcat script

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
Poulami
Posts: 6
Joined: Tue May 23, 2017 5:07 am

Issue with check_tomcat script

Post by Poulami »

Hi Team,

I am facing an issue while running check_tomcat script.

Command :-
check_tomcat -l myuser -a mypassword -p 8080

o/p :-
CRITICAL: /status/connector/threadInfo/@maxThreads is not numeric memory in use 944 MiB (1979 MiB); Critical: free_threads<0 threads[http-nio-8080]=1(0);|/status/connector/threadInfo/@maxThreads=not_numeric used=990607152 free=1085311184 max=2075918336 currentThreadsBusy=1 currentThreadCount=4 maxThreads=

can you please suggest what is going wrong? Why I am getting '/status/connector/threadInfo/@maxThreads is not numeric'?

Best Regards,
Poulami
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Issue with check_tomcat script

Post by tgriep »

What version of that plugin are you running and where did you download it from?
Can you post the plugin here so we can view it?

I did find on the internet that the bug you are having has been fixed in this version. Try upgrading to that and see if it fixes your issue.
https://exchange.nagios.org/directory/P ... pl/details
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Issue with check_tomcat script

Post by tgriep »

One more thing, try and set a warning and critical threshold and see if that helps as well.
-w ... warning thresholds for threads,memory (memory in MiB)
eg 20,50 or 10%,25% default is 25%,5%
-c ... critical thresholds for threads,memory (memory in MiB)
eg 10,20 or 5%,10%, default is 10%,2%
Be sure to check out our Knowledgebase for helpful articles and solutions!
Poulami
Posts: 6
Joined: Tue May 23, 2017 5:07 am

Re: Issue with check_tomcat script

Post by Poulami »

Hi,

I am using version 1.4 of the script.

command which i'm using is :

Code: Select all

./check_tomcat -H 172.18.39.16 -p 8080 -l username -a passwrd -w 10% -c 5%
I have attached the script for your reference.

Best Regards,
Poulami
Attachments
check_tomcat.pl
(12.88 KiB) Downloaded 326 times
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Issue with check_tomcat script

Post by tgriep »

The plugin is the correct version.
At this point, you will have to contact the Author of the plugin and see they could help out in that error.
Be sure to check out our Knowledgebase for helpful articles and solutions!
hickeyr
Posts: 1
Joined: Mon Jul 18, 2016 3:17 am

Re: Issue with check_tomcat script

Post by hickeyr »

Hi,
I had the same problem recently, the cause was that tomcat was reporting a negative number for some of the thread counts
e.g. Max threads: 150 Current thread count: -2 Current thread busy: -2

To stop this being an error modify line 278
from if ( $value =~ /^"?([0-9.]+)"?$/ ) {
to if ( $value =~ /^"?(\-?[0-9.]+)"?$/ ) {

i.e. You are adding \-? to the regexp to allow for an optional minus sign.

Ruairi
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issue with check_tomcat script

Post by scottwilkerson »

hickeyr wrote:Hi,
I had the same problem recently, the cause was that tomcat was reporting a negative number for some of the thread counts
e.g. Max threads: 150 Current thread count: -2 Current thread busy: -2

To stop this being an error modify line 278
from if ( $value =~ /^"?([0-9.]+)"?$/ ) {
to if ( $value =~ /^"?(\-?[0-9.]+)"?$/ ) {

i.e. You are adding \-? to the regexp to allow for an optional minus sign.

Ruairi
Thanks for sharing @hickeyr!


@Poulami could this be the problem?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked