Skip to content

Support percentage values in size-based retention #10287

Description

@JensErat

Proposal

I'd love to see percentage values supported in size-based retenation. Prometheus might determine disk size on startup, and configure the disk size to n percent of this. For example: --storage.tsdb.retention.size=90% would configure a limit of 9GiB for a 10GiB disk.

This seems rather easily possible by using the syscall directly, or import Minio libraries (didn't check what license that code is under, though): https://stackoverflow.com/q/20108520/695343

Use case. Why is this important?

We're operating hundreds of Prometheus instances for differently sized Kubernetes clusters using prometheus-operator. We're actively monitoring for Prometheus instances not having a sufficiently large disk and increase their sizes. Currently, we need to not only resize the volume, but also reconfigure our prometheus operator CR, allowing diverging configuration. A percentage-based size definition would allow us to simply configure retention to use up "most of the disk".

Jens Erat [email protected], Daimler TSS GmbH, imprint

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions