diff --git a/nixos/modules/services/monitoring/thanos.nix b/nixos/modules/services/monitoring/thanos.nix
index fabc3f867f9a..a805656214be 100644
--- a/nixos/modules/services/monitoring/thanos.nix
+++ b/nixos/modules/services/monitoring/thanos.nix
@@ -8,7 +8,7 @@ let
nullOpt = type: description: mkOption {
type = types.nullOr type;
default = null;
- inherit description;
+ description = lib.mdDoc description;
};
optionToArgs = opt: v : optional (v != null) ''--${opt}="${toString v}"'';
@@ -18,8 +18,8 @@ let
mkParamDef = type: default: description: mkParam type (description + ''
- Defaults to ${toString default} in Thanos
- when set to null.
+ Defaults to `${toString default}` in Thanos
+ when set to `null`.
'');
mkParam = type: description: {
@@ -32,7 +32,7 @@ let
option = mkOption {
type = types.bool;
default = false;
- inherit description;
+ description = lib.mdDoc description;
};
};
@@ -41,7 +41,7 @@ let
option = mkOption {
type = types.listOf types.str;
default = [];
- inherit description;
+ description = lib.mdDoc description;
};
};
@@ -50,7 +50,7 @@ let
option = mkOption {
type = types.attrsOf types.str;
default = {};
- inherit description;
+ description = lib.mdDoc description;
};
};
@@ -59,7 +59,7 @@ let
option = mkOption {
type = types.str;
inherit default;
- inherit description;
+ description = lib.mdDoc description;
};
};
@@ -141,13 +141,13 @@ let
option = nullOpt types.attrs ''
Tracing configuration.
- When not null the attribute set gets converted to
+ When not `null` the attribute set gets converted to
a YAML file and stored in the Nix store. The option
- will default to its path.
+ {option}`tracing.config-file` will default to its path.
- If is set this option has no effect.
+ If {option}`tracing.config-file` is set this option has no effect.
- See format details:
+ See format details:
'';
};
};
@@ -155,11 +155,11 @@ let
common = cfg: params.log // params.tracing cfg // {
http-address = mkParamDef types.str "0.0.0.0:10902" ''
- Listen host:port for HTTP endpoints.
+ Listen `host:port` for HTTP endpoints.
'';
grpc-address = mkParamDef types.str "0.0.0.0:10901" ''
- Listen ip:port address for gRPC endpoints (StoreAPI).
+ Listen `ip:port` address for gRPC endpoints (StoreAPI).
Make sure this address is routable from other components.
'';
@@ -206,13 +206,13 @@ let
option = nullOpt types.attrs ''
Object store configuration.
- When not null the attribute set gets converted to
+ When not `null` the attribute set gets converted to
a YAML file and stored in the Nix store. The option
- will default to its path.
+ {option}`objstore.config-file` will default to its path.
- If is set this option has no effect.
+ If {option}`objstore.config-file` is set this option has no effect.
- See format details:
+ See format details:
'';
};
};
@@ -254,7 +254,7 @@ let
store = params.common cfg.store // params.objstore cfg.store // {
stateDir = mkStateDirParam "data-dir" "thanos-store" ''
- Data directory relative to /var/lib
+ Data directory relative to `/var/lib`
in which to cache remote blocks.
'';
@@ -269,7 +269,7 @@ let
store.grpc.series-sample-limit = mkParamDef types.int 0 ''
Maximum amount of samples returned via a single Series call.
- 0 means no limit.
+ `0` means no limit.
NOTE: for efficiency we take 120 as the number of samples in chunk (it
cannot be bigger than that), so the actual number of samples might be
@@ -327,14 +327,14 @@ let
grpc-client-server-name = mkParam types.str ''
Server name to verify the hostname on the returned gRPC certificates.
- See
+ See
'';
web.route-prefix = mkParam types.str ''
Prefix for API and UI endpoints.
This allows thanos UI to be served on a sub-path. This option is
- analogous to of Promethus.
+ analogous to {option}`web.route-prefix` of Promethus.
'';
web.external-prefix = mkParam types.str ''
@@ -342,7 +342,7 @@ let
interface.
Actual endpoints are still served on / or the
- . This allows thanos UI to be served
+ {option}`web.route-prefix`. This allows thanos UI to be served
behind a reverse proxy that strips a URL sub-path.
'';
@@ -351,15 +351,15 @@ let
redirects.
This option is ignored if the option
- web.external-prefix is set.
+ `web.external-prefix` is set.
Security risk: enable this option only if a reverse proxy in front of
thanos is resetting the header.
- The setting web.prefix-header="X-Forwarded-Prefix"
+ The setting `web.prefix-header="X-Forwarded-Prefix"`
can be useful, for example, if Thanos UI is served via Traefik reverse
- proxy with PathPrefixStrip option enabled, which
- sends the stripped prefix value in X-Forwarded-Prefix
+ proxy with `PathPrefixStrip` option enabled, which
+ sends the stripped prefix value in `X-Forwarded-Prefix`
header. This allows thanos UI to be served on a sub-path.
'';
@@ -376,7 +376,7 @@ let
deduplicated.
Still you will be able to query without deduplication using
- dedup=false parameter.
+ `dedup=false` parameter.
'';
selector-labels = mkAttrsParam "selector-label" ''
@@ -386,8 +386,8 @@ let
store.addresses = mkListParam "store" ''
Addresses of statically configured store API servers.
- The scheme may be prefixed with dns+ or
- dnssrv+ to detect store API servers through
+ The scheme may be prefixed with `dns+` or
+ `dnssrv+` to detect store API servers through
respective DNS lookups.
'';
@@ -411,12 +411,12 @@ let
query.auto-downsampling = mkFlagParam ''
Enable automatic adjustment (step / 5) to what source of data should
be used in store gateways if no
- max_source_resolution param is specified.
+ `max_source_resolution` param is specified.
'';
query.partial-response = mkFlagParam ''
Enable partial response for queries if no
- partial_response param is specified.
+ `partial_response` param is specified.
'';
query.default-evaluation-interval = mkParamDef types.str "1m" ''
@@ -426,7 +426,7 @@ let
store.response-timeout = mkParamDef types.str "0ms" ''
If a Store doesn't send any data in this specified duration then a
Store will be ignored and partial data will be returned if it's
- enabled. 0 disables timeout.
+ enabled. `0` disables timeout.
'';
};
@@ -440,7 +440,7 @@ let
'';
stateDir = mkStateDirParam "data-dir" "thanos-rule" ''
- Data directory relative to /var/lib.
+ Data directory relative to `/var/lib`.
'';
rule-files = mkListParam "rule-file" ''
@@ -464,9 +464,9 @@ let
Ruler claims success if push to at least one alertmanager from
discovered succeeds. The scheme may be prefixed with
- dns+ or dnssrv+ to detect
+ `dns+` or `dnssrv+` to detect
Alertmanager IPs through respective DNS lookups. The port defaults to
- 9093 or the SRV record's value. The URL path is
+ `9093` or the SRV record's value. The URL path is
used as a prefix for the regular Alertmanager API path.
'';
@@ -491,7 +491,7 @@ let
This allows thanos UI to be served on a sub-path.
- This option is analogous to --web.route-prefix of Promethus.
+ This option is analogous to `--web.route-prefix` of Promethus.
'';
web.external-prefix = mkParam types.str ''
@@ -499,7 +499,7 @@ let
interface.
Actual endpoints are still served on / or the
- . This allows thanos UI to be served
+ {option}`web.route-prefix`. This allows thanos UI to be served
behind a reverse proxy that strips a URL sub-path.
'';
@@ -508,23 +508,23 @@ let
redirects.
This option is ignored if the option
- is set.
+ {option}`web.external-prefix` is set.
Security risk: enable this option only if a reverse proxy in front of
thanos is resetting the header.
- The header X-Forwarded-Prefix can be useful, for
+ The header `X-Forwarded-Prefix` can be useful, for
example, if Thanos UI is served via Traefik reverse proxy with
- PathPrefixStrip option enabled, which sends the
- stripped prefix value in X-Forwarded-Prefix
+ `PathPrefixStrip` option enabled, which sends the
+ stripped prefix value in `X-Forwarded-Prefix`
header. This allows thanos UI to be served on a sub-path.
'';
query.addresses = mkListParam "query" ''
Addresses of statically configured query API servers.
- The scheme may be prefixed with dns+ or
- dnssrv+ to detect query API servers through
+ The scheme may be prefixed with `dns+` or
+ `dnssrv+` to detect query API servers through
respective DNS lookups.
'';
@@ -545,11 +545,11 @@ let
compact = params.log // params.tracing cfg.compact // params.objstore cfg.compact // {
http-address = mkParamDef types.str "0.0.0.0:10902" ''
- Listen host:port for HTTP endpoints.
+ Listen `host:port` for HTTP endpoints.
'';
stateDir = mkStateDirParam "data-dir" "thanos-compact" ''
- Data directory relative to /var/lib
+ Data directory relative to `/var/lib`
in which to cache blocks and process compactions.
'';
@@ -562,28 +562,28 @@ let
retention.resolution-raw = mkParamDef types.str "0d" ''
How long to retain raw samples in bucket.
- 0d - disables this retention
+ `0d` - disables this retention
'';
retention.resolution-5m = mkParamDef types.str "0d" ''
How long to retain samples of resolution 1 (5 minutes) in bucket.
- 0d - disables this retention
+ `0d` - disables this retention
'';
retention.resolution-1h = mkParamDef types.str "0d" ''
How long to retain samples of resolution 2 (1 hour) in bucket.
- 0d - disables this retention
+ `0d` - disables this retention
'';
startAt = {
toArgs = _opt: startAt: flagToArgs "wait" (startAt == null);
option = nullOpt types.str ''
- When this option is set to a systemd.time
+ When this option is set to a `systemd.time`
specification the Thanos compactor will run at the specified period.
- When this option is null the Thanos compactor service
+ When this option is `null` the Thanos compactor service
will run continuously. So it will not exit after all compactions have
been processed but wait for new work.
'';
@@ -609,7 +609,7 @@ let
downsample = params.log // params.tracing cfg.downsample // params.objstore cfg.downsample // {
stateDir = mkStateDirParam "data-dir" "thanos-downsample" ''
- Data directory relative to /var/lib
+ Data directory relative to `/var/lib`
in which to cache blocks and process downsamplings.
'';
@@ -622,7 +622,7 @@ let
'';
stateDir = mkStateDirParam "tsdb.path" "thanos-receive" ''
- Data directory relative to /var/lib of TSDB.
+ Data directory relative to `/var/lib` of TSDB.
'';
labels = mkAttrsParam "labels" ''
@@ -635,7 +635,7 @@ let
tsdb.retention = mkParamDef types.str "15d" ''
How long to retain raw samples on local storage.
- 0d - disables this retention
+ `0d` - disables this retention
'';
};