Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions napalm_logs/config/infinera/USER_LOGIN.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Infinera SECURITY messages for user login events
messages:
- error: USER_LOGIN
tag: SECURITY
values:
timestamp: (\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z?)
sessionId: ([^;]+)
sessionType: (\w+)
user: ([^;]+)
line: '"time-stamp":{timestamp};"session-id":{sessionId};"session-type":{sessionType};"user-name":{user};"event/action":logged in'
model: openconfig-system
mapping:
variables:
system//aaa//authentication//users//user//{user}//state//username: user
static: {}
21 changes: 21 additions & 0 deletions napalm_logs/config/infinera/init.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Infinera syslog format (RFC5424 style via netsyslog relay)
# Supported message types per vendor documentation:
# - ALARM: alarm notifications with severity, duration, service-affect
# - EVENT: system events with entity and attributes
# - CONFIGURATION: config changes with user, result, attributes
# - SECURITY: authentication events (login/logout)
#
# Example log:
# Jan 20 05:01:59.657539 73dm8 netsyslog: <85>1 2026-01-20T05:02:17+00:00 dci01.abc01@:: SECURITY 401 [meta sequenceId="735"] "time-stamp":...
#
prefixes:
- time_format: "%Y-%m-%dT%H:%M:%S"
values:
date: (\d{4}-\d{2}-\d{2})
time: (\d{2}:\d{2}:\d{2})
timezone: ([\+\-]\d{2}:\d{2})
host: '([\w\.\-]+)@::'
tag: (ALARM|EVENT|CONFIGURATION|SECURITY)
messageId: (\d+)
structuredData: (\[.*?\])
line: '1 {date}T{time}{timezone} {host} {tag} {messageId} {structuredData} '
1 change: 1 addition & 0 deletions tests/config/infinera/USER_LOGIN/default/syslog.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<85>1 2026-01-20T05:02:17+00:00 dci01.waw02@:: SECURITY 401 [meta sequenceId="735"] "time-stamp":2026-01-20T05:02:17Z;"session-id":sess-12345;"session-type":CLI;"user-name":admin;"event/action":logged in
40 changes: 40 additions & 0 deletions tests/config/infinera/USER_LOGIN/default/yang.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"yang_message": {
"system": {
"aaa": {
"authentication": {
"users": {
"user": {
"admin": {
"state": {
"username": "admin"
}
}
}
}
}
}
}
},
"message_details": {
"severity": 5,
"facility": 10,
"pri": "85",
"host": "dci01.waw02",
"tag": "SECURITY",
"date": "2026-01-20",
"time": "05:02:17",
"timezone": "+00:00",
"messageId": "401",
"structuredData": "[meta sequenceId=\"735\"]",
"message": "\"time-stamp\":2026-01-20T05:02:17Z;\"session-id\":sess-12345;\"session-type\":CLI;\"user-name\":admin;\"event/action\":logged in"
},
"timestamp": 1768978937,
"facility": 10,
"ip": "127.0.0.1",
"host": "dci01.waw02",
"yang_model": "openconfig-system",
"error": "USER_LOGIN",
"os": "infinera",
"severity": 5
}