Skip to content

Add prometheus retention config#1

Open
aaronbee wants to merge 1 commit intoarista-netdevops-community:mainfrom
aaronbee:patch-1
Open

Add prometheus retention config#1
aaronbee wants to merge 1 commit intoarista-netdevops-community:mainfrom
aaronbee:patch-1

Conversation

@aaronbee
Copy link
Copy Markdown
Contributor

Without a retention time or size flag prometheus defaults to deleting any data older than 15d. The data we are using to debug can be older than 15d, so prometheus will delete it when it starts up.

Without a retention time or size flag prometheus defaults to deleting any data older than 15d. The data we are using to debug can be older than 15d, so prometheus will delete it when it starts up.
Comment thread docker-compose.yaml
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- '--storage.tsdb.retention.size=1TB'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want the size, should be the time. --storage.tsdb.retention.time=1y

Copy link
Copy Markdown
Contributor Author

@aaronbee aaronbee May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I preferred limiting retention on size, so we can still look at data from a year ago. It seems more likely the retention would kick in on time vs. size. We could set time to be 100 years and then not worry about it, but that's also what a size of 1TB achieves I think.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, does this work correctly? I expected the default 15d retention to still kick in.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, if either retention.size or retention.time is set then the default 15d retention is ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants