24 May 2023 02:41 PM
Anyone have some experience creating JMX extensions? Specifically I am looking at one for Kafka. The UI within Dynatrace doesn't allow you to select multiple topics so my thought process was that I will modify the json directly but I don't even know if that is possible, I'm new with JMX extension. When attempting to pull in all topics we hit the 100 dimension limit and the ones that we actually need are not there, hence I thought I could input the specific topic names.
Is this possible? My json snippet is below, the bolded portion is my attempt to add a few different topics. I've tried a few variations but nothing seems to work. Metrics I am working with via the link below.
https://docs.confluent.io/platform/current/kafka/monitoring.html#per-topic-metrics
{
"timeseries": {
"key": "producer.byte.rate",
"unit": "Count",
"displayname": "Kafka producer - Byte rate",
"dimensions": [
"rx_pid",
"topic"
]
},
"source": {
"domain": "kafka.producer",
"keyProperties": {
"type": "producer-topic-metrics",
"client-id": "*",
"topic": "{CIS_ACCT_EVENT_OUTAGE_ELIGIBILITY|OCP_OUTAGE_EVENT_REPORTED}"
},
"attribute": "byte-rate",
"allowAdditionalKeys": true,
"calculateDelta": false,
"calculateRate": false,
"aggregation": "AVG",
"splitting": {
"name": "topic",
"type": "keyProperty",
"keyProperty": "topic"
}
}
}
Solved! Go to Solution.
24 May 2023 04:00 PM
You definitely can modify the plugin.json manually, that is how we built the supported built-in JMX extensions.
There is a doc page here that describes it in detail: https://www.dynatrace.com/support/help/extend-dynatrace/extend-metrics/ingestion-methods/jmx-extensi...
In particular here: https://www.dynatrace.com/support/help/shortlink/extensions-jmx-customize#source
You can use wildcards in the keyProperties field but not other operators like '|' for 'or'.
I thought the limit was raised to 1000 quite a bit ago, are you sure it's not the 100 limit in the data explorer? Either way I'd say the options would be try to get the filter working with the wildcards e.g. *OUTAGE* or 2 separate extensions with a different filter for the keyProperty topic filter. The latter would be feasible if there's just 2.