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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...