Splunk Search

Masking an email address at the search head level

joe06031990
Communicator
  • Good afternoon,
  • I am trying to Masking an email address at the search head level I have tried using Rex and sed but can’t get it to work, does anyone have any examples?
  •  
  • thanks 
  •  
  • Joe 
  •  
Labels (2)
Tags (1)
0 Karma

to4kawa
Ultra Champion

https://community.splunk.com/t5/Getting-Data-In/Anonymize-data-from-JSON-File/td-p/502195?childToVie...

how about my updated answer? or

| makeresults
| eval _raw="2020-07-06 sender=foo@bar.com recipient=baz@bar.co.jp subject=\"test only\""
| rex mode=sed "s/[\w\-\.]+@[\w\-\.]+/XXXXX/g"
0 Karma

joe06031990
Communicator

Thanks for your reply, is their a regex I could use? As this is only at the search head level.

0 Karma

to4kawa
Ultra Champion

@joe06031990     I'm not sure what you say "search head level".

1. If you want to mask logs, see my link and try logic.

2. If you want to mask on dashboard, try rex

0 Karma
Get Updates on the Splunk Community!

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...