Skip to content

Commit 89397dd

Browse files
[cisco_ios] Add support for Kiwi format logs (#14294)
- Add support for Kiwi format logs. The Kiwi header is removed and the remaining log is parsed like a normal Cisco IOS log.
1 parent 031517a commit 89397dd

File tree

5 files changed

+86
-1
lines changed

5 files changed

+86
-1
lines changed

packages/cisco_ios/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "1.31.0"
3+
changes:
4+
- description: Add support for Kiwi format logs
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/14294
27
- version: "1.30.3"
38
changes:
49
- description: Add support for longer timezone formats
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<190>Original Address=192.168.0.1 1 2025-06-23T16:13:32.168Z syslog-host-1 Kiwi_SyslogNet_Server 3356 MSGOUT TEST-HOST-1: *Jun 23 15:52:38.534: %SYS-6-LOGOUT: User test-user has exited tty session 1(192.168.0.1)
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"expected": [
3+
{
4+
"@timestamp": "2025-06-23T15:52:38.534Z",
5+
"cisco": {
6+
"ios": {
7+
"action": "exited",
8+
"facility": "SYS",
9+
"session": {
10+
"number": "1",
11+
"type": "tty"
12+
}
13+
}
14+
},
15+
"ecs": {
16+
"version": "8.17.0"
17+
},
18+
"event": {
19+
"category": [
20+
"network"
21+
],
22+
"code": "LOGOUT",
23+
"original": "<190>Original Address=192.168.0.1 1 2025-06-23T16:13:32.168Z syslog-host-1 Kiwi_SyslogNet_Server 3356 MSGOUT TEST-HOST-1: *Jun 23 15:52:38.534: %SYS-6-LOGOUT: User test-user has exited tty session 1(192.168.0.1)",
24+
"provider": "firewall",
25+
"severity": 6,
26+
"timezone": "UTC",
27+
"type": [
28+
"info"
29+
]
30+
},
31+
"log": {
32+
"level": "informational",
33+
"syslog": {
34+
"hostname": "TEST-HOST-1",
35+
"priority": 190
36+
}
37+
},
38+
"message": "User test-user has exited tty session 1(192.168.0.1)",
39+
"network": {
40+
"type": "ipv4"
41+
},
42+
"observer": {
43+
"product": "IOS",
44+
"type": "firewall",
45+
"vendor": "Cisco"
46+
},
47+
"related": {
48+
"ip": [
49+
"192.168.0.1"
50+
],
51+
"user": [
52+
"test-user"
53+
]
54+
},
55+
"source": {
56+
"address": "192.168.0.1",
57+
"ip": "192.168.0.1",
58+
"user": {
59+
"name": "test-user"
60+
}
61+
},
62+
"tags": [
63+
"preserve_original_event"
64+
]
65+
}
66+
]
67+
}

packages/cisco_ios/data_stream/log/elasticsearch/ingest_pipeline/default.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@ processors:
3333
ignore_missing: true
3434
- grok:
3535
field: event.original
36+
tag: grok_kiwi_header
37+
description: |-
38+
The Kiwi syslog header is expected to be in the following format:
39+
<PRI>Original Address=IP [RFC 5424 header] [Cisco IOS log]
40+
41+
This grok pattern currently only extracts the Cisco IOS log from
42+
the event. It does not extract any Kiwi syslog header fields.
43+
patterns:
44+
- '^<%{NONNEGINT:log.syslog.priority:long}>Original Address=(?:%{DATA} ){7}%{GREEDYDATA:_temp_.message}$'
45+
- '^%{GREEDYDATA:_temp_.message}$'
46+
- grok:
47+
field: _temp_.message
3648
tag: grok_header
3749
patterns:
3850
- '^%{CISCO_PRIORITY_MSGCOUNT}?%{TIMESTAMP_ISO8601:_temp_.cisco_timestamp} %{CISCO_HOSTNAME:log.syslog.hostname} %{GREEDYDATA:_temp_.message}$'

packages/cisco_ios/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: "3.0.3"
22
name: cisco_ios
33
title: Cisco IOS
4-
version: "1.30.3"
4+
version: "1.31.0"
55
description: Collect logs from Cisco IOS with Elastic Agent.
66
type: integration
77
categories:

0 commit comments

Comments
 (0)