cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to graph percent utilization of an interface if the data is relative?

desjardd
Observer

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!

5 REPLIES 5

Mike_L
Dynatrace Guru
Dynatrace Guru

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...

Mike

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?

Hi,

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.

Mike

Thanks! Yeah we found this out that it basically just runs in a loop so the previous value is always "there".

I was also able to use the per_second as well which did what we wanted as well. I wanted the MB per second not minute. relative is per minute.

Featured Posts