From 3d1a01b251061000b296d605d85098ee88e865d4 Mon Sep 17 00:00:00 2001 From: Loke Berne Date: Mon, 23 Nov 2015 13:14:54 +0100 Subject: [PATCH] Get interface counters for junos --- utils/junos_views.yml | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/utils/junos_views.yml b/utils/junos_views.yml index e3f3be5..4456616 100644 --- a/utils/junos_views.yml +++ b/utils/junos_views.yml @@ -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_" + 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 }