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!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...