18 Aug 2022 02:57 AM - last edited on 29 Aug 2022 09:50 AM by Ana_Kuzmenchuk
Hi,
We created a custom extension plugin to retrieve stats from Nutanix, but when it's SPLIT by CUSTOM_DEVICE it's still showing UUID instead of a more meaningful name like HOST_NAME (they can be grabbed from the Nutanix API).
relevant code: (plugin.json)
Is there configuration to grab the host_name from the metrics in the plugin.json, or maybe from the metric's metadata as below?
Solved! Go to Solution.
09 Sep 2022 03:52 PM
Hi @Ardhi
if I understand this correctly, your ActiveGate extension is pulling the metrics from the Nutanix API and then feeding these into Dynatrace. This means you also handle how the data is sent to Dynatrace, so you will need to also specify the necessary dimension for which host(s) you are sending the data.
This means in your metrics list you will need to define something like this:
{
"entity": "CUSTOM_DEVICE",
"timeseries": {
"key": "disk_size",
"unit": "Count",
"displayname": "Disk size",
"dimensions": [
"host_name"
]
}
},
and whenever pushing a metric point you will need to pass the necessary dimension with that metric e.g.:
device.absolute(key="disk_size", value=123, dimensions={"host_name":"my_host_name"})
Otherwise splitting by "Custom Device" will lead to split the metrics by Instance of said Extension (these are the ones created by your extension)
Hope this helps,
Best,
Mark