-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b16e4d
commit f34fad1
Showing
2 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
title: "Configuration examples for using Thanos-based storage clients" | ||
description: "Minimal examples for using Thanos-based S3, GCS, Azure, and filesystem clients in Grafana Loki." | ||
weight: 100 | ||
--- | ||
|
||
# Configuration examples for using Thanos-based storage clients | ||
|
||
Use these examples as a starting point for configuring [Thanos based object storage clients](https://grafana.com/docs/loki/<LOKI_VERSION>/configure/#thanos_object_store_config) in Grafana Loki. | ||
|
||
## GCS example | ||
```yaml | ||
storage_config: | ||
use_thanos_objstore: true | ||
object_store: | ||
gcs: | ||
bucket_name: my-gcs-bucket | ||
|
||
# JSON either from a Google Developers Console client_credentials.json file, | ||
# or a Google Developers service account key. Needs to be valid JSON, not a | ||
# filesystem path. If empty, fallback to Google default logic: | ||
# 1. A JSON file whose path is specified by the GOOGLE_APPLICATION_CREDENTIALS | ||
# environment variable. For workload identity federation, refer to | ||
# https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation | ||
# on how to generate the JSON configuration file for on-prem/non-Google cloud | ||
# platforms. | ||
# 2. A JSON file in a location known to the gcloud command-line tool: | ||
# $HOME/.config/gcloud/application_default_credentials.json. | ||
# 3. On Google Compute Engine it fetches credentials from the metadata server. | ||
service_account: service-account-json | ||
``` | ||
## S3 example | ||
```yaml | ||
storage_config: | ||
use_thanos_objstore: true | ||
object_store: | ||
s3: | ||
bucket_name: my-s3-bucket | ||
endpoint: s3.us-west-2.amazonaws.com | ||
region: us-west-2 | ||
# You can either declare the access key and secret in the config or | ||
# use environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY which will be picked up by AWS SDK. | ||
access_key_id: access-key-id | ||
secret_access_key: secret-access-key | ||
``` | ||
## Azure example | ||
```yaml | ||
storage_config: | ||
use_thanos_objstore: true | ||
object_store: | ||
azure: | ||
account_name: myaccount | ||
account_key: ${SECRET_ACCESS_KEY} # loki expands environment variables | ||
container_name: example-container | ||
``` | ||
## Filesystem example | ||
```yaml | ||
storage_config: | ||
use_thanos_objstore: true | ||
object_store: | ||
filesystem: | ||
dir: /var/loki/chunks | ||
``` |