15 Jan 2025 02:42 PM
As part of Extension 2.0, I am monitoring JMX metrics generated by an application.
One of the metrics has the displayName: DirectBufferPool Memory Used, which is generated in bytes. However, within the extension, I would like to perform a conversion and display the metric in megabytes.
I have tried modifying the unit settings in the documentation, but none of the changes have produced the expected result. Instead, incorrect unit calculations occur. For example, when the base value is 30 million bytes:
- podskupina: java.nio:name=direct,* dotaz: java.nio:name=direct,* metriky: - klíč: java-nio.direcbufferpool.memory hodnota: atribut:Použitá paměť typ: měřidlo metricTableCards: [] - entityType: HOST podrobnosti Injekce: - typ: METRIC_TABLE klíč: metrictable-jmx-multiple_services podmínky: - metricAvailable|metric=dsfm:extension.status:filter(and(eq("dt.extension.name","custom:jmx.multiple_services"),in("dt.entity.host", entitySelector("entityId($ (entityId))))))|lastWrittenWithinDays=5 metricTableCards: - displayName: DirecBufferPool Použitá paměť typ vizualizace: GRAPH_CHART graphChartConfig: naskládaný: falešný metriky: - metricSelector: java-nio.direcbufferpool.memory:splitBy() metriky: - klíč: java-nio.direcbufferpool.memory metadata: displayName: DirecBufferPool Použitá paměť popis: DirecBufferPool Memory Used jednotka: Byte sourceEntityType: instance_group_processu značky: - JMX
Solved! Go to Solution.
17 Jan 2025 01:10 AM
You can't change the metric itself since it is retrieved in Bytes
What you can do is change the visualization in dashboards, alerts, etc, anywhere where you can use a metric selector by using the to Unit operation, converting Bytes to something else.