container collectors scrape their own telemetry and push it up their hop
This commit is contained in:
parent
2095bb2d0f
commit
73c966a7eb
1 changed files with 163 additions and 49 deletions
|
|
@ -4575,25 +4575,6 @@ in
|
|||
exporters = [ "otlphttp" ];
|
||||
};
|
||||
|
||||
# Moves this collector's self-metrics off the built-in
|
||||
# default of `localhost:8888`, which the hive tier holds —
|
||||
# this container shares the host's netns, so leaving the
|
||||
# default in place is the hive collector failing to bind.
|
||||
#
|
||||
# ⚠️ `metrics.address` is the spelling that looks right and
|
||||
# is REJECTED by this collector version:
|
||||
# `'migration.MetricsConfigV030' has invalid keys:
|
||||
# address`. `readers` is the schema it accepts, and the
|
||||
# difference is a startup failure rather than a warning.
|
||||
service.telemetry.metrics.readers = [
|
||||
{
|
||||
pull.exporter.prometheus = {
|
||||
host = "127.0.0.1";
|
||||
port = cfg.otel.telemetryPort;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
# An extension configured but not listed here is INERT — the
|
||||
# receiver's `storage: file_storage` above would name a
|
||||
# component the collector never starts, and the exporter's
|
||||
|
|
@ -4606,6 +4587,15 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# Off the built-in default of `localhost:8888`, which the hive tier
|
||||
# holds: this container shares the host's netns.
|
||||
services.opentelemetry-collector.settings = import ../collector-self-scrape.nix {
|
||||
inherit lib;
|
||||
port = cfg.otel.telemetryPort;
|
||||
exporter = "otlphttp";
|
||||
attributes.container = collectorServiceName;
|
||||
};
|
||||
|
||||
# How the secret crosses the sandbox. The host unit
|
||||
# `swarm-bao-forwarder-oidc` leaves a root-owned 0400 file at this
|
||||
# path on the host's /run, which the container bind-mounts
|
||||
|
|
|
|||
Loading…
Reference in a new issue