Skip to content

Commit b1cd924

Browse files
authored
Merge pull request #971 from amylieb/ipv6-neighbors-for-junos
ipv6 neighbor data gathering for junos
2 parents 8ab720e + b22197d commit b1cd924

File tree

2 files changed

+35
-17
lines changed

2 files changed

+35
-17
lines changed

suzieq/config/arpnd.yml

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,28 +62,45 @@ apply:
6262

6363
junos-qfx:
6464
version: all
65-
command: show arp | display json | no-more
66-
normalize: 'arp-table-information/[0]/arp-table-entry/*/[
67-
"mac-address/[0]/data: macaddr",
68-
"ip-address/[0]/data: ipAddress",
69-
"interface-name/[0]/data: oif",
70-
"arp-table-entry-flags: flags",
71-
"offload: remote?|False",
72-
]'
65+
command:
66+
- command: show arp no-resolve | display json | no-more
67+
normalize: 'arp-table-information/[0]/arp-table-entry/*/[
68+
"mac-address/[0]/data: macaddr",
69+
"ip-address/[0]/data: ipAddress",
70+
"interface-name/[0]/data: oif",
71+
"arp-table-entry-flags: flags",
72+
"offload: remote?|False",
73+
]'
74+
- command: show ipv6 neighbors | display json | no-more
75+
normalize: 'ipv6-nd-information/[0]/ipv6-nd-entry/*/[
76+
"ipv6-nd-neighbor-address/[0]/data: ipAddress",
77+
"ipv6-nd-neighbor-l2-address/[0]/data: macaddr",
78+
"ipv6-nd-state/[0]/data: state",
79+
"ipv6-nd-interface-name/[0]/data: oif",
80+
]'
7381

7482
junos-ex:
7583
copy: junos-qfx
7684

7785
junos-mx:
7886
version: all
79-
command: show arp no-resolve | display json | no-more
80-
normalize: 'arp-table-information/[0]/arp-table-entry/*/[
81-
"mac-address/[0]/data: macaddr",
82-
"ip-address/[0]/data: ipAddress",
83-
"interface-name/[0]/data: oif",
84-
"arp-table-entry-flags: flags",
85-
"offload: remote?|False",
86-
]'
87+
command:
88+
- command: show arp no-resolve | display json | no-more
89+
normalize: 'arp-table-information/[0]/arp-table-entry/*/[
90+
"mac-address/[0]/data: macaddr",
91+
"ip-address/[0]/data: ipAddress",
92+
"interface-name/[0]/data: oif",
93+
"arp-table-entry-flags: flags",
94+
"offload: remote?|False",
95+
]'
96+
- command: show ipv6 neighbors | display json | no-more
97+
normalize: 'ipv6-nd-information/[0]/ipv6-nd-entry/*/[
98+
"ipv6-nd-neighbor-address/[0]/data: ipAddress",
99+
"ipv6-nd-neighbor-l2-address/[0]/data: macaddr",
100+
"ipv6-nd-state/[0]/data: state",
101+
"ipv6-nd-interface-name/[0]/data: oif",
102+
]'
103+
87104

88105
junos-es:
89106
copy: junos-qfx

suzieq/poller/worker/services/arpnd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ def _clean_junos_data(self, processed_data, _):
5151
entry['remote'] = True
5252
if entry['oif']:
5353
entry['oif'] = re.sub(r' \[.*\]', '', entry['oif'])
54-
entry['state'] = 'reachable'
54+
if not entry.get('state', None):
55+
entry['state'] = 'reachable'
5556
if not entry.get('macaddr', None):
5657
entry['macaddr'] = '00:00:00:00:00:00'
5758

0 commit comments

Comments
 (0)