Skip to content

Commit

Permalink
mimirtool: document TLS environment variables and CLI flags, and fix …
Browse files Browse the repository at this point in the history
…stutter in environment variable name (#10207)

* Fix stutter in environment variable name

* Document TLS environment variables and CLI flags for `mimirtool`

* Add changelog entry
  • Loading branch information
charleskorn authored Dec 11, 2024
1 parent 9b57afb commit f5c97f6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

### Mimirtool

* [BUGFIX] Fix issue where `MIMIR_HTTP_PREFIX` environment variable was ignored and the value from `MIMIR_MIMIR_HTTP_PREFIX` was used instead. #10207

### Mimir Continuous Test

### Query-tee
Expand Down
9 changes: 9 additions & 0 deletions docs/sources/mimir/manage/tools/mimirtool.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ For Mimirtools to interact with Grafana Mimir, Grafana Enterprise Metrics, Prome
| `MIMIR_API_KEY` | `--key` | Sets the basic auth password. If you're using Grafana Cloud, this variable is your API key. |
| `MIMIR_TENANT_ID` | `--id` | Sets the tenant ID of the Grafana Mimir instance that Mimirtools interacts with. |

It is also possible to set TLS-related options with the following environment variables or CLI flags:

| Environment variable | Flag | Description |
| -------------------------------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `MIMIR_TLS_CA_PATH` | `--tls-ca-path` | Sets the path to the CA certificate to use to verify the connection to the Grafana Mimir cluster. |
| `MIMIR_TLS_CERT_PATH` | `--tls-cert-path` | Sets the path to the client certificate to use to authenticate to the Grafana Mimir cluster. |
| `MIMIR_TLS_KEY_PATH` | `--tls-key-path` | Sets the path to the private key to use to authenticate to the Grafana Mimir cluster. |
| `MIMIR_TLS_INSECURE_SKIP_VERIFY` | `--tls-insecure-skip-verify` | If `true`, disables verification of the Grafana Mimir cluster's TLS certificate. This is insecure and not recommended. |

## Commands

The following sections outline the commands that you can run against Grafana Mimir and Grafana Cloud Metrics.
Expand Down
2 changes: 1 addition & 1 deletion pkg/mimirtool/commands/env_var.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func NewEnvVarsWithPrefix(prefix string) EnvVarNames {
useLegacyRoutes = "USE_LEGACY_ROUTES"
authToken = "AUTH_TOKEN"
extraHeaders = "EXTRA_HEADERS"
mimirHTTPPrefix = "MIMIR_HTTP_PREFIX"
mimirHTTPPrefix = "HTTP_PREFIX"
)

if len(prefix) > 0 && prefix[len(prefix)-1] != '_' {
Expand Down

0 comments on commit f5c97f6

Please sign in to comment.