All I've been asked to try and show the overall port utilization of a Cisco MDS switch in a custom plugin (network switches as well). I've gotten all the ports to graph with SNMP just fine. Including putting the Description and Alias as the Dimension values. The issue I've come across is the switches all report data as "relative" values. To graph the speed of the port dynatrace takes the current value reported and subtracts the previous value reported and that gives me how many bytes have changed since xxx seconds. It then displays that data which is perfect. To get the utilization of the port I need to know what this delta is so I can divide the overall port speed. Is there a way to get this delta value from dynatrace when the plugin is gathering metrics? I'm trying to avoid putting this into some type of local file and doing all this math myself. Thanks!
Custom extensions can do both absolute and relative in the python code. simply change "absolute" to "relative" when sending the metric data to Dynatrace. Look here for an example under "Python": https://www.dynatrace.com/support/help/extend-dynatrace/extensions/oneagent-extensions/oneagent-exte...
Thanks Mike I am already graphing the data using the relative for metric collection. The issue is I need to know what the DIFFERENCE is from the previous relative measurement to the current relative measurement as well as the timeframe involved. I dont see a way to get that info all I can do is tell it that its relative and send it up. That works great but I have no way to use that data to graph a "percent utilized" metric. Any way to get this?
you can store any value in the code as long as you have it outside the query method (for example, using self.previous_timestamp). If you then store the previous value and time stamp you can do any calculation you want on it.