merge the self-scrape into each collector's settings instead of defining them twice
This commit is contained in:
parent
73c966a7eb
commit
a00bcb8c05
2 changed files with 243 additions and 241 deletions
|
|
@ -215,7 +215,8 @@ in
|
||||||
# and the collector then dies at startup. Same caveat as both other
|
# and the collector then dies at startup. Same caveat as both other
|
||||||
# tiers; see nix/host-modules/otel.nix for the measurement.
|
# tiers; see nix/host-modules/otel.nix for the measurement.
|
||||||
validateConfigFile = true;
|
validateConfigFile = true;
|
||||||
settings = {
|
settings = lib.mkMerge [
|
||||||
|
{
|
||||||
# `journalctl --follow --lines=0` (what this receiver runs under
|
# `journalctl --follow --lines=0` (what this receiver runs under
|
||||||
# the hood) ships only what's written *after* it starts — every
|
# the hood) ships only what's written *after* it starts — every
|
||||||
# collector start has a silent gap at the front. `storage:` below
|
# collector start has a silent gap at the front. `storage:` below
|
||||||
|
|
@ -299,16 +300,16 @@ in
|
||||||
# journald receiver's `storage: file_storage` above would name a
|
# journald receiver's `storage: file_storage` above would name a
|
||||||
# component the collector never starts.
|
# component the collector never starts.
|
||||||
service.extensions = [ "file_storage" ];
|
service.extensions = [ "file_storage" ];
|
||||||
};
|
}
|
||||||
};
|
|
||||||
|
|
||||||
# Every agent container has a network namespace of its own, so they can all
|
# Every agent container has a network namespace of its own, so they can all
|
||||||
# use the same port.
|
# use the same port.
|
||||||
services.opentelemetry-collector.settings = import ../collector-self-scrape.nix {
|
(import ../collector-self-scrape.nix {
|
||||||
inherit lib;
|
inherit lib;
|
||||||
port = selfTelemetryPort;
|
port = selfTelemetryPort;
|
||||||
exporter = logExporter;
|
exporter = logExporter;
|
||||||
attributes.agent = userName;
|
attributes.agent = userName;
|
||||||
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4438,7 +4438,8 @@ in
|
||||||
# caveat as every other tier; see nix/host-modules/otel.nix for
|
# caveat as every other tier; see nix/host-modules/otel.nix for
|
||||||
# the measurement.
|
# the measurement.
|
||||||
validateConfigFile = true;
|
validateConfigFile = true;
|
||||||
settings = {
|
settings = lib.mkMerge [
|
||||||
|
{
|
||||||
# `journalctl --follow --lines=0` (what the receiver runs under
|
# `journalctl --follow --lines=0` (what the receiver runs under
|
||||||
# the hood) ships only what is written *after* it starts, so
|
# the hood) ships only what is written *after* it starts, so
|
||||||
# every collector start has a silent gap at the front. This
|
# every collector start has a silent gap at the front. This
|
||||||
|
|
@ -4584,16 +4585,16 @@ in
|
||||||
"file_storage"
|
"file_storage"
|
||||||
forwarderAuthName
|
forwarderAuthName
|
||||||
];
|
];
|
||||||
};
|
}
|
||||||
};
|
|
||||||
|
|
||||||
# Off the built-in default of `localhost:8888`, which the hive tier
|
# Off the built-in default of `localhost:8888`, which the hive tier
|
||||||
# holds: this container shares the host's netns.
|
# holds: this container shares the host's netns.
|
||||||
services.opentelemetry-collector.settings = import ../collector-self-scrape.nix {
|
(import ../collector-self-scrape.nix {
|
||||||
inherit lib;
|
inherit lib;
|
||||||
port = cfg.otel.telemetryPort;
|
port = cfg.otel.telemetryPort;
|
||||||
exporter = "otlphttp";
|
exporter = "otlphttp";
|
||||||
attributes.container = collectorServiceName;
|
attributes.container = collectorServiceName;
|
||||||
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# How the secret crosses the sandbox. The host unit
|
# How the secret crosses the sandbox. The host unit
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue