Skip to content

Commit ea37d58

Browse files
committed
Add Junos counter-part INTERFACE_UP notification
Strangely, this was missing, although INTERFACE_DOWN is defined, likely because this wasn't being thrown on older Junos versions, but on modern software there is.
1 parent d409589 commit ea37d58

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
messages:
2+
# 'error' should be unique and vendor agnostic. Currently we are using the JUNOS syslog message name as the canonical name.
3+
# This may change if we are able to find a more well defined naming system.
4+
- error: INTERFACE_UP
5+
tag: SNMP_TRAP_LINK_UP
6+
values:
7+
snmpID: (\d+)
8+
adminStatusString|upper: (\w+)
9+
adminStatusValue: (\d)
10+
operStatusString|upper: (\w+)
11+
operStatusValue: (\d)
12+
interface: ([\w\-\/\:]+)
13+
line: 'ifIndex {snmpID}, ifAdminStatus {adminStatusString}({adminStatusValue}), ifOperStatus {operStatusString}({operStatusValue}), ifName {interface}'
14+
model: openconfig-interfaces
15+
mapping:
16+
variables:
17+
interfaces//interface//{interface}//state//admin_status: adminStatusString
18+
interfaces//interface//{interface}//state//oper_status: operStatusString
19+
static: {}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<28>Jul 20 21:45:59 vmx01 mib2d[2424]: SNMP_TRAP_LINK_UP: ifIndex 502, ifAdminStatus up(1), ifOperStatus up(1), ifName xe-0/0/0
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"yang_message": {
3+
"interfaces": {
4+
"interface": {
5+
"xe-0/0/0": {
6+
"state": {
7+
"oper_status": "UP",
8+
"admin_status": "UP"
9+
}
10+
}
11+
}
12+
}
13+
},
14+
"message_details": {
15+
"processId": "2424",
16+
"severity": 4,
17+
"facility": 3,
18+
"hostPrefix": null,
19+
"pri": "28",
20+
"processName": "mib2d",
21+
"host": "vmx01",
22+
"tag": "SNMP_TRAP_LINK_UP",
23+
"time": "21:45:59",
24+
"date": "Jul 20",
25+
"message": "ifIndex 502, ifAdminStatus up(1), ifOperStatus up(1), ifName xe-0/0/0"
26+
},
27+
"timestamp": 1500587159,
28+
"facility": 3,
29+
"ip": "127.0.0.1",
30+
"host": "vmx01",
31+
"yang_model": "openconfig-interfaces",
32+
"error": "INTERFACE_UP",
33+
"os": "junos",
34+
"severity": 4
35+
}

0 commit comments

Comments
 (0)