|
3 | 3 | This document contains playbooks, or at least a checklist of what to look for, for alerts in the cortex-mixin and logs from Cortex. This document assumes that you are running a Cortex cluster:
|
4 | 4 |
|
5 | 5 | 1. Using this mixin config
|
6 |
| -2. Using GCS as object store (but similar procedures apply to other backends) |
| 6 | +2. Using GCS (Google), S3 (AWS) or Blobs (Azure). Similar procedures apply to other backends. |
7 | 7 |
|
8 | 8 | ## Alerts
|
9 | 9 |
|
@@ -413,6 +413,32 @@ Where:
|
413 | 413 | - `TENANT` is the tenant id reported in the example error message above as `REDACTED-TENANT`
|
414 | 414 | - `BLOCK` is the last part of the file path reported as `REDACTED-BLOCK` in the example error message above
|
415 | 415 |
|
| 416 | +To rename a block stored on S3 you can use the `aws` CLI command: |
| 417 | +``` |
| 418 | +aws s3 mv gs://BUCKET/TENANT/BLOCK gs://BUCKET/TENANT/corrupted-BLOCK |
| 419 | +``` |
| 420 | +Where: |
| 421 | +- `BUCKET` is the s3 bucket name the compactor is using. |
| 422 | +- `TENANT` is the tenant id reported in the example error message above as `REDACTED-TENANT` |
| 423 | +- `BLOCK` is the last part of the file path reported as `REDACTED-BLOCK` in the example error message above |
| 424 | +
|
| 425 | +
|
| 426 | +To rename a block stored on Azure you can use the `azcopy` and `az` CLI command: |
| 427 | +``` |
| 428 | +azcopy copy "https://$STORAGE-ACCOUNT.blob.core.windows.net/$CONTAINER/$TENANT/$BLOCK?$SASTOKEN" "https://$STORAGE-ACCOUNT.blob.core.windows.net/$CONTAINER/$TENANT/corrupted-$BLOCK?$SASTOKEN" --recursive |
| 429 | +azcopy remove "https://$STORAGE-ACCOUNT.blob.core.windows.net/$CONTAINER/$TENANT/$BLOCK?$SASTOKEN" --recursive |
| 430 | +``` |
| 431 | +Where: |
| 432 | +- `STORAGE-ACCOUNT` is the storage account the compactor is using. |
| 433 | +- `CONTAINER` is what is specified as `-blocks-storage.azure.container-name` |
| 434 | +- `TENANT` is the tenant id reported in the example error message above as REDACTED-TENANT |
| 435 | +- `BLOCK` is the last part of the file path reported as REDACTED-BLOCK in the example error message above |
| 436 | +- `SAS-TOKEN` this is a token that can be created with the following command: |
| 437 | +
|
| 438 | +``` |
| 439 | +az storage container generate-sas --account-name $STORAGE-ACCOUNT --expiry $(date -v +1d +%Y-%m-%d) --name $CONTAINER --permissions dlrw |
| 440 | +``` |
| 441 | +
|
416 | 442 | ### CortexBucketIndexNotUpdated
|
417 | 443 |
|
418 | 444 | This alert fires when the bucket index, for a given tenant, is not updated since a long time. The bucket index is expected to be periodically updated by the compactor and is used by queriers and store-gateways to get an almost-updated view over the bucket store.
|
|
0 commit comments