Splunk Search

anonymized data

gregwilliams
Path Finder

We are conducting a study in our organization surrounding productivity and user behavior. Currently I'm receiving all firewall logs which is logging all user activity. The people who are conducting the study want to see traffic for one week and then send out an email reminding them to only use the internet for business purposes. This data needs to be anonymized, but not completely anonymized.

I am using sed to replace src=111.222.333.444 with src=############, but was wondering if there is anyway to replace the src=111.222.333.444 with something isn't completely randomized, for example, change the 444 into aaa so we can track whether or not productivity increases and random traffic decreases after we send the nice email out.

Tags (2)

Ron_Naken
Splunk Employee
Splunk Employee

This should change the last octet to aaa for an IP address:

| rex field=src mode=sed "s/(\d+\.)(\d+\.)(\d+\.)(\d+)/\1\2\3aaa/g"
Get Updates on the Splunk Community!

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 ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...