Skip to content

Automatically adjust retention based on current disk usage percentage #513

@Gintoms

Description

@Gintoms

Is your feature request related to a problem? Please describe

VictoriaLogs already supports fixed retention via retentionPeriod and size-based retention via retention.maxDiskSpaceUsageBytes.
However, there is no built-in way to let the system react at runtime when the mounted disk usage percentage (e.g., ≥ 80 %) is reached. This can lead to unplanned disk-full situations or require manual intervention to lower retention.

Describe the solution you'd like

Introduce a new (optional) flag, e.g.
-retention.maxDiskUsagePercent=80
When the current disk-usage percentage of the volume that holds the data directory reaches the configured threshold:VictoriaLogs should automatically reduce the effective retention (similar to what it already does when maxDiskSpaceUsageBytes is exceeded).

Describe alternatives you've considered

No response

Additional information

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions