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!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...