JMX monitoring from the outside


(Ross Bragg) #1

I would like to monitor the Graylog JVM through JMX.

  • Our main product runs in Tomcat, so we drop the Jolokia WAR in with our application WAR and get metrics from that. I understand Graylog runs on Glassfish, but since it’s a self-contained JAR, is there any way to add Jolokia to webapp itself?

  • I have found the Graylog JMX metrics reporting plugin, but not how it works. Other than adding it to my Graylog installation, what do I need to do? How does it actually expose those metrics values? I couldn’t find much in the way of documentation around that plugin(s).

Any enlightenment would be appreciated!


(Jochen) #2

What part of Graylog would you like to monitor specifically and why with JMX?

That’s incorrect. Graylog is using some projects from the Glassfish umbrella project (such as Jersey and Grizzly), but it’s not running on or embedding Glassfish.

See https://github.com/graylog-labs/graylog-plugin-metrics-reporter/blob/1.5.0/metrics-reporter-jmx/README.md

It exposes them via JMX (duh!). See http://metrics.dropwizard.io/3.2.2/manual/core.html#jmx for details.


(Ross Bragg) #3

“Expose” was the wrong word, I should have asked how those values are accessed.

I have worked with JMX values by setting up access through params (port, host, username, password) passed on the command line, like in this example on Stack. I see now that those values can possibly be accessed by attaching directly to the process, but I didn’t realize that when I looked at the JMX Graylog plugin.

I would like to monitor garbage collection duration since we’re getting notifications about it being slow. I would like to use JMX because we already have some templates for JMX data within our monitoring setup, one of which is GC duration.

I already monitor memory usage through the /system/jvm REST API on each node, but I can’t find any more detailed JVM information than that in the API browser. If there’s a way to get GC duration info through the REST API or some other way without JMX, I’m fine with that too, I just want to get at the info.