Splunk Search

match data from 2 queries


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

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>
Did you miss .conf21 Virtual?

Good news! The event's keynotes and many of its breakout sessions are now available online, and still totally FREE!