prometheus / prometheus/alertmanager

Split retention in 2 parts or multiple nflogs

Open
#2,961 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component/nflog
Dominant language
Go
Stars
8.6k
Forks
2.5k
Avg merge
2d 6h
Merged PRs (30d)
61

Description

We have a default of 120h retention.

While this default seems fine for the silences, it seems a lot too high for the nflog. Indeed, the nflog should ideally be kept only for ~110% of x=max( group_wait, group_interval, repeat_interval). When having a large number of alerts and a low x, alertmanager un-necessarily uses a lot of memory, because the state is broadcasted perpetually.

Here a heap of such a case: https://share.polarsignals.com/73d955e/

I see multiple ways forward:

  • Multiple nflogs, with exponential durations (e.g. 1m, 1h, 12h, 10h), based on the duration the notification should stay available in the log.
  • Allow setting a nflog-specific data retention policy.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Alertmanager nflog retention and state-broadcast behavior described in the issue, using the linked heap report as context. Compare the proposed multiple-nflog and nflog-specific retention approaches; done means one agreed retention design is implemented and its memory behavior is validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.