Hello,
I'm monitoring Windows File integrity and I want to replace some return carriage and tab that are present in the value of the field.
- Field:
winlog.event_data.AccessList
- Value:
%%1537
%%1538
%%1541
%%4423
- Target value:
%%1537 - %%1538 - %%1541 - %%4423
- My filter:
filter {
if [winlog][event_data][AccessList] {
mutate { gsub => [ "winlog.event_data.AccessList", "\\n\\t\\t\\t\\t", " - " ] }
mutate { gsub => [ "winlog.event_data.AccessList", "[\n\t\t\t\t]", " - " ] }
mutate { gsub => [ "winlog.event_data.AccessList", "\n\t\t\t\t", " - " ] }
mutate { gsub => [ "winlog.event_data.AccessList", "
", " - " ] }
}
}
I've tried the 4 mutate lines with gsub but none of them works.
Additionnal info
I'm currently moving from previous Log solution (graylog) and this was how I did:
rule "Winlogbeat - File Monitoring - replace tab and carriage return by simple space"
when
has_field("winlog_event_data_AccessList")
then
let repl_carr = regex_replace("
", to_string($message."winlog_event_data_AccessList")," - ",true);
set_field ("winlog_event_data_AccessList", repl_carr);
end
Thank you for the help !