grafana: query the log store with the metrics bearer, by its swarm name
Grafana's VictoriaLogs datasource now targets https://logs.<swarm> and sends the same static bearer as the metrics datasource. The log store's vhost routes a 64-hex Authorization bearer to a second swarm-metrics-auth instance (swarm-logs-grafana-auth, cert role swarm-logs-auth, which gains a read on the bearer's store path). swarm-agent. tokens and everything else keep their routes. Part of #3742 (DoD 3, logs).
This commit is contained in:
parent
8ebfe34531
commit
eff5c43bdc
9 changed files with 200 additions and 52 deletions
|
|
@ -1,3 +1,5 @@
|
|||
| `deploy.grafana.logsDatasourceUrl` | Only if you front VictoriaLogs with something else. It defaults to the log store's swarm name (`https://<swarm.victorialogs.domain>`), so Grafana and the store can run on different hosts. |
|
||||
|
||||
# Swarm-wide services
|
||||
|
||||
Some things exist once per **swarm** rather than once per hive: the forge,
|
||||
|
|
@ -247,6 +249,17 @@ swarm.
|
|||
It binds loopback and takes no credential of its own: the gateway vhost is
|
||||
the only way in, and the collector is the only intended writer.
|
||||
|
||||
**Who may query.** `/select/logsql/` takes one of three credentials. An
|
||||
agent presents its `swarm-agent.<agent>.<secret>` bearer, checked by
|
||||
`swarm-logs-auth`. Grafana's datasource presents the same bearer as its
|
||||
metrics datasource, which `swarm-bao-grafana-metrics-bearer` creates, and a
|
||||
second `swarm-metrics-auth` instance (`swarm-logs-grafana-auth`) on the log
|
||||
store's host checks it against the same store path; the gateway tells it from
|
||||
the others by its shape, 64 hex digits. Anything else needs an operator's
|
||||
authelia session. Because one bearer opens both read APIs, a rotation
|
||||
(see [`secrets.md`](secrets.md)) restarts Grafana once, and the log store
|
||||
accepts the new value within a minute.
|
||||
|
||||
The collector also scrapes this store's own metrics, at
|
||||
`https://<swarm.victorialogs.domain>/metrics`, so a collector on a host
|
||||
without the store still gets them. The gateway admits only the collector's
|
||||
|
|
|
|||
Loading…
Reference in a new issue