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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...