30 Nov 2018 03:07 PM - last edited on 18 May 2023 05:05 PM by Michal_Gebacki
I'm writing an ActiveGate remote plugin and have everything working as expected with the exception of figuring out dimensions. I have network devices with a variable count of interfaces and I'm wanting to graph out metrics for each interface. So far all I'm getting is an aggregation of all interfaces into a single metric within a single chart. What I'd like to do is have each interface graphed out within a single chart or worst case have a chart for each interface.
From my json here's my metrics entry:
{
"entity": "CUSTOM_DEVICE",
"timeseries": {
"key": "nodetraffic",
"unit": "Byte",
"dimensions": ["nodenamedim"],
"displayname": "Node Traffic"
}
json charts entry:
{
"group": "Network Interfaces",
"title": "Interface Traffic",
"description": "Interface Traffic",
"explanation": "Not used",
"link": "Demo link",
"series": [
{
"key": "nodetraffic",
"displayname": "Node Test",
"aggregation": "avg",
"mergeaggregation": "avg",
"color": "#008cdb",
"seriestype": "line",
"rightaxis": false,
"stacked": false,
"unit": "PerSecond",
"metricexplanation": "Not used"
}
]
}
Plugin entry (from within a for loop of interfaces)
NetDevice.relative(key="nodetraffic", value=nodein, dimensions = {"nodenamedim" : node_name})
Any assistance you could provide would be greatly appreciated!!
Solved! Go to Solution.
30 Nov 2018 03:26 PM
Hi,
Move the json charts entry to the "charts" section of the plugin.json, and out of the "keycharts" section. Also, drop the mergeaggregation property.
Mike
30 Nov 2018 03:49 PM
Thank you sir - perfect! It was that mergeaggregation property getting me.
30 Nov 2018 03:52 PM
No worries, good luck with the plugin!
09 Jul 2019 08:37 PM
Does the dimensions work for OneAgent plugin as well?