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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...