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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...