Watch
0
0
Fork
You've already forked hyperhive
0

container collectors scrape their own telemetry and push it up their hop

This commit is contained in:
atlas 2026-10-28 22:01:33 +01:00 • committed by mara
commit 73c966a7eb

View file

@ -96,8 +96,9 @@ in
type = lib.types.port;
description = ''
Loopback port for the collector's own metrics (refused and dropped
records, exporter failures). Required because the container may share
the host netns, where the binary's default 8888 is the hive tier's.
records, exporter failures), which it scrapes and pushes to the swarm
collector. Required because the container may share the host netns,
where the binary's default 8888 is the hive tier's.
'';
};
@ -242,17 +243,6 @@ in
exporters = [ "otlphttp" ];
};
# ⚠️ `readers`, not `metrics.address`: this collector version rejects
# `address` at startup.
service.telemetry.metrics.readers = [
{
pull.exporter.prometheus = {
host = "127.0.0.1";
port = cfg.telemetryPort;
};
}
];
# An extension not listed here is inert: the receiver's storage would
# name a component that never starts, and the exporter would push
# unauthenticated.
@ -261,6 +251,12 @@ in
authName
];
}
(import ../collector-self-scrape.nix {
inherit lib;
port = cfg.telemetryPort;
exporter = "otlphttp";
attributes.container = cfg.serviceName;
})
# A separate set the module system merges in: joining it to the first with
# `//` would replace the first set's whole `service` attrset.
(lib.mkIf (cfg.otlpMetricsPort != null) {