Getting Data In

splunk rename source

SS1
Path Finder

I have my source name as below, the 'user' field keeps on updating

E:\test\Apps\path\EventLogs\MemoCPU\user-MemoCPU.log

I don't want to display the entire path but just want user-MemoCPU as source, can we achieve it?

0 Karma

manjunathmeti
Champion

You can extract using rex command:

| makeresults 
| eval source="E:\test\Apps\path\EventLogs\MemoCPU\user-MemoCPU.log" 
| rex field=source "(?<source>[^\\\\]+)\.log$"

 

If this reply helps you, an upvote/like would be appreciated.

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