diff --git a/suzieq/config/arpnd.yml b/suzieq/config/arpnd.yml index 50a4a23a50..13f2423176 100644 --- a/suzieq/config/arpnd.yml +++ b/suzieq/config/arpnd.yml @@ -62,28 +62,45 @@ apply: junos-qfx: version: all - command: show arp | display json | no-more - normalize: 'arp-table-information/[0]/arp-table-entry/*/[ - "mac-address/[0]/data: macaddr", - "ip-address/[0]/data: ipAddress", - "interface-name/[0]/data: oif", - "arp-table-entry-flags: flags", - "offload: remote?|False", - ]' + command: + - command: show arp no-resolve | display json | no-more + normalize: 'arp-table-information/[0]/arp-table-entry/*/[ + "mac-address/[0]/data: macaddr", + "ip-address/[0]/data: ipAddress", + "interface-name/[0]/data: oif", + "arp-table-entry-flags: flags", + "offload: remote?|False", + ]' + - command: show ipv6 neighbors | display json | no-more + normalize: 'ipv6-nd-information/[0]/ipv6-nd-entry/*/[ + "ipv6-nd-neighbor-address/[0]/data: ipAddress", + "ipv6-nd-neighbor-l2-address/[0]/data: macaddr", + "ipv6-nd-state/[0]/data: state", + "ipv6-nd-interface-name/[0]/data: oif", + ]' junos-ex: copy: junos-qfx junos-mx: version: all - command: show arp no-resolve | display json | no-more - normalize: 'arp-table-information/[0]/arp-table-entry/*/[ - "mac-address/[0]/data: macaddr", - "ip-address/[0]/data: ipAddress", - "interface-name/[0]/data: oif", - "arp-table-entry-flags: flags", - "offload: remote?|False", - ]' + command: + - command: show arp no-resolve | display json | no-more + normalize: 'arp-table-information/[0]/arp-table-entry/*/[ + "mac-address/[0]/data: macaddr", + "ip-address/[0]/data: ipAddress", + "interface-name/[0]/data: oif", + "arp-table-entry-flags: flags", + "offload: remote?|False", + ]' + - command: show ipv6 neighbors | display json | no-more + normalize: 'ipv6-nd-information/[0]/ipv6-nd-entry/*/[ + "ipv6-nd-neighbor-address/[0]/data: ipAddress", + "ipv6-nd-neighbor-l2-address/[0]/data: macaddr", + "ipv6-nd-state/[0]/data: state", + "ipv6-nd-interface-name/[0]/data: oif", + ]' + junos-es: copy: junos-qfx diff --git a/suzieq/poller/worker/services/arpnd.py b/suzieq/poller/worker/services/arpnd.py index 0045a9aa57..95b2fe1494 100644 --- a/suzieq/poller/worker/services/arpnd.py +++ b/suzieq/poller/worker/services/arpnd.py @@ -51,7 +51,8 @@ def _clean_junos_data(self, processed_data, _): entry['remote'] = True if entry['oif']: entry['oif'] = re.sub(r' \[.*\]', '', entry['oif']) - entry['state'] = 'reachable' + if not entry.get('state', None): + entry['state'] = 'reachable' if not entry.get('macaddr', None): entry['macaddr'] = '00:00:00:00:00:00'