tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Bash script for monitoring status of the Tomcat server
Date Mon, 02 Apr 2012 19:49:55 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

On 4/2/12 3:28 PM, Caldarale, Charles R wrote:
>> From: Miguel González Castaños
>> [mailto:miguel_3_gonzalez@yahoo.es] Subject: Bash script for
>> monitoring status of the Tomcat server
> 
>> I would like to run a bash script to monitor these values and
>> warn me if the reach a certain level. Also a tool that generates
>> some graphs would be great.
> 
> Not quite sure how you can put "bash" and "graphs" together, but
> nonetheless...
> 
> 2) Use wget or curl to access Tomcat's text-mode manager app and 
> parse the results.

+1 -- and use the JMXProxyServlet, which lets you query specific
components like the connectors. We've been doing this lately to great
success.

You can use a tool like rrdtool to store the data and generate
nice-looking graphs over time. You can also easily use the same feed
to do real-time monitoring using a tool like Nagios, Ichinga, etc.

> 3) Use a command-line JMX tool like jmxsh
> (http://code.google.com/p/jmxsh/) to extract information and parse
> out whatever you want.

While this is a tempting idea, when you start probing many different
values via JMX, you'll find that starting a dozen JVMs and connecting
via JMX starts to strain the server unnecessarily. That's why I
recommend using JMXProxyServlet -- you get the power of JMX without
actually making a JMX connection.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk96AuMACgkQ9CaO5/Lv0PAMqwCgnMEf3G54uFmERY1h/ezDRhCk
aKIAnibgy+FJlo2Qcr87iOE6+43EP+gR
=NIfs
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message