gateway: send nginx stub_status to VictoriaMetrics, add a gateway dashboard
The gateway nginx serves stub_status on a loopback server of its own, 127.0.0.1:8085 (services.hyperhive.gateway.statusPort). The hive-tier collector reads it with the contrib nginx receiver, which the pinned otelcol-contrib 0.151.0 ships, so no exporter daemon is added. The receiver dials http:// only (a unix: or http+unix: endpoint fails with "unsupported protocol scheme"), so the listener is loopback TCP with allow 127.0.0.1 / deny all rather than a unix socket. The new gateway dashboard plots nginx.requests, nginx.connections_current by state, and nginx.connections_accepted against handled, per hive. Part of #5342.
This commit is contained in:
parent
e59a2a34fb
commit
f70bbda7d7
8 changed files with 460 additions and 1 deletions
|
|
@ -141,6 +141,26 @@ let
|
|||
name = "the hive metrics pipeline names the prometheus receiver the self-scrape needs";
|
||||
ok = builtins.elem "prometheus" hiveOtelPipelines.metrics.receivers;
|
||||
}
|
||||
{
|
||||
# The receiver, the pipeline entry and the nginx server it reads have to
|
||||
# agree on one address, and none of them may exist without a gateway on
|
||||
# the host. `hiveOtelLeaf` is the control: it runs no gateway, and the
|
||||
# clause asserting that keeps the control from going vacuous.
|
||||
name = "the hive collector reads the gateway's stub_status, and only where a gateway runs";
|
||||
ok =
|
||||
let
|
||||
nginxConf = hiveOtel.services.nginx.appendHttpConfig;
|
||||
leafSettings = hiveOtelLeaf.services.opentelemetry-collector.settings;
|
||||
in
|
||||
hiveOtel.services.hyperhive.gateway.enable
|
||||
&& hiveOtelSettings.receivers.nginx.endpoint == "http://127.0.0.1:8085/stub_status"
|
||||
&& builtins.elem "nginx" hiveOtelPipelines.metrics.receivers
|
||||
&& lib.hasInfix "listen 127.0.0.1:8085;" nginxConf
|
||||
&& lib.hasInfix "location = /stub_status {" nginxConf
|
||||
&& !hiveOtelLeaf.services.hyperhive.gateway.enable
|
||||
&& !(leafSettings.receivers ? nginx)
|
||||
&& !(builtins.elem "nginx" leafSettings.service.pipelines.metrics.receivers);
|
||||
}
|
||||
{
|
||||
# `metrics.address` is the spelling that looks right and is rejected by
|
||||
# this collector version. The first clause is the control: without it a
|
||||
|
|
|
|||
Loading…
Reference in a new issue