Monitoring a WSL2 development fleet¶
Prerequisites¶
monitoris the SSH alias of the Prometheus and Grafana monitoring host.ssh monitor truesucceeds from both WSL2 and Windows.- A four-engine WSL2 fleet, such as the RTX 5090 reference, started with
narwhal dev uppassesnarwhal dev verify. - The monitoring host has a Narwhal checkout at
~/projects/Narwhal.
Connecting metrics and dashboard ports¶
Every installed template places the router on port 18000 and the engine HTTP ports on 18101 upward, one per engine. With narwhal dev init --port-base P, the router uses port P and the engine HTTP ports start at P+1.
-
Open the reverse tunnel from WSL2 for the router port and the four engine HTTP ports:
-
Open the browser tunnel from Windows PowerShell:
Starting or updating the monitoring stack¶
Start a new stack from the monitoring host's checkout:
Prometheus reads the engine targets from the router through the tunnel and scrapes the tunnelled engine ports.
Checking scrapes and routed activity¶
Query Prometheus from the monitoring host:
curl -fsSG http://127.0.0.1:9090/api/v1/query \
--data-urlencode 'query=up{job=~"narwhal-router|engines"}'
curl -fsSG http://127.0.0.1:9090/api/v1/query \
--data-urlencode 'query=narwhal_router_ready{job="narwhal-router"}'
The up query returns five healthy series, one for the router and one for each of the four engines. The narwhal_router_ready query returns 1.
Check routed traffic:
- Open
http://127.0.0.1:33000/d/narwhal-router/narwhal-orchestratorin a Windows browser. - Select the current router.
- Send requests through Narwhal.
- Check these panels:
- Request outcomes and Token throughput
- The four rows of the engine table
- Pool assignments
- Engine role history
Stopping the fleet¶
- Run
narwhal dev downin WSL2. - Close both SSH tunnels.