swarm-otel: scrape VictoriaLogs through its published name
VictoriaLogs' own metrics were scraped over loopback, declared only on the host running the store, so a collector on any other host had no job for it. Its target is now declared on every host as `https://<swarm.victorialogs.domain>/metrics`, next to forgejo's and authelia's, and the store's vhost serves `= /metrics` behind a bare `auth_request` to authelia. The rules derived from `publishedScrapeTargets` admit the collector's client there and deny every other subject. The loopback entry is gone, so a single host still scrapes the store once, now by name. On that vhost `/metrics` was reachable through the `/` location by any authelia session. The exact-match location now takes it, so a session gets a `deny` on `/metrics` and nothing else on the name changes. Part of #5205
This commit is contained in:
parent
f19a9f546e
commit
5fe04da559
3 changed files with 104 additions and 16 deletions
|
|
@ -360,5 +360,7 @@ in
|
|||
authelia = "https://${hyperhiveCfg.swarm.authelia.domain}/metrics";
|
||||
# The vhost location is in ./swarm-victoriametrics.nix.
|
||||
victoriametrics = "https://${vmCfg.domain}/metrics";
|
||||
# The vhost location is in ./swarm-victorialogs.nix.
|
||||
victorialogs = "https://${hyperhiveCfg.swarm.victorialogs.domain}/metrics";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue