FreifunkBremen / yanic

Yet another node info collector - for respondd to be used with meshviewer to Grafana (with influxdb or graphite)
https://freifunkbremen.github.io/yanic/
GNU Affero General Public License v3.0
20 stars 40 forks source link

Option to set prune_after on a per output base #233

Open maurerle opened 2 months ago

maurerle commented 2 months ago

Proposal

We would not like to prune the whole state.json but only old nodes from the output (e.g. meshviewer.json) - currently, I can only set prune_after on the state.json settings, but not per output.

It would be handy to have it per output, so that one can still see, that a node was seen before 30 days, even if it was offline for more than 14 days in between.

Alternatives

An alternative approach would be to increase prune_after to 90d in the yanic.conf and add the option to only show younger nodes than 7d on the map in meshviewer.json. Currently, meshviewer shows all nodes and does only limit maxAge for the new Node and old Nodes view. This could be adjusted, so that meshviewer does not show nodes which are longer offline than maxAge

genofire commented 2 weeks ago

The Idea is good, I will take it on the roadmap.

But I did not like the name prune_after. Because it associate to easy with deletion (but the data are still there instate). So maybe maxAge, before-filter or so are better naming.