Hello Splunkers!!
Below are the sample events I have in which I want to mask UserID field and Password field. There is no selected & interesting field is availble. I want to mask it from the raw event directly. Please suggest me solution from the UI by using rex mode command and second solution by using the Props & transforms.conf from the backend .
@ITWhisperer @scelikok I created below two regex and I think it is working fine from UI.
| rex field=_raw mode=sed "s/Password\>([A-Za-z0-9]+)/Placeholder/g"
| rex field=_raw mode=sed "s/UserId\>([A-Za-z0-9]+)/UserID/g"
One question, shall I apply in the same regex in transforms.conf ?
Hi @uagraw01,
You can also use Ingest Actions on UI.
https://docs.splunk.com/Documentation/Splunk/9.2.1/Data/DataIngest#Mask_with_regular_expression
rex has a mode option which can be set to sed to allow for edits to strings
props.conf has SEDCMD- stanzas which can do the editing before indexing