- Download and install Metricbeat.
Use metricbeat-oss package, if you don't have
xpack
- Download Jolokia's JVM agent
The Jolokia JVM agent should be enabled for each dCahce java process that should be monitored:
dcache.java.options.extra=-javaagent:/etc/dcache/jolokia-jvm-agent.jar=port=7771,host=localhost
NOTE, if you run multiple dCache domains on the same host, the each process
must
have it's own unique port number.
For all possible configuration options of Jolokia JVM agent check the official documentation
Enable jolokia module for metricbeat:
$ metricbeat modules enable jolokia
Update /etc/metricbeat/modules.d/jolokia.yml
file add add all agents ports:
- module: jolokia
metricsets: ["jmx"]
period: 10s
hosts: ["localhost:7771"]
http_method: 'GET'
namespace: "metrics"
jmx.mappings:
- mbean: 'java.lang:type=Runtime'
attributes:
- attr: Uptime
field: uptime
- mbean: 'java.lang:type=Memory'
attributes:
- attr: HeapMemoryUsage
field: memory.heap_usage
- attr: NonHeapMemoryUsage
field: memory.non_heap_usage
- mbean: java.lang:type=Threading
attributes:
- attr: ThreadCount
field: threads.live
- attr: DaemonThreadCount
field: threads.daemon
- mbean: java.lang:type=OperatingSystem
attributes:
- attr: ProcessCpuLoad
field: cpu.process_load
- attr: SystemCpuLoad
field: cpu.system_load
- start dCache
$ dcache start
- start/enable metricbeat service
$ systemctl start metricbeat