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!

Exciting News: The AppDynamics Community Joins Splunk!

Hello Splunkers,   I’d like to introduce myself—I’m Ryan, the former AppDynamics Community Manager, and I’m ...

The All New Performance Insights for Splunk

Splunk gives you amazing tools to analyze system data and make business-critical decisions, react to issues, ...

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...