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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...