I'm in the process of evaluating our log sources to figure out what we should be keeping and how to parse the data to get the results we need.
As an example, looking at Exchange logs, there's an event_id field with results like
RECEIVE
SUBMIT
SEND
DELIVER
AGENTINFO
FAIL
DROP
I want to view one or two raw events for each of the event_id values to see if they're significant enough to keep and/or parse in our searches.
Is there a way to do this? I've tried searching in Splunk Answers but haven't found any questions similar to this one - apologies if I've missed it.
Can't figure out how to select a comment as an answer, but it was provided by @renjith.nair:
For multiple results per event_id:
"your base" | top 10 _raw by event_id
Or just the first result:
"your base" | first(_raw) as raw by event_id
Can't figure out how to select a comment as an answer, but it was provided by @renjith.nair:
For multiple results per event_id:
"your base" | top 10 _raw by event_id
Or just the first result:
"your base" | first(_raw) as raw by event_id
@browncardigan ,
Are you looking for something similar to below ?
"your base search"|stats first(_raw) as _raw by event_id
That's a neat workaround, but if possible I'd prefer to get a bigger sample size for each event_id. It doesn't look like either first() or last() take any arguments - I don't suppose you'd know how to get around that?
"your base" | top 10 _raw by event_id ?
where 10 can be replaced by any number
Ah, yeah that worked perfectly, thanks so much for your help!