Skip to content
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

[Feat]: Retention in days with cap in size #17082

Open
ktsaou opened this issue Feb 29, 2024 · 1 comment
Open

[Feat]: Retention in days with cap in size #17082

ktsaou opened this issue Feb 29, 2024 · 1 comment
Assignees
Labels
feature request New features needs triage Issues which need to be manually labelled

Comments

@ktsaou
Copy link
Member

ktsaou commented Feb 29, 2024

Problem

We need a better way for people to configure retention.

Description

Retention configuration should work like this:

[db]
   dbengine tier 0 retention days = 7
   dbengine tier 1 retention days = 90
   dbengine tier 2 retention days = 365
   max disk space MB = 3072

The max disk space MB should be applied to the whole /var/cache/netdata directory, including all dbengine tiers and sqlite files.

Disk space size should be checked only when new files are created, on any tier. If the limit is hit, Netdata should rotate files to statisfy the disk size cap and raise an alert to let users know they are losing retention. When rotating files, tiers should be selected proportionally.

If max disk space MB is set to zero, this check should be disabled and Netdata should use any disk size to satisfy the retention defined.

The default settings, should be like above.

Importance

must have

Value proposition

  1. Users should be able to configure retention in days
  2. Users should be able to cap the disk space Netdata will ever use
  3. Users should be informed when the disk space cap is not sufficient for the retention they need

Proposed implementation

As mentioned above.

@Ferroin
Copy link
Member

Ferroin commented Feb 29, 2024

Might I suggest that we also check disk space usage on startup as well as whenever a new file needs to be created?

That would allow users to quickly reduce disk space usage of the agent if they need to, without having to wipe all of their historical data or wait for the agent to decide it needs to create a new file.

@stelfrag stelfrag self-assigned this Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New features needs triage Issues which need to be manually labelled
Projects
None yet
Development

No branches or pull requests

3 participants