Understanding the database statistics

Morning y’all!

Silly question about the ports_statistics table in the SQL database.

The way I’m looking at these columns is that delta is the absolute change while rate is the delta per time period. What is the time period of the rate columns? Would that be equal to the poller time?

Thanks!!

Yup, I think you’ve got it. Generally, the time period should about the polling interval but it’s done in a way that helps account for polling drift or missed polls. When the poll starts, the poller records the poll_time from the ports table, which would have been the time of the previous poll. It gets the difference between that and the current time to get poll_period and writes the new time to poll_time.

The metric field in the DB gets copied to metric_prev.
The the new poll data is written to metric.
metric - metric_prev = metric_delta
metric_delta / poll_period = metric_rate

Awesome!! I’ve been tasked with matching our LogicMonitor setup on LibreNMS and trying to correlate between the two for alerting.

Thank you very much!!!