-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rainer,

On 1/28/12 8:51 AM, Rainer Jung wrote:
> On 26.01.2012 19:32, Christopher Schultz wrote:
> 
>> Now I'm trying to get similar information using a command-line
>> tool that is very simple called check_jmx -- it's a plug-in for
>> Nagios. It appears that this tool does not support the "attach"
>> API and so it looks like I'll have to enable "remote JMX", so
>> I've followed the instructions on Tomcat's monitoring page to
>> enable remote JMX [3]:
> 
> 
>> 3. Should I just give up and use the manager app's jmxproxy? I
>> don't currently deploy the manager app, and I'd like to avoid
>> doing that if possible. But, it may be a slightly cleaner
>> solution.
>> 
>> 4. Should I hack the code for check_jmx to use the Attach API
>> and try to avoid all of this stupid port business? Getting the
>> PID of the Tomcat process shouldn't be hard as long as I use 
>> CATALINA_PID and get the value from there.
> 
> Note that the naive check_jmx attempt will not scale. Monitoring
> JVMs using JMX by starting a new JVM on the polling server for each
> poll and each monitored instance will soon killk your monitoring
> server.

Yeah, we're using check_nrpe to invoke the check_jmx processes on the
server that is being monitored, but I expect that we will be
monitoring half a dozen JMX variables on several VMs, and that means
lots of JVMs being fired up just to connect and ask a simple question.

> You either need to use an agent running in the target JVM and
> providing access via a simpler non-Java protocol, or you need a
> long running Java based gateway, which does the JMX communication
> with the target JVMs and gets itself queried with something
> simpler.

Are you suggesting a long-running process with a persistent connection
to the JVM, so that a new JVM for each request can be avoided? Someone
has to have done that already, right?

> In that sense the Tomcat Manager can act as an agent via its
> jmxproxy feature, making JMX data available for each HTTP client
> that can parse simle text output.

I may consider doing that, though we aren't using the manager app for
anything else right now. I'll see if I can use it without allowing
access to any other services (like deploy, etc.).

> Another a bit more sophisticated approach which can be well
> integrated with Nagios is Jmx4Perl as a client in combination with
> Jolikia as the agent (all Open Source).

I'll check that out.

> Of course there are many more options available.

I'll document what I find on the wiki. I'm surprised that there's
little monitoring information on the Tomcat site. :(

- -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/

iEYEARECAAYFAk8oTw4ACgkQ9CaO5/Lv0PAahQCfQ2NreQ55K10o4DVJQzGRxv9R
ZlEAoJ/mc8sUL+q3CDYxJAV1+7XAUib+
=FpZG
-----END PGP SIGNATURE-----

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

Reply via email to