-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customize amount of Netflow aggregator history kept #6085
base: master
Are you sure you want to change the base?
Customize amount of Netflow aggregator history kept #6085
Conversation
I'll try to take a look, but at a first glance I would rather try to focus on less toggles facing the user. |
Yeah, i was thinking about this as well, but am struggling to come up with a good idea. Any ideas and how to incorporate them in the UI? |
I'm not sure yet either to be honest, we could try to focus on the most problematic files in size first and uniform it a bit, the more aggregated ones are likely less problematic. How large are the files on your installation? |
Or would it be an option to move |
Maybe it's enough to just offer the maximum numbers of days to keep given the daily summary sizes are the problematic ones. If we choose to configure the |
Good point! Based on this, we could only add one field for each resolution available (i.e. 30, 300, ...), instead of adding one for each aggregator. This would reduce the number of fields added from eleven down to four.
If we'd join their history setting, we would either truncate a lot of history (by using 61 days for all) or make the problem even worst (by using 365 days for all) :/ |
I was more thinking in the direction of configuring the max and stick source details to a relative factor e.g 1/6 x configured would be roughly the same as it is now. |
78845fc
to
8ba454a
Compare
6586a65
to
607e32a
Compare
This PR introduces the ability for a user to customize the amount of history that is kept by the Netflow aggregator instead of using hardcoded values. For the source address details there's always 62 days of history kept, even though a user might want to keep more / less.
Why is this needed?
I regularly ran into the same issue as #4831, https://forum.opnsense.org/index.php?topic=30071.msg145214 or https://forum.opnsense.org/index.php?topic=20489.msg95251. In these cases the SQLite DBs of the aggregator take up a lot of space and cause the vacuum to fail.
I therefore moved the hardcoded values to a config file, which is written by configd. I kept the old history values as defaults. The newly added fields can be access via Reporting -> Netflow after enabling the advanced settings.