Skip to content

Commit

Permalink
Merge 36b15d4 into 06bdc67
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceaulinic committed Nov 12, 2020
2 parents 06bdc67 + 36b15d4 commit 02a7290
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 4 deletions.
4 changes: 2 additions & 2 deletions napalm_logs/config/junos/SYSTEM_ALARM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ messages:
values:
component: (FPC \d)
color|color_to_severity: (\w+)
reason: ([\w ]+)
reason: (.*)
line: 'FPC color={color}, class=CHASSIS, reason={component} {reason}'
model: ietf-hardware
mapping:
Expand All @@ -29,7 +29,7 @@ messages:
component: (\w+)
color|color_to_severity: (\w+)
class: (\w+)
reason: ([\w ]+)
reason: (.*)
line: '{component} color={color}, class={class}, reason={reason}'
model: ietf-hardware
mapping:
Expand Down
4 changes: 2 additions & 2 deletions napalm_logs/config/junos/SYSTEM_ALARM_CLEARED.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ messages:
values:
component: (FPC \d)
color|color_to_severity: (\w+)
reason: ([\w ]+)
reason: (.*)
line: 'FPC color={color}, class=CHASSIS, reason={component} {reason}'
model: ietf-hardware
mapping:
Expand All @@ -22,7 +22,7 @@ messages:
component: (\w+)
color|color_to_severity: (\w+)
class: (\w+)
reason: ([\w ]+)
reason: (.*)
line: '{component} color={color}, class={class}, reason={reason}'
model: ietf-hardware
mapping:
Expand Down
1 change: 1 addition & 0 deletions tests/config/junos/SYSTEM_ALARM/reason_nonalpha/syslog.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<28>Jul 8 23:04:13 vmx01 alarmd[2449]: Alarm set: RE color=YELLOW, class=CHASSIS, reason=RE 0 /var partition usage is high
37 changes: 37 additions & 0 deletions tests/config/junos/SYSTEM_ALARM/reason_nonalpha/yang.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"severity": 4,
"timestamp": 1594249453,
"os": "junos",
"message_details": {
"processName": "alarmd",
"severity": 4,
"tag": "Alarm set",
"hostPrefix": null,
"time": "23:04:13",
"pri": "28",
"message": "RE color=YELLOW, class=CHASSIS, reason=RE 0 /var partition usage is high",
"facility": 3,
"host": "vmx01",
"date": "Jul 8",
"processId": "2449"
},
"yang_model": "ietf-hardware",
"yang_message": {
"hardware-state": {
"component": {
"RE": {
"class": "CHASSIS",
"name": "RE",
"state": {
"alarm-state": 4,
"alarm-reason": "RE 0 /var partition usage is high"
}
}
}
}
},
"error": "SYSTEM_ALARM",
"facility": 3,
"host": "vmx01",
"ip": "127.0.0.1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<28>Jul 8 23:04:13 vmx01 alarmd[2449]: Alarm cleared: RE color=YELLOW, class=CHASSIS, reason=RE 0 /var partition usage is high
37 changes: 37 additions & 0 deletions tests/config/junos/SYSTEM_ALARM_CLEARED/reason_nonalpha/yang.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"severity": 4,
"timestamp": 1594249453,
"os": "junos",
"message_details": {
"processName": "alarmd",
"severity": 4,
"tag": "Alarm cleared",
"hostPrefix": null,
"time": "23:04:13",
"pri": "28",
"message": "RE color=YELLOW, class=CHASSIS, reason=RE 0 /var partition usage is high",
"facility": 3,
"host": "vmx01",
"date": "Jul 8",
"processId": "2449"
},
"yang_model": "ietf-hardware",
"yang_message": {
"hardware-state": {
"component": {
"RE": {
"class": "CHASSIS",
"name": "RE",
"state": {
"alarm-state": 4,
"alarm-reason": "RE 0 /var partition usage is high"
}
}
}
}
},
"error": "SYSTEM_ALARM_CLEARED",
"facility": 3,
"host": "vmx01",
"ip": "127.0.0.1"
}

0 comments on commit 02a7290

Please sign in to comment.