Splunk Search

How to get a string from the INFO statement with an error response in Splunk

baburao123
New Member

Hello,
I need to get a string which is available in the INFO statement whenever there is an Warning statement in the log.

Example of Info Statement:
2018-03-19/11:12:24.502+0100 : INFO [ajp-nio-******][MESSAGE ID:***********] [ExiDecodingFilter] [ACTOR:*******] Payload decoded: ..................
**Example of Warning Statement:

2018-03-19/11:12:24.598+0100 : WARN [ajp-nio-******][MESSAGE ID:********] [AbstractService] [ACTOR:*********] Imsi not found in DB. CANNOT trigger garage process!

Requirement:
The "Message ID" and "ACTOR" remain the same in this case.
My requirement is to get the produce the "IMSI" which is not present in the WARN statement but available in the INFO statement.

Is it possible. Please help me out.

0 Karma

baburao123
New Member

Example INFO statement:
2018-03-19/11:12:24.502+0100 : INFO [ajp-nio-******][MESSAGE ID:***********] [ExiDecodingFilter] [ACTOR:*********] Payload decoded: p0:IMSI=.....

0 Karma

p_gurav
Champion

Try using Transaction command :
| transaction maxspan=1s Message_ID | rex field=_raw "IMSI=(?P\d+)"

0 Karma

baburao123
New Member

Thanks Gaurav.
But I want to first look into the Error message (WARN) and then check the IMSI data consecutively from the Request (INFO) which was sent earlier. Something like reverse engineering.

For this, I need to first check the response with the string "Imsi not found in DB. CANNOT trigger garage process!" and then extract the IMSI data from the relevant requests either using the ACTOR or the Message ID which is common across the complete communication flow.

0 Karma

p_gurav
Champion

Can you try putting in |search "*WARN*" after transaction command which will give only those transactions who has warning messages?

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!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...