Splunk Search

how to mask data in data model?

viswanathsd
Path Finder

Sample:
1234/rani/abc1234/dfh
Need to get output as */rani/*/dfh

Tags (1)

sgundeti
Path Finder

you can refer here, using SEDCMD , REGEX in props.conf and transforms.conf file in $SPLUNK_HOME/etc/system/local/ directory

http://docs.splunk.com/Documentation/Splunk/6.2.1/Data/Anonymizedatausingconfigurationfiles

0 Karma

viswanathsd
Path Finder

Thanks for your response.But i need to know,how can I implement this in Data MOdel?

0 Karma

MuS
SplunkTrust
SplunkTrust

Like @Ayn wrote, use an eval expresion in your data model. Look at the docs for more details http://docs.splunk.com/Documentation/Splunk/6.2.1/Knowledge/Definedatamodelattributes

0 Karma

Ayn
Legend

Use an eval expression. Something like this should do it.

replace(yourfield,"([^/]+)/([^/]+)/([^/]+)/([^/]+)","*/\2/*/\4")

mrobichaud_splu
Splunk Employee
Splunk Employee

To make this work via "add eval", you'd need to create a new field with a different name in the data model and hide the old field. The display name can be whatever you'd like.

Another option is to do that eval in a root search -> Add object -> Root search.

0 Karma

viswanathsd
Path Finder

1234 should be replace by wild character

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...