-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #325 from napalm-automation/bgp-conn-rejected
BGP_CONNECTION_REJECTED and BGP_CONNECTION_RESET notifications
- Loading branch information
Showing
7 changed files
with
106 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
messages: | ||
- error: BGP_CONNECTION_REJECTED | ||
tag: bgp_handle_notify | ||
values: | ||
peer: ([\w\d:\.]+) | ||
asn: (\d+) | ||
peeringType: (\w+) | ||
number: (\d+) | ||
line: '{number}: NOTIFICATION received from {peer} ({peeringType} AS {asn}): code 6 (Cease) subcode 5 (Connection Rejected)' | ||
model: openconfig-bgp | ||
mapping: | ||
variables: | ||
bgp//neighbors//neighbor//{peer}//state//peer_as: asn | ||
static: | ||
bgp//neighbors//neighbor//{peer}//state//session_state: ACTIVE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
messages: | ||
- error: BGP_CONNECTION_RESET | ||
tag: bgp_recv | ||
values: | ||
peer: ([\w\d:\.]+) | ||
asn: (\d+) | ||
peeringType: (\w+) | ||
line: 'read from peer {peer} ({peeringType} AS {asn}) failed: Connection reset by peer' | ||
model: openconfig-bgp | ||
mapping: | ||
variables: | ||
bgp//neighbors//neighbor//{peer}//state//peer_as: asn | ||
static: | ||
bgp//neighbors//neighbor//{peer}//state//session_state: ACTIVE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<172>2020-03-31T08:41:59+00:00 some-router rpd[13037]: bgp_handle_notify:4236: NOTIFICATION received from 10.0.0.1 (External AS 64512): code 6 (Cease) subcode 5 (Connection Rejected) |
37 changes: 37 additions & 0 deletions
37
tests/config/junos/BGP_CONNECTION_REJECTED/default/yang.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"error": "BGP_CONNECTION_REJECTED", | ||
"host": "some-router", | ||
"ip": "127.0.0.1", | ||
"timestamp": 1585644119, | ||
"yang_message": { | ||
"bgp": { | ||
"neighbors": { | ||
"neighbor": { | ||
"10.0.0.1": { | ||
"state": { | ||
"peer_as": "64512", | ||
"session_state": "ACTIVE" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"message_details": { | ||
"date": "2020-03-31", | ||
"time": "08:41:59+00:00", | ||
"hostPrefix": null, | ||
"host": "some-router", | ||
"processName": "rpd", | ||
"processId": "13037", | ||
"tag": "bgp_handle_notify", | ||
"pri": "172", | ||
"message": "4236: NOTIFICATION received from 10.0.0.1 (External AS 64512): code 6 (Cease) subcode 5 (Connection Rejected)", | ||
"facility": 21, | ||
"severity": 4 | ||
}, | ||
"yang_model": "openconfig-bgp", | ||
"os": "junos", | ||
"facility": 21, | ||
"severity": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<172>2020-03-31T08:41:59+00:00 some-router rpd[13037]: bgp_recv: read from peer fd00:1065::1 (External AS 65500) failed: Connection reset by peer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"error": "BGP_CONNECTION_RESET", | ||
"host": "some-router", | ||
"ip": "127.0.0.1", | ||
"timestamp": 1585644119, | ||
"yang_message": { | ||
"bgp": { | ||
"neighbors": { | ||
"neighbor": { | ||
"fd00:1065::1": { | ||
"state": { | ||
"peer_as": "65500", | ||
"session_state": "ACTIVE" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"message_details": { | ||
"date": "2020-03-31", | ||
"time": "08:41:59+00:00", | ||
"hostPrefix": null, | ||
"host": "some-router", | ||
"processName": "rpd", | ||
"processId": "13037", | ||
"tag": "bgp_recv", | ||
"pri": "172", | ||
"message": "read from peer fd00:1065::1 (External AS 65500) failed: Connection reset by peer", | ||
"facility": 21, | ||
"severity": 4 | ||
}, | ||
"yang_model": "openconfig-bgp", | ||
"os": "junos", | ||
"facility": 21, | ||
"severity": 4 | ||
} |