Splunk Search

match data from 2 queries

mcafeesecure
Explorer

I have some log entries that look like this:

(note the brackets ARE in my logs)

[10/25/2010] [10:25:31.817] [SCAN_HISTORY][WARN ][START][unique ID number][ip.add.re.ss OR domain.name][service name]
[10/25/2010] [10:25:31.817] [SCAN_HISTORY][WARN ][DONE][unique ID number][ip.add.re.ss OR domain.name][service name]

What I need to look for is.. Any [unique ID number] that has a "[START]" entry, but NO "[DONE]" entry.. AND any "[DONE]" entry after a certain time.

I can parse out the "STATUS" (ie, done, start), but can not figure out how to combine the entries to eval against each other.

Tags (1)
0 Karma

Stephen_Sorkin
Splunk Employee
Splunk Employee

I'll assume that you mean "OR" rather than "AND" between the two conditions on the done key. I'll also assume that records either have one or no done statuses. You can search like:

... | stats values(status) as status range(_time) as time_range by unique_id | search status!=DONE OR time_range > <certain time>
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...