Merge pull request #84 from tehhobbit/base_new_methods

Get interface counters for junos
This commit is contained in:
David Barroso committed 2015-11-23 04:54:59 -08:00
commit 4c0088fe7e
1 file changed
+46
+46
View File
@@ -67,3 +67,49 @@ junos_lldp_view:
fields:
hostname: lldp-remote-system-name
port: lldp-remote-port-description | lldp-remote-port-id
####
#### Interface counters
####
junos_iface_counter_table:
rpc: get-interface-information
args:
extensive: True
interface_name: '[vmfgx][mle]*'
args_key: interface_name
item: physical-interface
view: junos_iface_counter_view
junos_iface_counter_view:
groups:
ts: traffic-statistics
rxerrs: input-error-list
txerrs: output-error-list
ethernet_traffic_types: ethernet-mac-statistics
# fields that are part of groups are called
# "fields_<group-name>"
fields_ethernet_traffic_types:
rx_broadcast_packets: { input-broadcasts: int }
tx_broadcast_packets: { output-broadcasts: int }
rx_unicast_packets: { input-unicasts: int }
tx_unicast_packets: { output-unicasts: int }
rx_multicast_packets: { input-multicasts: int }
tx_multicast_packets: { output-multicasts: int }
fields_ts:
rx_octets: { input-bytes: int }
tx_octets: { output-bytes: int }
fields_rxerrs:
rx_errors: { input-errors: int }
rx_discards: { input-discards: int }
fields_txerrs:
tx_errors: { output-errors: int }
tx_discards: { output-drops: int }