···
{ config, lib, pkgs, ... }:
15
+
mapAttrsRecursiveCond
cfg = config.services.thanos;
nullOpt = type: description: mkOption {
type = types.nullOr type;
11
-
description = lib.mdDoc description;
34
+
description = mdDoc description;
optionToArgs = opt: v : optional (v != null) ''--${opt}="${toString v}"'';
···
35
-
description = lib.mdDoc description;
58
+
description = mdDoc description;
···
type = types.listOf types.str;
44
-
description = lib.mdDoc description;
67
+
description = mdDoc description;
···
type = types.attrsOf types.str;
53
-
description = lib.mdDoc description;
76
+
description = mdDoc description;
···
62
-
description = lib.mdDoc description;
85
+
description = mdDoc description;
···
defaultText = literalMD ''
calculated from `config.services.thanos.${cmd}`
89
-
description = lib.mdDoc ''
112
+
description = mdDoc ''
Arguments to the `thanos ${cmd}` command.
Defaults to a list of arguments formed by converting the structured
···
if config.services.thanos.<cmd>.tracing.config == null then null
else toString (toYAML "tracing.yaml" config.services.thanos.<cmd>.tracing.config);
130
-
description = lib.mdDoc ''
153
+
description = mdDoc ''
Path to YAML file that contains tracing configuration.
See format details: <https://thanos.io/tip/thanos/tracing.md/#configuration>
···
if config.services.thanos.<cmd>.objstore.config == null then null
else toString (toYAML "objstore.yaml" config.services.thanos.<cmd>.objstore.config);
195
-
description = lib.mdDoc ''
218
+
description = mdDoc ''
Path to YAML file that contains object store configuration.
See format details: <https://thanos.io/tip/thanos/storage.md/#configuring-access-to-object-storage>
···
default = "/var/lib/${config.services.prometheus.stateDir}/data";
defaultText = literalExpression ''"/var/lib/''${config.services.prometheus.stateDir}/data"'';
234
-
description = lib.mdDoc ''
257
+
description = mdDoc ''
···
options.services.thanos = {
662
-
package = lib.mkPackageOptionMD pkgs "thanos" {};
685
+
package = mkPackageOptionMD pkgs "thanos" {};
sidecar = paramsToOptions params.sidecar // {
666
-
(lib.mdDoc "the Thanos sidecar for Prometheus server");
689
+
(mdDoc "the Thanos sidecar for Prometheus server");
arguments = mkArgumentsOption "sidecar";
store = paramsToOptions params.store // {
672
-
(lib.mdDoc "the Thanos store node giving access to blocks in a bucket provider.");
695
+
(mdDoc "the Thanos store node giving access to blocks in a bucket provider.");
arguments = mkArgumentsOption "store";
query = paramsToOptions params.query // {
678
-
(lib.mdDoc ("the Thanos query node exposing PromQL enabled Query API " +
701
+
(mdDoc ("the Thanos query node exposing PromQL enabled Query API " +
"with data retrieved from multiple store nodes"));
arguments = mkArgumentsOption "query";
query-frontend = paramsToOptions params.query-frontend // {
685
-
(lib.mdDoc ("the Thanos query frontend implements a service deployed in front of queriers to
708
+
(mdDoc ("the Thanos query frontend implements a service deployed in front of queriers to
improve query parallelization and caching."));
arguments = mkArgumentsOption "query-frontend";
rule = paramsToOptions params.rule // {
692
-
(lib.mdDoc ("the Thanos ruler service which evaluates Prometheus rules against" +
715
+
(mdDoc ("the Thanos ruler service which evaluates Prometheus rules against" +
" given Query nodes, exposing Store API and storing old blocks in bucket"));
arguments = mkArgumentsOption "rule";
compact = paramsToOptions params.compact // {
699
-
(lib.mdDoc "the Thanos compactor which continuously compacts blocks in an object store bucket");
722
+
(mdDoc "the Thanos compactor which continuously compacts blocks in an object store bucket");
arguments = mkArgumentsOption "compact";
downsample = paramsToOptions params.downsample // {
705
-
(lib.mdDoc "the Thanos downsampler which continuously downsamples blocks in an object store bucket");
728
+
(mdDoc "the Thanos downsampler which continuously downsamples blocks in an object store bucket");
arguments = mkArgumentsOption "downsample";
receive = paramsToOptions params.receive // {
711
-
(lib.mdDoc ("the Thanos receiver which accept Prometheus remote write API requests and write to local tsdb"));
734
+
(mdDoc ("the Thanos receiver which accept Prometheus remote write API requests and write to local tsdb"));
arguments = mkArgumentsOption "receive";