Retention of averaged history data

Started by robyhr, April 19, 2020, 07:05:07 PM

Previous topic - Next topic

robyhr

Hello, is there a way to set NetXMS up to do summarization/averageing of historic data? For example, if I collect some data every 60 seconds (polling interval) and save that data for 10 days (retention period), is it possible to also keep hourly averages for 30 days and daily averages for 1 year? The system I am currently using offers option as shown in attached picture.

Filipp Sudanov

No such functionality is currently implemented. It could be a valid approach, but such averages tend to look differently then original data - e.g. spikes are smoothed. It could be possible to keep 3 values - min, max and average, but then it complicated the system and requires more development effort.
Since storage is quire cheap these days, a simpler approach is just to store more data - with Postgres time scale DB it's possible to delete old data with minimal load onto the database.

Tursiops

You can build something similar inside NetXMS, but it requires more effort.

You could create three DCIs: 60s DCI, 1h DCI, 1d DCI.
The first one is a standard DCI, the other two are script DCIs.
On their poll interval, the scripts DCIs pull the data from the standard DCI and calculate the average (there's a function GetAvgDCIValue that will do that for you).
Set retention as required on each DCI.

The result could look something like the attached screenshot (note that I do not have different retention enabled here - if you do, you'd see different part of the graph stop at some point).
It is not quite the same as what you are looking at and it is certainly more complicated to setup than ticking a couple of checkboxes - but it is an option, should you require it.