Splunk Search

Extract substring with mutiple [ in a string

rreddy
Observer

I have a String is in the pattern:

[substring1][substring2][substring3] Spark App State changed to FAILED. Total time taken is 10 minutes

I want to extract it into 4 fileds:

Field1 = substring1

Field2 = substring2

Field3 = substring3

Field4 = 10 

Please help.

Labels (3)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex "\[(?<field1>[^\[]+)\]\[(?<field2>[^\[]+)\]\[(?<field3>[^\[]+)\].*Total time taken is (?<field4>\d+)"
0 Karma
Get Updates on the Splunk Community!

.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 ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...