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:
- Conversion to Megabytes results in 10 TB.
- Conversion to Kilobytes results in 30 MB.
- 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