Splunk Search

how to write rex for my use case

sravankaripe
Communicator

i want to retrive

BLOCKED_PARENT (This item is blocked because its parent cannot syndicate.) message from the below raw event. Please help me with this.

SC TYPE: BLOCKED_PARENT (This item is blocked because its parent cannot syndicate.)n*SC*

Tags (2)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Try this

rex "(?<msg>BLOCKED_PARENT \(.*\))"
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Try this

rex "(?<msg>BLOCKED_PARENT \(.*\))"
---
If this reply helps you, Karma would be appreciated.

cpetterborg
SplunkTrust
SplunkTrust

In case there is another set of parentheses in the even:

rex "(?<msg>BLOCKED_PARENT \([^\)]*\))"

And if you only want the message part of the BLOCKED_PARENT message:

rex "BLOCKED_PARENT\s+\((?P<message>[^\)]*)"
Get Updates on the Splunk Community!

Get Schooled with Splunk Education: Explore Our Latest Courses

At Splunk Education, we’re dedicated to providing incredible learning experiences that cater to every skill ...

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...