Splunk Search

rex on rex101 works fine...Splunk returns a blank

he204035
Explorer

I have a rex built that when plugged into rex101 works fine, but when applied via a Splunk query, returns a blank result.

Text:

2022/02/01 23:07:26.979 [ERROR] [nrfClient.Discovery.nrf] Message send failed, response [Type:ABC Http2_Status:404 CauseCode:"CONTEXT_NOT_FOUND" RetryExhausted:true MsgType:1434 ServiceName:nabc SelectedProfileName:"abc-profile" FailureProfile:"FHABC" GroupID:"ABC-*" ]

 

rex:

Http2_Status:\d{3}\sCauseCode:\"(?<Error2>\w+)\"\s

 

rex101 result:

CONTEXT_NOT_FOUND

 

But when plugged into Splunk, it comes back with a blank result.  

Labels (1)
0 Karma

he204035
Explorer

When I paste into Notepad, it just prints as one long line, nothing weird showing up.  Maybe I need to try to do a split instead.  It's just that the "Http2_status" doesn't always show up in the same place in the log outputs.

0 Karma

he204035
Explorer

Error2 just shows up blank.  

he204035_1-1643815175891.png

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Something in your _raw field does not match the regex - can you paste the _raw field into a code block </> or something like notepad to ensure there are no gotchas e.g. null bytes, tabs in stead of spaces, extra spaces, etc.

0 Karma

he204035
Explorer

Using Splunk Enterprise 8.1.5

0 Karma

he204035
Explorer

Splunk Enterprise version 8.1.5

0 Karma

he204035
Explorer

Splunk Enterprise

Version:8.1.5

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The rex works in splunk also

ITWhisperer_0-1643757518589.png

Which version of splunk are you using?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...