Pregunta

I need to see jvm metrics on ganglia report, I've set up jmxetric on a node and see jvm metrics when using simple 'telnet localhost 8649'.

I have ganglia-web with gmond/gmetad running on another machine and it shows standard reports such as cpu/memory, but not new jvm metrics.

Should I configure ganglia-web manually to make it show jvm group as well?

I'm using ganglia 3.3.7.

¿Fue útil?

Solución 2

There should be no need to configure ganglia-web to show new metrics, they just show up given their metadata is also known to the listening gmond and gmetad has thus received and written them to rrd databases.

Are you using unicast mode? You may be sending the jmxetric metrics only to the gmond running on the jmxetric host. Gmond won't forward the metrics to the ganglia-web/gmetad/gmond host unless you add them to a collection group in gmond.conf at the jmxetric host.

Also in unicast mode, make sure gmond.conf has send_metadata_interval set to something other than 0 (default). This prevents metrics from disappearing if you restart gmond on the gmetad node.

Another way is to send the jmx metrics directly from jmxetric to the gmond running on the gmetad node.

Otros consejos

Answering my own question, here are the steps I needed to do to see jvm reports in ganglia web:

  • git clone and build https://github.com/ganglia/jmxetric (mvn package)
  • create superjar from gmetric4j-1.0.2.jar/jmxetric-1.0.2.jar/oncrpc-1.0.7.jar (to avoid class loading issues, what is recommended approach?)
  • add agent when launching jvm:
  • -javaagent:/etc/zoomdata/jmxetric-1.0.2.jar=host=MYHOST_AS_IN_GMOND_CONF,port=8649,mode=unicast,wireformat31x=true,process=PROCESS_NAME,config=/etc/jmxetric.xml"
  • jmxmetric.xml as in https://github.com/ganglia/jmxetric

Notes: Host name used in javaagent must match the one used in gmond.conf host name/port/mode/process can be specified as -javaagent option and also in jmxetric.xml, If you need to deploy to several machines, better to remove jvm and ganglia nodes from xml and define everything via -javaagent parameters. xml will only contain list of jvm metrics and can be copied to all machines.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top