ci runner: export its built-in metrics through the container's forwarder
This commit is contained in:
parent
528c4476cb
commit
0bc350a8a1
1 changed files with 78 additions and 0 deletions
|
|
@ -75,6 +75,10 @@ let
|
|||
# containers' forwarders all the same.
|
||||
forwarderTelemetryPort = 8895;
|
||||
|
||||
# The runner's Prometheus endpoint. Loopback in the container's own netns: the
|
||||
# forwarder scrapes it, and PR jobs in the same netns can read it.
|
||||
runnerMetricsAddr = "127.0.0.1:9101";
|
||||
|
||||
# The runner's store identity, handed into the container as system
|
||||
# credentials (credential id → host source) for the forwarder's fetch unit.
|
||||
storeFiles = lib.filterAttrs (_: source: source != null) {
|
||||
|
|
@ -414,6 +418,7 @@ in
|
|||
clientId = forwarderClientId;
|
||||
tokenUrl = forwarderTokenUrl;
|
||||
telemetryPort = forwarderTelemetryPort;
|
||||
extraScrapeTargets.gitea-runner = runnerMetricsAddr;
|
||||
store = {
|
||||
package = baoDeploy.package;
|
||||
addr = "https://${baoCfg.domain}:${toString baoCfg.port}";
|
||||
|
|
@ -482,6 +487,10 @@ in
|
|||
settings = {
|
||||
runner.capacity = cfg.concurrency;
|
||||
runner.timeout = cfg.jobTimeout;
|
||||
metrics = {
|
||||
enabled = true;
|
||||
addr = runnerMetricsAddr;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue