Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing rules fix filter 4 #28193

Merged
merged 10 commits into from
Jul 17, 2023
Prev Previous commit
Next Next commit
Added filter to cisco nexus parsing rule
  • Loading branch information
yasta5 committed Jul 16, 2023
commit 8e0b8209e0ffaf9a97eaa3b55c39afac50f21245
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[INGEST:vendor="cisco", product="nexus", target_dataset="cisco_nexus_raw", no_hit=keep]
filter _raw_log contains "UTC"
|alter tmp_time = arrayindex(regextract(_raw_log ,"\:\s(\d{4}\s\w{3}\s+\d{1,2}\s\d{2}\:\d{2}\:\d{2})\sUTC"),0)
|alter _time=parse_timestamp("%Y %b %d %H:%M:%S",tmp_time)
|fields -tmp_time;
// Support only date time of format: yyyy MMM dd hh:mm:ss. For example: "2021 Jan 01 10:00:00".
filter _raw_log ~= "\:\s(\d{4}\s\w{3}\s+\d{1,2}\s\d{2}\:\d{2}\:\d{2})\sUTC"
| alter tmp_time = arrayindex(regextract(_raw_log ,"\:\s(\d{4}\s\w{3}\s+\d{1,2}\s\d{2}\:\d{2}\:\d{2})\sUTC"),0)
| alter _time=parse_timestamp("%Y %b %d %H:%M:%S",tmp_time)
| fields -tmp_time;