Skip to content

Commit

Permalink
Document the common_config section.
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanGuedes committed Oct 25, 2021
1 parent 1493278 commit d80b0c4
Showing 1 changed file with 55 additions and 8 deletions.
63 changes: 55 additions & 8 deletions docs/sources/configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,26 @@ Pass the `-config.expand-env` flag at the command line to enable this way of set
# Configures the compactor component which compacts index shards for performance.
[compactor: <compactor_config>]

# Configures limits per-tenant or globally
# Configures limits per-tenant or globally.
[limits_config: <limits_config>]

# The frontend_worker_config configures the worker - running within the Loki
# querier - picking up and executing queries enqueued by the query-frontend.
[frontend_worker: <frontend_worker_config>]

# Configures the table manager for retention
# Configures the table manager for retention.
[table_manager: <table_manager_config>]

# Configuration for "runtime config" module, responsible for reloading runtime configuration file.
[runtime_config: <runtime_config>]

# Configuration for tracing
# Configuration for tracing.
[tracing: <tracing_config>]

# Common config to be shared between multiple modules.
# If a more specific config is given in other sections, the related config under this section
# will be ignored.
[common: <common_config>]
```
## server_config
Expand Down Expand Up @@ -529,11 +534,8 @@ storage:
# Configures backend rule storage for Swift.
[swift: <swift_storage_config>]
# Configures backend rule storage for the local filesystem.
local:
# Directory to scan for rules.
# CLI flag: -ruler.storage.local.directory
[directory: <filename> | default = ""]
# Configures backend rule storage for a local filesystem directory.
[local: <filesystem_storage_config>]
# Remote-write configuration to send rule samples to a Prometheus remote-write endpoint.
remote_write:
Expand Down Expand Up @@ -900,6 +902,16 @@ The `swift_storage_config` configures Swift as a general storage for different d
[container_name: <string> | default = "cortex"]
```

## local_storage_config

The `local_storage_config` configures a (local) filesystem as a general storage for different data generated by Loki.

```yaml
# Filesystem directory to be used as storage.
# CLI flag: -<prefix>.local.directory
[directory: <filename> | default = ""]
```

## frontend_worker_config

The `frontend_worker_config` configures the worker - running within the Loki querier - picking up and executing queries enqueued by the query-frontend.
Expand Down Expand Up @@ -2278,6 +2290,41 @@ The `tracing_config` block configures tracing for Jaeger. Currently limited to d
[enabled: <boolean>: default = true]
```

## common_config

The `common_config` block sets common definitions to be shared by different components.
This way, one doesn't have to replicate configs in multiple places.

```yaml
# A common storage config to be used by the different Loki components.
[storage: <common_storage_config>]
# When defined, the given prefix will be present in front of the endpoint paths.
[path_prefix: <string>]
```

### common_storage_config

The `common_storage_config` block defines a common storage to be reused by different components as a way to facilitate storage configuration.
If any specific configs for an object storage client have been provided elsewhere in the configuration file, the specific config will supersede the common storage config.

```yaml
# Configures Azure as the common storage.
[azure: <azure_storage_config>]
# Configures GCS as the common storage.
[gcs: <gcs_storage_config>]
# Configures S3 as the common storage.
[s3: <s3_storage_config>]
# Configures Swift as the common storage.
[swift: <swift_storage_config>]
# Configures a (local) filesystem as the common storage.
[filesystem: <filesystem_storage_config>]
```

## Runtime Configuration file

Loki has a concept of "runtime config" file, which is simply a file that is reloaded while Loki is running. It is used by some Loki components to allow operator to change some aspects of Loki configuration without restarting it. File is specified by using `-runtime-config.file=<filename>` flag and reload period (which defaults to 10 seconds) can be changed by `-runtime-config.reload-period=<duration>` flag. Previously this mechanism was only used by limits overrides, and flags were called `-limits.per-user-override-config=<filename>` and `-limits.per-user-override-period=10s` respectively. These are still used, if `-runtime-config.file=<filename>` is not specified.
Expand Down

0 comments on commit d80b0c4

Please sign in to comment.