Splunk Search

Search Help

rtmcdonald
Explorer

Example communication log below:

05/03/2011 20:08:56, Port 4, TUL552189 ,WS=eLyn00f8, * Communication Link Failed

05/03/2011 20:08:56, Port 4, ST_013 ,WS=eLyn00e5,COM4:9600 N 8 1 Lt=0 Tout=10 Retry=2, Upload

05/03/2011 20:08:57, Port 1, ROSETTACPP,WS=eLyn00e2, -OK Number of bytes = 1273

05/03/2011 20:08:57, Port 2, PEOK014 ,WS=eLyn00e3, -OK Number of bytes = 929

05/03/2011 20:08:57, Port 5, TUL552200 ,WS=eLyn00f9, -OK Number of bytes = 524

05/03/2011 20:08:57, Port 3, WTGLA101 ,WS=eLyn00e4, -OK Number of bytes = 340. The size of uncompressed data is 604.

05/03/2011 20:08:57, Port 5, RH28FC1 ,WS=eLyn0081,COM5:9600 N 8 1 Lt=0 Tout=10 Retry=2, Upload

I'm trying to create an alert that will look for and entry "Communication Link Failed" and send an alert when there is an entry with "uncompressed data" within 5 seconds.

I've looked at transactions, but everything I tried didn't seem to work.

Thanks in advance!

-Ryan

Tags (3)
0 Karma

Ayn
Legend

You should be able to achieve what you want using transaction. If you have one or more common field values to the events you want to group together it's desirable to tell transaction to use these fields. For instance you could use sourcetype and then define a transaction that has a timespan of 5 seconds and starts with "Communication Link Failed". After that you can search for the resulting transactions that include an entry with the text "uncompressed data".

<yourbasesearch> 
| transaction sourcetype maxspan=5s startswith="Communication Link Failed" 
| search "uncompressed data"

gkanapathy
Splunk Employee
Splunk Employee

I would recommend this be done using a realtime search as well, perhaps over the last 30 seconds or so.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...