Skip to content

different prometheus metrics retention by series name #13

@dasl-

Description

@dasl-

I don't need pi metrics like CPU, memory, network, disk, etc to be kept for very long. Maybe 2 months would be sufficient. But it would be nice to keep environmental monitoring metrics like temperature, humidity, electricity usage, etc for much longer -- ideally for years.

AFAICT prometheus doesn't yet support different retention periods per metric. See: prometheus/prometheus#1381

One workaround is to run 2 prometheus instances: one with short retention and one with long. I can exclude the environmental metrics on the short term instance (https://github.com/dasl-/pitools/issues/12), and I can allow list the environmental metrics on the one with long retention (see this post specifically "Scrape Only 3 Specific Metrics")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions