Facts, ports, management address, LLDP (per-port and top-level shapes), MAC table and PoE from a UniFi device record, which a controller's stat/device and the device's own mca-dump share. Fixtures from aiounifi (MIT) and abates/napalm-unifi (Apache-2.0), anonymised with tools/sanitize.py. Refs NetOrk/netork#2787
360 lines
7.8 KiB
JSON
360 lines
7.8 KiB
JSON
{
|
|
"_id": "5f47a419c753120123456789",
|
|
"_uptime": 9273422,
|
|
"adopt_ip": "198.168.0.9",
|
|
"adopt_url": "http://192.168.0.1:8080/inform",
|
|
"adoptable_when_upgraded": false,
|
|
"adopted": true,
|
|
"anomalies": -1,
|
|
"anon_id": "REDACTED",
|
|
"board_rev": 12,
|
|
"bytes": 0,
|
|
"cfgversion": "96376fe9d11ae1ac",
|
|
"config_network": {
|
|
"ip": "198.168.0.9",
|
|
"type": "dhcp"
|
|
},
|
|
"connect_request_ip": "198.168.0.9",
|
|
"connect_request_port": "60216",
|
|
"connected_at": 1634732311,
|
|
"connection_network_name": "LAN",
|
|
"default": false,
|
|
"device_id": "5f47a419c753120123456789",
|
|
"dhcp_server_table": [],
|
|
"discovered_via": "l2",
|
|
"displayable_version": "1.8.4",
|
|
"dot1x_portctrl_enabled": false,
|
|
"downlink_table": [],
|
|
"ethernet_table": [
|
|
{
|
|
"mac": "74:ac:b9:a1:01:01",
|
|
"name": "eth0",
|
|
"num_port": 5
|
|
}
|
|
],
|
|
"flowctrl_enabled": false,
|
|
"fw_caps": 0,
|
|
"guest-num_sta": 0,
|
|
"has_fan": false,
|
|
"has_temperature": false,
|
|
"hw_caps": 0,
|
|
"inform_ip": "192.168.0.1",
|
|
"inform_url": "http://192.168.0.1:8080/inform",
|
|
"ip": "198.168.0.9",
|
|
"jumboframe_enabled": false,
|
|
"known_cfgversion": "96376fe9d11ae1ac",
|
|
"last_seen": 1635577067,
|
|
"last_uplink": {
|
|
"port_idx": 1,
|
|
"type": "wire",
|
|
"uplink_mac": "fc:ec:00:11:22:33",
|
|
"uplink_remote_port": 13
|
|
},
|
|
"lcm_brightness_override": false,
|
|
"lcm_idle_timeout_override": false,
|
|
"lcm_tracker_enabled": false,
|
|
"led_override": "on",
|
|
"led_override_color": "#0000ff",
|
|
"led_override_color_brightness": 100,
|
|
"license_state": "registered",
|
|
"lldp_table": [
|
|
{
|
|
"chassis_id": "fc:ec:00:11:22:33",
|
|
"is_wired": true,
|
|
"local_port_idx": 1,
|
|
"local_port_name": "eth0",
|
|
"port_id": "Port "
|
|
}
|
|
],
|
|
"locating": false,
|
|
"mac": "74:ac:b9:a1:01:01",
|
|
"manufacturer_id": 2,
|
|
"model": "USMINI",
|
|
"model_in_eol": false,
|
|
"model_in_lts": false,
|
|
"model_incompatible": false,
|
|
"name": "UniFi Switch Flex Mini",
|
|
"next_interval": 34,
|
|
"num_sta": 0,
|
|
"outdoor_mode_override": "default",
|
|
"overheating": false,
|
|
"port_table": [
|
|
{
|
|
"aggregated_by": false,
|
|
"autoneg": true,
|
|
"bytes-r": 577,
|
|
"enable": true,
|
|
"flowctrl_rx": false,
|
|
"flowctrl_tx": false,
|
|
"full_duplex": true,
|
|
"is_uplink": true,
|
|
"jumbo": false,
|
|
"masked": false,
|
|
"media": "GE",
|
|
"name": "Port 1",
|
|
"op_mode": "switch",
|
|
"port_idx": 1,
|
|
"port_poe": false,
|
|
"portconf_id": "5f3edd2aba4cc806a19f2db2",
|
|
"rx_broadcast": 6679204,
|
|
"rx_bytes": 6147696151,
|
|
"rx_bytes-r": 452,
|
|
"rx_dropped": 0,
|
|
"rx_errors": 0,
|
|
"rx_multicast": 20240009,
|
|
"rx_packets": 30183544,
|
|
"speed": 1000,
|
|
"speed_caps": 1048623,
|
|
"tx_broadcast": 3397,
|
|
"tx_bytes": 1243754733,
|
|
"tx_bytes-r": 124,
|
|
"tx_dropped": 0,
|
|
"tx_errors": 0,
|
|
"tx_multicast": 310278,
|
|
"tx_packets": 3836158,
|
|
"up": true
|
|
},
|
|
{
|
|
"aggregated_by": false,
|
|
"autoneg": true,
|
|
"bytes-r": 0,
|
|
"enable": true,
|
|
"flowctrl_rx": false,
|
|
"flowctrl_tx": false,
|
|
"full_duplex": false,
|
|
"is_uplink": false,
|
|
"jumbo": false,
|
|
"masked": false,
|
|
"media": "GE",
|
|
"name": "Port 2",
|
|
"op_mode": "switch",
|
|
"port_idx": 2,
|
|
"port_poe": false,
|
|
"portconf_id": "5f3edd2aba4cc806a19f2db2",
|
|
"rx_broadcast": 0,
|
|
"rx_bytes": 0,
|
|
"rx_bytes-r": 0,
|
|
"rx_dropped": 0,
|
|
"rx_errors": 0,
|
|
"rx_multicast": 0,
|
|
"rx_packets": 0,
|
|
"speed": 0,
|
|
"speed_caps": 1048623,
|
|
"tx_broadcast": 0,
|
|
"tx_bytes": 0,
|
|
"tx_bytes-r": 0,
|
|
"tx_dropped": 0,
|
|
"tx_errors": 0,
|
|
"tx_multicast": 0,
|
|
"tx_packets": 0,
|
|
"up": false
|
|
},
|
|
{
|
|
"aggregated_by": false,
|
|
"autoneg": true,
|
|
"bytes-r": 0,
|
|
"enable": true,
|
|
"flowctrl_rx": false,
|
|
"flowctrl_tx": false,
|
|
"full_duplex": false,
|
|
"is_uplink": false,
|
|
"jumbo": false,
|
|
"masked": false,
|
|
"media": "GE",
|
|
"name": "Port 3",
|
|
"op_mode": "switch",
|
|
"port_idx": 3,
|
|
"port_poe": false,
|
|
"portconf_id": "5f3edd2aba4cc806a19f2db2",
|
|
"rx_broadcast": 0,
|
|
"rx_bytes": 0,
|
|
"rx_bytes-r": 0,
|
|
"rx_dropped": 0,
|
|
"rx_errors": 0,
|
|
"rx_multicast": 0,
|
|
"rx_packets": 0,
|
|
"speed": 0,
|
|
"speed_caps": 1048623,
|
|
"tx_broadcast": 0,
|
|
"tx_bytes": 0,
|
|
"tx_bytes-r": 0,
|
|
"tx_dropped": 0,
|
|
"tx_errors": 0,
|
|
"tx_multicast": 0,
|
|
"tx_packets": 0,
|
|
"up": false
|
|
},
|
|
{
|
|
"aggregated_by": false,
|
|
"autoneg": true,
|
|
"bytes-r": 0,
|
|
"enable": true,
|
|
"flowctrl_rx": false,
|
|
"flowctrl_tx": false,
|
|
"full_duplex": false,
|
|
"is_uplink": false,
|
|
"jumbo": false,
|
|
"masked": false,
|
|
"media": "GE",
|
|
"name": "Port 4",
|
|
"op_mode": "switch",
|
|
"port_idx": 4,
|
|
"port_poe": false,
|
|
"portconf_id": "5f3edd2aba4cc806a19f2db2",
|
|
"rx_broadcast": 0,
|
|
"rx_bytes": 0,
|
|
"rx_bytes-r": 0,
|
|
"rx_dropped": 0,
|
|
"rx_errors": 0,
|
|
"rx_multicast": 0,
|
|
"rx_packets": 0,
|
|
"speed": 0,
|
|
"speed_caps": 1048623,
|
|
"tx_broadcast": 0,
|
|
"tx_bytes": 0,
|
|
"tx_bytes-r": 0,
|
|
"tx_dropped": 0,
|
|
"tx_errors": 0,
|
|
"tx_multicast": 0,
|
|
"tx_packets": 0,
|
|
"up": false
|
|
},
|
|
{
|
|
"aggregated_by": false,
|
|
"autoneg": true,
|
|
"bytes-r": 0,
|
|
"enable": true,
|
|
"flowctrl_rx": false,
|
|
"flowctrl_tx": false,
|
|
"full_duplex": false,
|
|
"is_uplink": false,
|
|
"jumbo": false,
|
|
"masked": false,
|
|
"media": "GE",
|
|
"name": "Port 5",
|
|
"op_mode": "switch",
|
|
"port_idx": 5,
|
|
"port_poe": false,
|
|
"portconf_id": "5f3edd2aba4cc806a19f2db2",
|
|
"rx_broadcast": 0,
|
|
"rx_bytes": 0,
|
|
"rx_bytes-r": 0,
|
|
"rx_dropped": 0,
|
|
"rx_errors": 0,
|
|
"rx_multicast": 0,
|
|
"rx_packets": 0,
|
|
"speed": 0,
|
|
"speed_caps": 1048623,
|
|
"tx_broadcast": 0,
|
|
"tx_bytes": 0,
|
|
"tx_bytes-r": 0,
|
|
"tx_dropped": 0,
|
|
"tx_errors": 0,
|
|
"tx_multicast": 0,
|
|
"tx_packets": 0,
|
|
"up": false
|
|
}
|
|
],
|
|
"power_source_ctrl_enabled": false,
|
|
"provisioned_at": 1610008100,
|
|
"required_version": "1.7.3",
|
|
"rollupgrade": false,
|
|
"rx_bytes": 0,
|
|
"satisfaction": -1,
|
|
"serial": "74ACB9A10101",
|
|
"site_id": "5a32aa4ee4b0412345678910",
|
|
"start_connected_millis": 1634732311256,
|
|
"start_disconnected_millis": 1634732296240,
|
|
"startup_timestamp": 1626303645,
|
|
"stat": {
|
|
"sw": {
|
|
"bytes": 648398923.0,
|
|
"datetime": "2021-10-20T12:15:00Z",
|
|
"duration": 844723000.0,
|
|
"o": "sw",
|
|
"oid": "74:ac:b9:a1:01:01",
|
|
"port_1-rx_broadcast": 565601.0,
|
|
"port_1-rx_bytes": 535337644.0,
|
|
"port_1-rx_multicast": 1790802.0,
|
|
"port_1-rx_packets": 2652630.0,
|
|
"port_1-tx_broadcast": 335.0,
|
|
"port_1-tx_bytes": 113061279.0,
|
|
"port_1-tx_multicast": 28157.0,
|
|
"port_1-tx_packets": 348590.0,
|
|
"rx_broadcast": 565601.0,
|
|
"rx_bytes": 535337644.0,
|
|
"rx_crypts": 0.0,
|
|
"rx_dropped": 0.0,
|
|
"rx_errors": 0.0,
|
|
"rx_frags": 0.0,
|
|
"rx_multicast": 1790802.0,
|
|
"rx_packets": 2652630.0,
|
|
"site_id": "5a32aa4ee4b0412345678910",
|
|
"sw": "74:ac:b9:a1:01:01",
|
|
"time": 1634732100000,
|
|
"tx_broadcast": 335.0,
|
|
"tx_bytes": 113061279.0,
|
|
"tx_dropped": 0.0,
|
|
"tx_errors": 0.0,
|
|
"tx_multicast": 28157.0,
|
|
"tx_packets": 348590.0,
|
|
"tx_retries": 0.0
|
|
}
|
|
},
|
|
"state": 1,
|
|
"stp_priority": "32768",
|
|
"stp_version": "rstp",
|
|
"switch_caps": {
|
|
"feature_caps": 44,
|
|
"max_aggregate_sessions": 0,
|
|
"max_mirror_sessions": 1,
|
|
"vlan_caps": 2
|
|
},
|
|
"sys_error_caps": 0,
|
|
"sys_stats": {
|
|
"mem_total": 163840,
|
|
"mem_used": 131940
|
|
},
|
|
"syslog_key": "REDACTED",
|
|
"system-stats": {},
|
|
"two_phase_adopt": false,
|
|
"tx_bytes": 0,
|
|
"type": "usw",
|
|
"unsupported": false,
|
|
"unsupported_reason": 0,
|
|
"upgradable": false,
|
|
"uplink": {
|
|
"full_duplex": true,
|
|
"ip": "198.168.0.9",
|
|
"mac": "74:ac:b9:a1:01:01",
|
|
"max_speed": 1000,
|
|
"media": "GE",
|
|
"name": "eth0",
|
|
"netmask": "255.255.255.0",
|
|
"num_port": 5,
|
|
"port_idx": 1,
|
|
"rx_bytes": 0,
|
|
"rx_bytes-r": 0,
|
|
"rx_dropped": 0,
|
|
"rx_errors": 0,
|
|
"rx_packets": 0,
|
|
"speed": 1000,
|
|
"tx_bytes": 0,
|
|
"tx_bytes-r": 0,
|
|
"tx_dropped": 0,
|
|
"tx_errors": 0,
|
|
"tx_packets": 0,
|
|
"type": "wire",
|
|
"up": true,
|
|
"uplink_mac": "fc:ec:00:11:22:33",
|
|
"uplink_remote_port": 13
|
|
},
|
|
"uplink_depth": 2,
|
|
"uptime": 9273422,
|
|
"user-num_sta": 0,
|
|
"version": "1.8.4.674",
|
|
"x_aes_gcm": "REDACTED",
|
|
"x_authkey": "REDACTED",
|
|
"x_has_ssh_hostkey": "REDACTED"
|
|
}
|