I am searching for specific event codes in splunk, such that the first part of the message field starts with "A member was added to a security-enabled global group"
. After that, it has a whole lot more information which, for my purposes, I do not need to see. I tried the following searches however I am not getting the results I want.
This search made no changes to the message:
index="win_evt" EventCode=4728 | rex field=Message "(?<=A:)(?<Notes>.*)(?=.)" | table _time, Account_Name, Group_Name, Message, EventCode, Message
This search completely removed the message:
index="win_evt" EventCode=4728 | eval Message = trim(replace(Message,".*","")) | table _time, Account_Name, Group_Name, Message, EventCode, Message
This does nothing as well:
index="win_evt" EventCode=4728 | rex field=Message mode=sed "s/\..*$//" | table _time, Account_Name, Group_Name, Message, EventCode, Message
All I want is for the | table Message
to show is that first line.