leave squid's and hive-c0re's journals to the swarm tier when both run on one host
This commit is contained in:
parent
4fa7cde273
commit
790e242e8c
1 changed files with 44 additions and 9 deletions
|
|
@ -59,6 +59,13 @@ let
|
|||
# credential for.
|
||||
hiveOtelBare = hiveWithController { };
|
||||
|
||||
# The swarm collector on the same host: its whole-host journal receiver
|
||||
# already ships what the hive tier would name.
|
||||
hiveOtelWithSwarm = hiveWithController {
|
||||
otel.clientSecretFile = "/var/lib/hive-otel-oidc/hive-h1.secret";
|
||||
deploy.swarm-otel.enable = true;
|
||||
};
|
||||
|
||||
hiveOtelFetch = machine: machine.systemd.services.swarm-bao-hive-otel-oidc;
|
||||
|
||||
hiveOtelPipelines = hiveOtel.services.opentelemetry-collector.settings.service.pipelines;
|
||||
|
|
@ -469,6 +476,22 @@ let
|
|||
"squid.service"
|
||||
];
|
||||
}
|
||||
{
|
||||
# Control: `hiveOtel` above names the units, so the absences here are not
|
||||
# a misspelled lookup. With no unit named the receiver is dropped, since
|
||||
# a journald receiver with an empty `units` list reads every unit.
|
||||
name = "a host that also runs the swarm collector leaves the journal of squid, hive-c0re and the containers to it";
|
||||
ok =
|
||||
let
|
||||
s = hiveOtelWithSwarm.services.opentelemetry-collector.settings;
|
||||
in
|
||||
hiveOtelWithSwarm.services.hyperhive.otel.journalUnits == [ ]
|
||||
&& hiveOtelWithSwarm.services.squid.enable
|
||||
&& !(s.receivers ? journald)
|
||||
&& !(lib.elem "journald" s.service.pipelines.logs.receivers)
|
||||
&& lib.elem "otlp" s.service.pipelines.logs.receivers
|
||||
&& hiveOtelSettings.receivers ? journald;
|
||||
}
|
||||
{
|
||||
name = "the hive collector scrapes the squid exporter on loopback";
|
||||
ok =
|
||||
|
|
|
|||
Loading…
Reference in a new issue