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 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<<nodeID,version]} (per active node) |
raw PHY/FMR payload | gocoax_phy_rate_*_mbps |
Local info (/ms/0/0x15) #
data is an array of 32-bit words. The fields the collector decodes:
| Word index | Meaning | Exposed as |
|---|---|---|
[0] |
my node ID | gocoax_device_info{node_id} |
[1] (low byte) |
network-coordinator node ID | gocoax_node_info{is_nc}, gocoax_device_info{is_nc} |
[5] |
link status | gocoax_link_up |
[11] |
network MoCA version code | gocoax_moca_network_info{version} |
[12] |
active-node bitmask | internal (drives per-node reads; active-node count is count(gocoax_node_info)) |
[18], [19], [28] |
primary/secondary LOF offsets, custom band profile | internal (derive gocoax_primary_channel_mhz / gocoax_secondary_channel_mhz) |
[21]… |
SOC/firmware version string | gocoax_device_info{soc_version} |
Node info (/ms/0/0x16) #
Returned per active node:
| Word index | Meaning | Exposed as |
|---|---|---|
request nodeID |
node ID | gocoax_node_info{node} |
[0], [1] |
node MAC address | gocoax_node_info{mac_address} |
[4] (low byte) |
node MoCA version code | gocoax_node_info{moca_version} |
local-info [1] |
whether this node is the NC | gocoax_node_info{is_nc} |
Frame info (/ms/0/0x14) #
The device reports six Ethernet counters as 64-bit values split across two 32-bit words each (high word at index N, low at N+1):
| Words | Exposed as |
|---|---|
[12] [13] |
gocoax_ethernet_tx_good_total |
[30] [31] |
gocoax_ethernet_tx_bad_total |
[48] [49] |
gocoax_ethernet_tx_dropped_total |
[66] [67] |
gocoax_ethernet_rx_good_total |
[84] [85] |
gocoax_ethernet_rx_bad_total |
[102] [103] |
gocoax_ethernet_rx_dropped_total |
PHY rates (/ms/0/0x1D) #
The FMR payload is not meaningful on its own; the exporter decodes it into directional NPER/VLPER rates and the broadcast/multicast (GCD) rate:
gocoax_phy_rate_nper_mbps{from_node,to_node}gocoax_phy_rate_vlper_mbps{from_node,to_node}gocoax_phy_rate_gcd_mbps{node}
Not exported #
These device values are read or available but deliberately not turned into a standalone metric:
- Raw management words beyond the decoded fields above (for example the
remaining
datawords in local info, node info, and frame info). Their meaning is not established, so exporting them would be guessing; the decoded subset above is what the device's own status pages label. - Primary/secondary LOF offsets and custom band profile. They are
intermediate values used to derive
gocoax_primary_channel_mhzandgocoax_secondary_channel_mhz; the derived frequencies are what users care about. - Active-node bitmask. It drives which nodes are read; the node count is
available as
count(gocoax_node_info). - LOF frequency (
/ms/0/0x1003/GET). This equals the beacon channel already exposed asgocoax_beacon_channel_mhz. The capture script records it intestdatafor completeness, but the collector does not issue a separate request because the value is already obtained from misc-phy. - MoCA preshared keys (
/security.html). Never fetched or captured: they are on-the-wire secrets and must not leave the device.
Testdata relationship #
The committed captures under testdata/<name>/ 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:
python3 scripts/capture.py --config .private/gocoax-exporter.cfg --out testdata