IMO, you shouldn't be doing this at all.  For all devices, simply store the 
raw ifHCInOctets / if HCOutOctets (etc) in prometheus.  Then when you want 
to graph it or alert on it, use a PromQL query using rate() or irate().

Storing the raw data keeps you closer to the source of truth, and makes it 
easier to debug, be able to observe counter resets, etc.  You can also 
answer questions like "what was the average rate over 5 seconds? Over 30 
seconds? Over 5 minutes?" using the same source data.

If for some reason you end up with some specific queries that are too 
expensive to run, then you can use recording rules to generate the results 
or partial results.  But remember there are other ways to improve query 
performance for dashboards, e.g. https://github.com/Comcast/trickster

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/9b7ff64f-e883-438f-8601-c36f7623bb02o%40googlegroups.com.

Reply via email to