Skip to content

Conversation

@elohmeier
Copy link

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

This change introduces the ability for the thanos compact command to
push its metrics to a Prometheus Pushgateway when running in one-shot
mode (without the --wait flag).

This is particularly useful for monitoring the compactor when it is run
as a periodic batch job, such as a cron job.

The following changes have been made:

  • Refactored progress metric calculation to run in one-shot mode.
  • Added --push-gateway.url and --push-gateway.job flags to configure
    the Pushgateway endpoint and job name.
  • Implemented the logic to push all registered metrics upon successful
    completion of a one-shot compaction run.

Verification

I've tested the metrics availability in the --wait mode and with a Pushgateway.

This change introduces the ability for the `thanos compact` command to
push its metrics to a Prometheus Pushgateway when running in one-shot
mode (without the `--wait` flag).

This is particularly useful for monitoring the compactor when it is run
as a periodic batch job, such as a cron job.

The following changes have been made:
- Refactored progress metric calculation to run in one-shot mode.
- Added `--push-gateway.url` and `--push-gateway.job` flags to configure
the Pushgateway endpoint and job name.
- Implemented the logic to push all registered metrics upon successful
completion of a one-shot compaction run.

Signed-off-by: Enno Richter <[email protected]>
@elohmeier
Copy link
Author

Added CHANGELOG entry.

@elohmeier
Copy link
Author

Docs CI failure is unrelated, I've pushed a fix here: #8494

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant