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!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...