Splunk Search

What is the regular expression to extract "java.net.SocketTimeoutException: Read timed out" from my raw event?

sravankaripe
Communicator

please help me with rex
i want to retrieve java.net.SocketTimeoutException: Read timed out from below _raw

"msgContentType":"java.net.SocketTimeoutException: Read timed out"
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi sravankaripe
try

\"msgContentType\"\:\"(?<your_field>[^\"]*)

see at https://regex101.com/r/eNg0P0/1
Bye.
Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi sravankaripe
try

\"msgContentType\"\:\"(?<your_field>[^\"]*)

see at https://regex101.com/r/eNg0P0/1
Bye.
Giuseppe

0 Karma

sravankaripe
Communicator

in the same event i have one more
"msgContentType":"Exception occured Retirement Audit Rest service"

it is retriving "Exception occured Retirement Audit Rest service"

whai need is "java.net.SocketTimeoutException: Read timed out"

0 Karma

sravankaripe
Communicator

what* need is "java.net.SocketTimeoutException: Read timed out"

0 Karma

gcusello
SplunkTrust
SplunkTrust

try this
\"msgContentType\":\"(?java[^\"]*)
see https://regex101.com/r/eNg0P0/2
Bye.
Giuseppe

0 Karma

sravankaripe
Communicator

sry not working

0 Karma

gcusello
SplunkTrust
SplunkTrust

Can you share some example of your logs, to detail the regex?
because as you can see in regex101 it seems to work..
Bye.
Giuseppe

0 Karma

sravankaripe
Communicator

i have one more content in same event.
i think will it helps you i think to retrive
java.net.SocketTimeoutException: Read timed out

"msgQueryString":"com.wm.app.b2b.server.ServiceException: java.net.SocketTimeoutException: Read timed out\n\

0 Karma

gcusello
SplunkTrust
SplunkTrust

try now

\"[^\"]*\"\:\".*\s(?<your_field>java[^\"]*)

see https://regex101.com/r/eNg0P0/3

Bye.
Giuseppe

0 Karma

sravankaripe
Communicator

got it thanks

0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Reprocessing XML into Fixed-Length Events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

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