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!

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

Splunk Observability for AI

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