Getting Data In

Question about time searches

Antioch
Path Finder

Hello splunk community, I'm brand new at using the software and I seem to run into a point that I cant find any documentation to cover. Basically what I'm trying to do is create a search string that pulls logons before a certain time and after a certain time, and that also pulls all logins on Saturday and Sunday. In the search manual and in the search reference I found the search terms earliestand latest, but these correspond to when the search was run, not the actual time of the log. Can anyone give me a hand with this?

Tags (3)
0 Karma
1 Solution

sdaniels
Splunk Employee
Splunk Employee

It sounds like you want to do something like this:

http://splunk-base.splunk.com/answers/54981/specify-a-time-window-to-search-during-non-business-hour...

The time modifiers will apply to the timestamp for your actual events. Therefore, you can specify a search with earliest=-2d@d latest=-1d@d to only look at data based on your search for 2 days ago only or earliest=@w0 to search events since the beginning of the current week.

http://docs.splunk.com/Documentation/Splunk/5.0.3/SearchReference/SearchTimeModifiers

View solution in original post

0 Karma

sdaniels
Splunk Employee
Splunk Employee

It sounds like you want to do something like this:

http://splunk-base.splunk.com/answers/54981/specify-a-time-window-to-search-during-non-business-hour...

The time modifiers will apply to the timestamp for your actual events. Therefore, you can specify a search with earliest=-2d@d latest=-1d@d to only look at data based on your search for 2 days ago only or earliest=@w0 to search events since the beginning of the current week.

http://docs.splunk.com/Documentation/Splunk/5.0.3/SearchReference/SearchTimeModifiers

0 Karma

Antioch
Path Finder

That's exactly what I was looking for thanks!

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