Monday, September 17, 2012

Enable JMX Metrics in Flume 1.3x

As you know, Flume supports Ganglia (version 3 and above) to collect report metrics. The details are described in our documentation (1).

Now I'll describe how do you use JMX reporting (to integrate metrics into other monitoring systems or monitor flume directly via Java's builtin JMX console (2)). That's pretty easy - choose a port which is free on your server and not firewall blocked.

First, enable JMX via flume's env.sh ($FLUME_HOME/conf/flume-env.sh) and uncomment / add / edit the line starting with JAVA-OPTS:

JAVA_OPTS="-Xms100m -Xmx200m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=54321 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"

Of course, restart all running agents. 

Now point jconsole to Flume:

jconsole YOUR_HOSTNAME: 54321