Websocket Samples

Org MxEdge Stats

Subscribe to Mist Edge Stats Stream

Websocket Endpoint

WS /api-ws/v1/stream

Subscribe Command

{
    "subscribe": "/orgs/{org_id}/stats/mxedges"
}

Streamed Data Sample

{
    "event": "data",
    "channel": "/orgs/8aa21779-xxxx-xxxx-xxxx-42c02b93b870/stats/mxedges",
    "data": {
        "device_id": "00000000-0000-0000-1000-020000xxxxxx",
        "event_type": "tunterm-stats",
        "detail": {
            "lag_stat": {},
            "last_seen": 1771878279,
            "mxcluster_id": "2100cc81-xxxx-xxxx-xxxx-19c541b8e7bf",
            "num_tunnels": 0,
            "tunterm_stat": {
                "monitoring_failed": false,
                "failing_resources": [],
                "l2tp_listener_critical_resource_failed": false
            },
            "uptime": 2974625,
            "version": "0.1.3504+deb11",
            "drop_stat": {},
            "inactive_vlans": {},
            "inactive_vlan_strs": {},
            "svi_stat": {
                "kni0.1": {
                    "isolated": true,
                    "ips": [
                        "10.10.172.202/24"
                    ]
                }
            },
            "ext_ip": "86.238.60.231",
            "port_stat": {
                "port0": {
                    "up": true,
                    "speed": 10000,
                    "full_duplex": true,
                    "tx_bytes": 12196068,
                    "tx_pkts": 99157,
                    "tx_errors": 0,
                    "rx_bytes": 6539709,
                    "rx_pkts": 71758,
                    "rx_errors": 0,
                    "mac": "005056xxxxxx",
                    "state": "forwarding",
                    "rx_crc_errors": 0,
                    "sfp": {
                        "codes": "",
                        "part_no": "",
                        "sfftype": 0,
                        "vendor": "",
                        "mbps": 0,
                        "serial_no": ""
                    },
                    "lacp": {
                        "rx_state": "",
                        "rx_lacpdu": 0,
                        "mux_state": "",
                        "tx_lacpdu": 0
                    }
                },
                "port1": {
                    "up": true,
                    "speed": 10000,
                    "full_duplex": true,
                    "tx_bytes": 12195942,
                    "tx_pkts": 99154,
                    "tx_errors": 0,
                    "rx_bytes": 6539349,
                    "rx_pkts": 71752,
                    "rx_errors": 0,
                    "mac": "00505687xxxx",
                    "state": "forwarding",
                    "rx_crc_errors": 0,
                    "sfp": {
                        "codes": "",
                        "part_no": "",
                        "sfftype": 0,
                        "vendor": "",
                        "mbps": 0,
                        "serial_no": ""
                    },
                    "lacp": {
                        "rx_state": "",
                        "rx_lacpdu": 0,
                        "mux_state": "",
                        "tx_lacpdu": 0
                    }
                }
            },
            "_time": 1771878279.9658437
        }
    }
}

On this page