Splunk Search

What is the easiest way to find log lines preceding an error?

thesteve
Path Finder

I ran a search and noticed something unexpected in my results. Of course the error I saw was not an informative one, so I wanted to scroll up in the log a little to find what happened just prior to that event being logged.

I was able to get it done by searching on index and source on a timestamp range, but it struck me that there should be a quick and easy way to "see 20 prior log lines" or "see data from this source X seconds prior to this entry".

If not, is there a way for me to define an action like that?

Tags (1)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

You can click the "Show source" workflow action to do just that.

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

You can click the "Show source" workflow action to do just that.

thesteve
Path Finder

Got it. Thanks!

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Click the triangle to the left of the event in question and select "show source". In case of Splunk 6, you need to press "event actions" in between those two steps.

http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/CreateworkflowactionsinSplunkWeb#Contro...

thesteve
Path Finder

I must be blind. I'm staring at the screen and I don't see it. where is it exactly?

0 Karma
Get Updates on the Splunk Community!

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 ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...