Skip to content

Navigation Menu

Sign in
Sign up

deleting a tenant (compactor?) #6753

aep started this conversation in General
Discussion options

hi, i was wondering how to delete a tenant.

i think the way to do it is enabling the overrides-exporter and then in cortex-runtime-config, set

data:
 runtime_config.yaml: |
 overrides:
 tenant123:
 compactor_blocks_retention_period: 1s

which would cause compactor to auto reload that config and then delete the blocks of this tenant.

is this the correct way to approach this?
seems rather odd to have a deleted tenant be in the config which may pile up eventually.

You must be logged in to vote

Replies: 1 comment

Comment options

To delete a tenant first, you have to stop sending metrics to it, then 2 hours later, Ingesters will have shipped all tsdb blocks to the s3 bucket. Now you can delete the folder call tenant123 in the bucket.

The trick you mention with the compactor will indeed delete all blocks for the tenant as soon as the compactor finds them. This might be an alternative if tenants are still sending metrics. A better strategy is to block any requests on the proxy layer that has the org_id. Probably more effective in terms of storage.

If you want to this in the API, you need to enable purger component. The purger component will delete the tenant for you. Every time you call it
https://cortexmetrics.io/docs/proposals/tenant-deletion/

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /