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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...