Skip to content

Commit 94ff8ad

Browse files
authored
Merge pull request #314 from luke-orden/junos_NH_REGION_GRAB_FAILED
Add junos NH_REGION_GRAB_FAILED
2 parents 3600d6a + 61e3850 commit 94ff8ad

File tree

4 files changed

+63
-0
lines changed

4 files changed

+63
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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: NH_REGION_GRAB_FAILED
5+
tag: JPRDS_NH
6+
values:
7+
id: (\d+)
8+
nh: (\d+)
9+
line: 'jprds_nh_alloc(),{id}: JNH[0] failed to grab new region for NH#{nh}'
10+
model: NO_MODEL
11+
mapping:
12+
variables:
13+
nh//region//failed//id: id
14+
nh//region//failed//nh: nh
15+
static: {}

napalm_logs/config/junos/init.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,16 @@ prefixes:
3636
# Some logs have data which can be inside brackets or parenthesis
3737
additionalData: (?:(?:\[|\()(.+)(?:\]|\)))?
3838
line: '{date} {time} {hostPrefix}{host} fpc{fpcId} {tag}{additionalData}:'
39+
# The following matches dcpfe specific logs
40+
- time_format: "%b %d %H:%M:%S"
41+
values:
42+
date: (\w+\s+\d+)
43+
time: (\d\d:\d\d:\d\d)
44+
hostPrefix: (re\d.)?
45+
host: ([^ ]+)
46+
fpcId: (\d+)
47+
fpcId2: (\d+)
48+
tag: (\w+)
49+
# Some logs have data which can be inside brackets or parenthesis
50+
additionalData: (?:(?:\[|\()(.+)(?:\]|\)))?
51+
line: '{date} {time} {hostPrefix}{host} fpc{fpcId} fpc{fpcId2} dcpfe: {tag}{additionalData}:'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<7>Dec 10 00:00:01 re0.edge01.bjm01 fpc3 fpc3 dcpfe: JPRDS_NH:jprds_nh_alloc(),631: JNH[0] failed to grab new region for NH#007
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"yang_message": {
3+
"nh": {
4+
"region": {
5+
"failed": {
6+
"nh": "007",
7+
"id": "631"
8+
}
9+
}
10+
}
11+
},
12+
"message_details": {
13+
"additionalData": null,
14+
"severity": 7,
15+
"facility": 0,
16+
"hostPrefix": "re0.",
17+
"pri": "7",
18+
"host": "edge01.bjm01",
19+
"tag": "JPRDS_NH",
20+
"fpcId": "3",
21+
"fpcId2": "3",
22+
"time": "00:00:01",
23+
"date": "Dec 10",
24+
"message": "jprds_nh_alloc(),631: JNH[0] failed to grab new region for NH#007"
25+
},
26+
"facility": 0,
27+
"ip": "127.0.0.1",
28+
"error": "NH_REGION_GRAB_FAILED",
29+
"host": "edge01.bjm01",
30+
"yang_model": "NO_MODEL",
31+
"timestamp": 1575936001,
32+
"os": "junos",
33+
"severity": 7
34+
}

0 commit comments

Comments
 (0)