docs/Cluster-VictoriaMetrics.md: update docs about env vars usage in command-line flags

This is a follow-up for 02096e06d0
This commit is contained in:
Aliaksandr Valialkin 2022-10-26 01:54:13 +03:00
parent 36b92f07f7
commit c92d1fdf8e
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1
2 changed files with 12 additions and 2 deletions

View File

@ -180,7 +180,12 @@ It is possible manualy setting up a toy cluster on a single host. In this case e
### Environment variables ### Environment variables
Each flag values can be set through environment variables by following these rules: All the VictoriaMetrics components allow referring environment variables in command-line flags via `${ENV_VAR}` syntax.
For example, `-metricsAuthKey=%{METRICS_AUTH_KEY}` is automatically expanded to `-metricsAuthKey=top-secret`
if `METRICS_AUTH_KEY=top-secret` environment variable exists at VictoriaMetrics startup.
This expansion doesn't need any special shell - it is performed by VictoriaMetrics itself.
Additionally, all the VictoriaMetrics components allow setting flag values via environment variables according to these rules:
- The `-envflag.enable` flag must be set - The `-envflag.enable` flag must be set
- Each `.` in flag names must be substituted by `_` (for example `-insert.maxQueueDuration <duration>` will translate to `insert_maxQueueDuration=<duration>`) - Each `.` in flag names must be substituted by `_` (for example `-insert.maxQueueDuration <duration>` will translate to `insert_maxQueueDuration=<duration>`)

View File

@ -184,7 +184,12 @@ It is possible manualy setting up a toy cluster on a single host. In this case e
### Environment variables ### Environment variables
Each flag values can be set through environment variables by following these rules: All the VictoriaMetrics components allow referring environment variables in command-line flags via `${ENV_VAR}` syntax.
For example, `-metricsAuthKey=%{METRICS_AUTH_KEY}` is automatically expanded to `-metricsAuthKey=top-secret`
if `METRICS_AUTH_KEY=top-secret` environment variable exists at VictoriaMetrics startup.
This expansion doesn't need any special shell - it is performed by VictoriaMetrics itself.
Additionally, all the VictoriaMetrics components allow setting flag values via environment variables according to these rules:
- The `-envflag.enable` flag must be set - The `-envflag.enable` flag must be set
- Each `.` in flag names must be substituted by `_` (for example `-insert.maxQueueDuration <duration>` will translate to `insert_maxQueueDuration=<duration>`) - Each `.` in flag names must be substituted by `_` (for example `-insert.maxQueueDuration <duration>` will translate to `insert_maxQueueDuration=<duration>`)