Splunk Search

How to extract a value into a field from a string?

lavasi
New Member

I have this string :
Leaving className=com.vsp.il.drools.business.spring.SpringRulesBusinessImpl. processRequest(com.vsp.claim.validatedclaim.service.limitation.model.ServiceLimitationValidationRequest@5462cb51):runningtime=4ms.

I want to chart the time consumption per ruleset where ruleset is ServiceLimitationValidation

I am new to splunk and I am thinking I need to use regex and a timechart to get there. But I am not able to get the correct syntax.

Appreciate any help !

0 Karma

richgalloway
SplunkTrust
SplunkTrust

This should get you started. It puts 'ServiceLimitationValidationRequest' into field 'ruleset' and '4' into field 'runningtime'.

your base search | rex "processRequest\(.*?(?<ruleset>\w*)@.*\):runningtime=(?<runningtime>\d+)" | ...
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...