forked from elastic/integrations
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cisco_asa] Add advanced option for time zone mapping and support par…
…sing extra timestamp in header (elastic#12440) - Added an advanced option for mapping short time zone names to long time zone names - Support parsing the extra timestamp that is sometimes included in messages, often containing the time zone.
- Loading branch information
1 parent
ea01b6f
commit fcf324c
Showing
10 changed files
with
232 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/cisco_asa/data_stream/log/_dev/test/pipeline/test-asa-tz-mapping.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Sep 25 15:47:07 host1.example.com : Sep 25 15:47:07 EDT: %ASA-auth-4-113004: AAA user authentication Successful : server = myservername : user = myusername | ||
Jan 22 14:05:11 test.example.com : Jan 22 14:05:11 PST: %ASA-svc-4-722051: Group <GroupPolicy_NAME> User <user_NAME> IP <81.2.69.144> IPv4 Address <10.20.0.1> IPv6 address <::> assigned to session |
11 changes: 11 additions & 0 deletions
11
packages/cisco_asa/data_stream/log/_dev/test/pipeline/test-asa-tz-mapping.log-config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
dynamic_fields: | ||
"event.ingested": ".*" | ||
fields: | ||
tags: | ||
- preserve_original_event | ||
_conf: | ||
tz_map: | ||
- tz_short: EDT | ||
tz_long: America/New_York | ||
- tz_short: PST | ||
tz_long: -08:00 |
143 changes: 143 additions & 0 deletions
143
packages/cisco_asa/data_stream/log/_dev/test/pipeline/test-asa-tz-mapping.log-expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
{ | ||
"expected": [ | ||
{ | ||
"@timestamp": "2025-09-25T15:47:07.000-04:00", | ||
"cisco": { | ||
"asa": { | ||
"aaa_type": "authentication", | ||
"suffix": "auth" | ||
} | ||
}, | ||
"destination": { | ||
"address": "myservername", | ||
"domain": "myservername" | ||
}, | ||
"ecs": { | ||
"version": "8.11.0" | ||
}, | ||
"event": { | ||
"action": "logged-in", | ||
"category": [ | ||
"authentication", | ||
"network" | ||
], | ||
"code": "113004", | ||
"kind": "event", | ||
"original": "Sep 25 15:47:07 host1.example.com : Sep 25 15:47:07 EDT: %ASA-auth-4-113004: AAA user authentication Successful : server = myservername : user = myusername", | ||
"outcome": "success", | ||
"severity": 4, | ||
"timezone": "America/New_York", | ||
"type": [ | ||
"allowed", | ||
"info" | ||
] | ||
}, | ||
"host": { | ||
"hostname": "host1.example.com" | ||
}, | ||
"log": { | ||
"level": "warning" | ||
}, | ||
"observer": { | ||
"hostname": "host1.example.com", | ||
"product": "asa", | ||
"type": "firewall", | ||
"vendor": "Cisco" | ||
}, | ||
"related": { | ||
"hosts": [ | ||
"host1.example.com", | ||
"myservername" | ||
], | ||
"user": [ | ||
"myusername" | ||
] | ||
}, | ||
"source": { | ||
"user": { | ||
"name": "myusername" | ||
} | ||
}, | ||
"tags": [ | ||
"preserve_original_event" | ||
] | ||
}, | ||
{ | ||
"@timestamp": "2025-01-22T14:05:11.000-08:00", | ||
"cisco": { | ||
"asa": { | ||
"assigned_ip": "10.20.0.1", | ||
"suffix": "svc" | ||
} | ||
}, | ||
"ecs": { | ||
"version": "8.11.0" | ||
}, | ||
"event": { | ||
"action": "address-assigned", | ||
"category": [ | ||
"network" | ||
], | ||
"code": "722051", | ||
"kind": "event", | ||
"original": "Jan 22 14:05:11 test.example.com : Jan 22 14:05:11 PST: %ASA-svc-4-722051: Group <GroupPolicy_NAME> User <user_NAME> IP <81.2.69.144> IPv4 Address <10.20.0.1> IPv6 address <::> assigned to session", | ||
"outcome": "success", | ||
"reason": "IPv4 Address <10.20.0.1> IPv6 address <::> assigned to session", | ||
"severity": 4, | ||
"timezone": "-08:00", | ||
"type": [ | ||
"connection", | ||
"info" | ||
] | ||
}, | ||
"host": { | ||
"hostname": "test.example.com" | ||
}, | ||
"log": { | ||
"level": "warning" | ||
}, | ||
"observer": { | ||
"hostname": "test.example.com", | ||
"product": "asa", | ||
"type": "firewall", | ||
"vendor": "Cisco" | ||
}, | ||
"related": { | ||
"hosts": [ | ||
"test.example.com" | ||
], | ||
"ip": [ | ||
"81.2.69.144" | ||
], | ||
"user": [ | ||
"user_NAME" | ||
] | ||
}, | ||
"source": { | ||
"address": "81.2.69.144", | ||
"geo": { | ||
"city_name": "London", | ||
"continent_name": "Europe", | ||
"country_iso_code": "GB", | ||
"country_name": "United Kingdom", | ||
"location": { | ||
"lat": 51.5142, | ||
"lon": -0.0931 | ||
}, | ||
"region_iso_code": "GB-ENG", | ||
"region_name": "England" | ||
}, | ||
"ip": "81.2.69.144", | ||
"user": { | ||
"group": { | ||
"name": "GroupPolicy_NAME" | ||
}, | ||
"name": "user_NAME" | ||
} | ||
}, | ||
"tags": [ | ||
"preserve_original_event" | ||
] | ||
} | ||
] | ||
} |
6 changes: 3 additions & 3 deletions
6
packages/cisco_asa/data_stream/log/_dev/test/pipeline/test-common-config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
dynamic_fields: | ||
"event.end": "^[0-9]{4}(-[0-9]{2}){2}T[0-9]{2}(:[0-9]{2}){2}\\.[0-9]{3}Z$" | ||
"event.start": "^[0-9]{4}(-[0-9]{2}){2}T[0-9]{2}(:[0-9]{2}){2}\\.[0-9]{3}Z$" | ||
"@timestamp": "^[0-9]{4}(-[0-9]{2}){2}T[0-9]{2}(:[0-9]{2}){2}\\.[0-9]{3}Z$" | ||
"event.end": "^[0-9]{4}(-[0-9]{2}){2}T[0-9]{2}(:[0-9]{2}){2}\\.[0-9]{3}(?:Z|[-+][0-9]{2}:[0-9]{2})$" | ||
"event.start": "^[0-9]{4}(-[0-9]{2}){2}T[0-9]{2}(:[0-9]{2}){2}\\.[0-9]{3}(?:Z|[-+][0-9]{2}:[0-9]{2})$" | ||
"@timestamp": "^[0-9]{4}(-[0-9]{2}){2}T[0-9]{2}(:[0-9]{2}){2}\\.[0-9]{3}(?:Z|[-+][0-9]{2}:[0-9]{2})$" | ||
fields: | ||
tags: | ||
- preserve_original_event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.