Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
Your review has been submitted and is pending approval.
check the tomcat /manager/status page for excessive memory usage or an excessive number of threads in use.
Current Version
1.4
Last Release Date
2011-12-15
Owner
George Hansper
License
GPL
Compatible With
plugin (Perl script)
This plugin does a HTTP GET of the tomcat status page: /manager/status?XML=true It checks the resulting XML for: * Low free memory * Excessive thread usage Note that although this sounds quite useful, the nature of garbage collection in Java means that this plugin is prone to 'false positives' when reporting memory usage. ie. it will complain about low memory, which may be fixed by the next garbage collection. I suggest setting the critical threshold for memory quite low - 50 Mbytes or less. It is also useful to set the 'max_check_attempts' higher than usual to give garbage collection time to kick in. This plugin has proved useful in debugging, by picking up the time when a problem started, as distinct from when the tomcat actually failed. This plugin requires the following perl libraries, available with most Linux distributions or from cpan.org LWP - The World-Wide Web library for Perl XML::XPath - for parsing and evaluating XPath statements These are possibly packaged as: perl-libwww-perl perl-XML-XPath v1.2 released 2011-11-30 can check any connector-name. If invoked with '-n .' will check ALL connectors mentioned in the XML status report. v1.3 released 2011-12-15 adds currentThreadCount to the performance data reported by this plugin. v1.4 released 2013-03-15 fixes a bug where the warning and critical values for threads was not being correctly calculated on the second and subequent connectors. Also changed MB to MiB.
It works on CentOS 6.4 + Tomcat 7.0.69
#./check_tomcat_test.pl -H -p -l -a -u '/manager/status?XML=true' Running above command throws below error; PositionContext: Parse position is outside of buffer at /usr/local/lib64/perl5/XML/Parser/Expat.pm line 344. Running with verbose getting; Connecting to : --------------- GET http://:/manager/status?XML=true Host: : User-Agent: libwww-perl/5.833 --------------- HTTP/1.1 200 OK Cache-Control: private Connection: close Date: Date Server: Apache-Coyote/1.1 Content-Length: 2442 Content-Type: text/xml;charset=utf-8 Expires: Thu, 01 Jan 1970 01:00:00 Client-Date: DATE Client-Peer: : Client-Response-Num: 1 Content has 2442 bytes PositionContext: Parse position is outside of buffer at /usr/local/lib64/perl5/XML/Parser/Expat.pm line 344.
This works great with tomcat 7.
It is not working with tomcat 7 ... It would be great if you can fix this issue. Thanks!
tomcat7 changed the default connector name from http-8080 to "http-bio-8080", and added an additional level of quotes (!). v1.2 of the plugin now allows arbitrary connector names, and strips off the quotes.
You must be logged in to submit a review.
To:
From: