# Device data inventory This document maps every management endpoint the exporter scrapes to the Prometheus metric that exposes the data it returns. Its purpose is to make the coverage claim explicit and auditable: for each device read below, the decoded value is either surfaced as a metric or listed in [Not exported](#not-exported) with the reason. The device speaks HTTP on port 80 with HTTP Basic Auth plus a rotating `csrf_token` cookie echoed back as `X-CSRF-TOKEN` on every POST. The exporter only issues read requests; see the top-level `README.md` for the request shape. ## Scrape sequence The collector drives this sequence once per scrape, per device. All reads inherit the scrape's context, so cancelling the scrape aborts in-flight device calls. | # | Endpoint | Request body | Decodes | Exposed as | |---|---|---|---|---| | 1 | `GET /phyRates.html` | — | — (establishes the CSRF cookie) | — | | 2 | `POST /ms/0/0x15` | `{"data":[]}` | local info | see below | | 3 | `POST /ms/0/0x16` | `{"data":[nodeID]}` (per active node) | node info | see below | | 4 | `POST /ms/1/0x103/GET` | `{"data":[myNodeID]}` | device MAC | `gocoax_device_info{mac_address}` | | 5 | `POST /ms/1/0x20b/GET` | — | device IPv4 | `gocoax_device_info{ip_address}` | | 6 | `POST /ms/1/0x303/GET` | `{"data":[0]}` | chip ID | `gocoax_device_info{chip}` | | 7 | `POST /ms/0/0x14` | `{"data":[0]}` | Ethernet counters | `gocoax_ethernet_*_total` | | 8 | `POST /ms/0/0x24` | `{"data":[]}` | beacon channel | `gocoax_beacon_channel_mhz` | | 9 | `POST /ms/0/0x7f` | `{"data":[]}` | bonded channel info | `gocoax_first_channel_mhz`, `gocoax_channel_count` | | 10 | `POST /ms/0/0x1D` | `{"data":[1</` replay the endpoints above (plus the LOF read noted above). Tests seed their mocks directly from those captures, so the metric-output assertions are exercising real device responses rather than hand-written fixtures. Re-capture with: ```sh python3 scripts/capture.py --config .private/gocoax-exporter.cfg --out testdata ```