How to get maximum interface utilization over a time period by script


I want get the maximum interface utilization of a router interface for example the last 30 days by script. I think one way would be, to use rrdtool fetch. But I don’t know exactly what are the units of the values in the RRD File. In the .info in/out bandwidth would be the fourth and fifth field. But the values don’t correlate with the graph in the gui. Is there a documentation about units and values of interface RRDs?

Or is it possible to get the maximum utilization by API?

Many thanks!

You can create a view where one of the columns is “Services: Metric History”.
This column allows you to show average, minimum or maximum values of a specific metric over a time period.

You can then query the view via Multisite API (hint: output_format=json).