Getting Data In

How to mask the verificaition code using props and transforms

abhi04
Communicator

How can I mask the verfiication code using props/transforms?

{"body": " Verification Code: 123456",

 

I want to mask the code using props and transforms using below format, not sure how the search spl regex is different than regex in transforms

props.conf

[source::abc]
TRANSFORMS-anonymize = abc-anonymizer

transforms.conf
[abc-anonymizer]
DEST_KEY = _raw
REGEX = 
FORMAT = $1######$2

 

 

 

 

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Why use both props AND transforms when you can do it with just props?

[source::abc]
SEDCMD-anonymizer = s/Verification Code: \d+"/Verification Code: ######/g
---
If this reply helps you, Karma would be appreciated.

View solution in original post

abhi04
Communicator

Thanks @richgalloway  and @gcusello 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @abhi04 ,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated by all the contributors 😉

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @abhi04 ,

I usually use the solution with SEDCMD hinted by @richgalloway .

Anyway, also the solution with props amd transforms should run:

props.conf

[source::abc]
TRANSFORMS-anonymize = abc-anonymizer

transforms.conf
[abc-anonymizer]
DEST_KEY = _raw
REGEX = Verification Code:\d+ 
FORMAT = Verification Code:######

Ciao.

Giuseppe

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Why use both props AND transforms when you can do it with just props?

[source::abc]
SEDCMD-anonymizer = s/Verification Code: \d+"/Verification Code: ######/g
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

New Case Study Shows the Value of Partnering with Splunk Academic Alliance

The University of Nevada, Las Vegas (UNLV) is another premier research institution helping to shape the next ...

How to Monitor Google Kubernetes Engine (GKE)

We’ve looked at how to integrate Kubernetes environments with Splunk Observability Cloud, but what about ...

Index This | How can you make 45 using only 4?

October 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...