Page 1 of 1

Issue with check_tomcat script

Posted: Tue May 23, 2017 5:38 am
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

Re: Issue with check_tomcat script

Posted: Tue May 23, 2017 3:22 pm
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

Re: Issue with check_tomcat script

Posted: Tue May 23, 2017 3:28 pm
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%

Re: Issue with check_tomcat script

Posted: Wed May 24, 2017 8:46 am
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

Re: Issue with check_tomcat script

Posted: Wed May 24, 2017 12:45 pm
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.

Re: Issue with check_tomcat script

Posted: Thu Sep 21, 2017 3:13 am
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

Re: Issue with check_tomcat script

Posted: Thu Sep 21, 2017 10:42 am
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?