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!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...