Watch
0
0
Fork
You've already forked hyperhive
0

ci runner: export its built-in metrics through the container's forwarder

This commit is contained in:
atlas 2026-11-04 22:26:54 +01:00
commit 0bc350a8a1

View file

@ -842,6 +842,36 @@ let
in
check withClassifier && check withClassifierOnHive;
}
{
# The runner serves its Prometheus endpoint on loopback in its own
# netns, and the container's forwarder scrapes exactly that address into
# a pipeline that leaves through the swarm exporter. The classifier's
# forwarder, which sets no extra targets, is the control: no extra
# receiver, no extra pipeline.
name = "the CI runner's built-in metrics are scraped on loopback by its forwarder";
ok =
let
cc = withCi.containers.swarm-ci-runner.config;
s = cc.services.opentelemetry-collector.settings;
c =
withClassifier.containers.swarm-review-classifier.config.services.opentelemetry-collector.settings;
runner = cc.services.gitea-actions-runner.instances.swarm.settings;
in
runner.metrics.enabled == true
&& runner.metrics.addr == "127.0.0.1:9101"
&&
s.receivers."prometheus/extra".config.scrape_configs == [
{
job_name = "gitea-runner";
static_configs = [ { targets = [ "127.0.0.1:9101" ]; } ];
}
]
&& s.service.pipelines."metrics/extra".receivers == [ "prometheus/extra" ]
&& s.service.pipelines."metrics/extra".exporters == [ "otlphttp" ]
&& s.exporters ? otlphttp
&& !(c.receivers ? "prometheus/extra")
&& !(c.service.pipelines ? "metrics/extra");
}
{
# Only the classifier asks the forwarder for a metrics receiver; the
# others carry a journal. The classifier is the control.