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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

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