Splunk Search

How can I extract this string from a value in my sample log?

rakeshkumar_sah
New Member

Hi,

I have logs followed with a structure like this:

start Performance Logging: [txID=123456789-EJBClientf123456789-EJBServerf12456789;funtion=getClientValue]

How can I extract the EJBServerf12356789 values from txID?

Thanks for the response.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Rex can do the job. The following will break the txID field into three parts which you can then process.

... | rex field=txID "(?P<txID1>.*)-(?P<txID2>.*)-(?P<txID3>[^;]*)" | ...
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Why You Can't Miss .conf25: Unleashing the Power of Agentic AI with Splunk & Cisco

The Defining Technology Movement of Our Lifetime The advent of agentic AI is arguably the defining technology ...

Deep Dive into Federated Analytics: Unlocking the Full Power of Your Security Data

In today’s complex digital landscape, security teams face increasing pressure to protect sprawling data across ...

Your summer travels continue with new course releases

Summer in the Northern hemisphere is in full swing, and is often a time to travel and explore. If your summer ...