I've hazelcast in 2 EC2 instances, and I have also enabled the JMX in the configuration file of hazelcast and also running the hazelcast with option (-Dhazelcast.jmx=true); my custom JMX extension is below; this is not working.
name: custom:com.hazelcast
version: 2.0.0
minDynatraceVersion: 1.265.0
author:
name: SatNas
# Optional metric metadata
metrics:
- key: com.hazelcast.cluster.size
metadata:
displayName: Hazelcast Cluster Size
description: Hazelcast Cluster Size
unit: Count
# Defines how to create metrics from JMX MBeans
jmx:
groups:
- group: hazelcast
subgroups:
- subgroup: cluster
query: com.hazelcast:type=Cluster
metrics:
- key: com.hazelcast.cluster.size
type: gauge
value: attribute:ClusterSize
To confirm the OneAgent and ActiveGate configurations are correct, the following sample custom jmx extension, running on the same EC2, works fine.
# required extension metadata
name: custom:com.example.jmx
version: 1.0.0
minDynatraceVersion: 1.265.0
author:
name: SatNas
# optional metric metadata
metrics:
- key: com.example.jmx.thread_count
metadata:
displayName: Thread Count
description: Number of active Java threads
unit: Count
# defines how to create metrics from JMX MBeans
jmx:
groups:
- group: jvm
subgroups:
- subgroup: basic
query: java.lang:type=Threading
metrics:
- key: com.example.jmx.thread_count
type: gauge
value: attribute:ThreadCount