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!

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