Skip to content

Commit

Permalink
Merge pull request #356 from napalm-automation/ddos-times
Browse files Browse the repository at this point in the history
DDOS_PROTOCOL_VIOLATION_SET: exclude the alert count from the additional-text
  • Loading branch information
mirceaulinic committed Nov 19, 2020
2 parents 40dbdb1 + 318b386 commit 00dc8a3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
3 changes: 2 additions & 1 deletion napalm_logs/config/junos/DDOS_PROTOCOL_VIOLATION_SET.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ messages:
entityType: ([\w\-]+)
additionalText: (.*)
startTime: ([\w\s\-\:]+)
line: 'Warning: Host-bound traffic for protocol/exception {entityType}:{additionalText}, started at {startTime}'
times: (\d+)
line: 'Warning: Host-bound traffic for protocol/exception {entityType}:{additionalText} for {times} times, started at {startTime}'
model: ietf-alarm
mapping:
variables:
Expand Down
52 changes: 26 additions & 26 deletions tests/config/junos/DDOS_PROTOCOL_VIOLATION_SET/default/yang.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"error": "DDOS_PROTOCOL_VIOLATION_SET",
"host": "some-switch",
"ip": "127.0.0.1",
"timestamp": 1604883760,
"timestamp": 1604883760,
"severity": 4,
"error": "DDOS_PROTOCOL_VIOLATION_SET",
"os": "junos",
"ip": "127.0.0.1",
"message_details": {
"message": "Warning: Host-bound traffic for protocol/exception Redirect:aggregate exceeded its allowed bandwidth at fpc 0 for 6661 times, started at 2020-11-09 01:02:39 UTC",
"severity": 4,
"tag": "DDOS_PROTOCOL_VIOLATION_SET",
"time": "01:02:40",
"facility": 3,
"hostPrefix": null,
"pri": "28",
"processName": "jddosd",
"host": "some-switch",
"processId": "4223",
"date": "Nov 9"
},
"yang_model": "ietf-alarm",
"yang_message": {
"alarms": {
"alarm": {
"entity-type": "Redirect",
"additional-text": "aggregate exceeded its allowed bandwidth at fpc 0 for 6661 times",
"alarm-time": "2020-11-09 01:02:39 UTC",
"event-type": 10
"event-type": 10,
"additional-text": "aggregate exceeded its allowed bandwidth at fpc 0",
"entity-type": "Redirect",
"alarm-time": "2020-11-09 01:02:39 UTC"
}
}
},
"message_details": {
"date": "Nov 9",
"time": "01:02:40",
"hostPrefix": null,
"host": "some-switch",
"processName": "jddosd",
"processId": "4223",
"tag": "DDOS_PROTOCOL_VIOLATION_SET",
"pri": "28",
"message": "Warning: Host-bound traffic for protocol/exception Redirect:aggregate exceeded its allowed bandwidth at fpc 0 for 6661 times, started at 2020-11-09 01:02:39 UTC",
"facility": 3,
"severity": 4
},
"yang_model": "ietf-alarm",
"os": "junos",
"facility": 3,
"severity": 4
},
"facility": 3,
"host": "some-switch"
}

0 comments on commit 00dc8a3

Please sign in to comment.