Skip to content

Expose --storage.tsdb.retention.time in metric prometheus_tsdb_retention_limit_seconds#12986

Merged
beorn7 merged 2 commits intoprometheus:mainfrom
msscaroso:expose-metric-storage-tsdb-retention-time
Oct 24, 2023
Merged

Expose --storage.tsdb.retention.time in metric prometheus_tsdb_retention_limit_seconds#12986
beorn7 merged 2 commits intoprometheus:mainfrom
msscaroso:expose-metric-storage-tsdb-retention-time

Conversation

@msscaroso
Copy link
Copy Markdown
Contributor

This PR exposes the config option --storage.tsdb.retention.time as a metric.

It's assumed that tsdb.Option is an int64 representing time in milliseconds, based on its definition found here:

RetentionDuration: int64(time.Duration(opts.RetentionDuration) / time.Millisecond),

Related Issue: #12925

Signed-off-by: Marcio Caroso <msscaroso@gmail.com>
@msscaroso msscaroso force-pushed the expose-metric-storage-tsdb-retention-time branch from 39ab49d to a964e03 Compare October 15, 2023 18:13
@bboreham bboreham changed the title Expose --storage.tsdb.retention.time in a metric Expose --storage.tsdb.retention.time in metric prometheus_tsdb_retention_seconds Oct 17, 2023
@bboreham
Copy link
Copy Markdown
Member

Thanks for the PR!

Given there is already a metric prometheus_tsdb_retention_limit_bytes, would you consider naming this one prometheus_tsdb_retention_limit_seconds ?

…db_retention_limit_seconds

Signed-off-by: Marcio Caroso <msscaroso@gmail.com>
@msscaroso msscaroso changed the title Expose --storage.tsdb.retention.time in metric prometheus_tsdb_retention_seconds Expose --storage.tsdb.retention.time in metric prometheus_tsdb_retention_limit_seconds Oct 18, 2023
@msscaroso
Copy link
Copy Markdown
Contributor Author

Thank you for reviewing the PR @bboreham.
Makes sense. prometheus_tsdb_retention_limit_seconds looks better!

Copy link
Copy Markdown
Member

@bboreham bboreham left a comment

Choose a reason for hiding this comment

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

LGTM; I'll wait for a bit before merging to see if any other maintainers have opinions.

@beorn7
Copy link
Copy Markdown
Member

beorn7 commented Oct 24, 2023

Message from the bug scrub: Apparently, no other maintainers have opinions. Merging.

@beorn7 beorn7 merged commit dff1c39 into prometheus:main Oct 24, 2023
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