[ninux-dev] Fwd: Nodeshot Netengine openwrt
Gioacchino Mazzurco
gio at eigenlab.org
Tue May 13 00:52:48 CEST 2014
---------- Forwarded Message ----------
Subject: Nodeshot Netengine openwrt
Date: Sunday 11 May 2014, 15:28:56
From: Gioacchino Mazzurco <gmazzurco89 at gmail.com>
To: nemesis at ninux.org
We!
Mi sono ricordato che su netengine vi stavate impazzendo appresso a SNMP per
openwrt, penso che ve lo potete evitare usando ubus che e' interrogabile via
http e fa parte del sistema bade di openwrt (quindi mentre per snmp va
installato un pacchetto aggiuntivo per ubus no) spara i dati direttamente in
json bello leggibile e qui ti passo un esempio:
root at LiMeNode-123456:/# ubus call network.device status
{
"anygw": {
"external": false,
"present": true,
"type": "MAC VLAN",
"up": true,
"carrier": true,
"parent": "br-lan",
"mtu": 1500,
"macaddr": "aa:aa:aa:aa:aa:aa",
"txqueuelen": 0,
"ipv6": true,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 102,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 4284,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 102,
"tx_heartbeat_errors": 0,
"rx_dropped": 0,
"tx_aborted_errors": 0,
"tx_packets": 5,
"rx_errors": 0,
"tx_bytes": 526,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
"bat0": {
"external": false,
"present": true,
"type": "Network device",
"up": true,
"carrier": true,
"link-advertising": [
],
"link-supported": [
],
"speed": "10F",
"mtu": 1500,
"macaddr": "f6:da:d7:f3:0c:28",
"txqueuelen": 0,
"ipv6": false,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 0,
"rx_length_errors": 0,
"tx_dropped": 27,
"rx_bytes": 4746,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 113,
"tx_heartbeat_errors": 0,
"rx_dropped": 0,
"tx_aborted_errors": 0,
"tx_packets": 7,
"rx_errors": 0,
"tx_bytes": 890,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
"br-lan": {
"external": false,
"present": true,
"type": "Bridge",
"up": true,
"carrier": true,
"bridge-members": [
"bat0",
"eth0"
],
"mtu": 1500,
"macaddr": "f6:da:d7:f3:0c:28",
"txqueuelen": 0,
"ipv6": true,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 0,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 2856,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 102,
"tx_heartbeat_errors": 0,
"rx_dropped": 0,
"tx_aborted_errors": 0,
"tx_packets": 12,
"rx_errors": 0,
"tx_bytes": 1232,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
"eth0": {
"external": false,
"present": true,
"type": "Network device",
"up": true,
"carrier": true,
"mtu": 1500,
"macaddr": "52:54:00:12:34:56",
"txqueuelen": 1000,
"ipv6": false,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 0,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 0,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 0,
"tx_heartbeat_errors": 0,
"rx_dropped": 0,
"tx_aborted_errors": 0,
"tx_packets": 3423,
"rx_errors": 0,
"tx_bytes": 274706,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
"lo": {
"external": false,
"present": true,
"type": "Network device",
"up": true,
"carrier": true,
"mtu": 65536,
"macaddr": "00:00:00:00:00:00",
"txqueuelen": 0,
"ipv6": true,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 0,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 0,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 0,
"tx_heartbeat_errors": 0,
"rx_dropped": 0,
"tx_aborted_errors": 0,
"tx_packets": 0,
"rx_errors": 0,
"tx_bytes": 0,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
}
}
root at LiMeNode-123456:/#
-----------------------------------------
More information about the ninux-dev
mailing list