Splunk Search

search in saved search result

ryastrebov
Communicator

Hello!
I have saved search for 8 days. I need upload search result to csv-file for several days. One day - one csv. I use loadjob command for get result of my savedsearch and I select a time interval of 1 day. But I get all result from my savedsearch. Why? How do I select the results of the data for each day?

Tags (2)
0 Karma
1 Solution

jonuwz
Influencer

Because when you use a timerangepicker, it tells the indexers what timerange to grab off the disks.

When you do a loadjob, it can't limit the search in that way, so all the data is returned.

If _time is saved in your saved search you can do something like :

... | where _time >= strptime("2013-01-30","%Y-%m-%d") AND _time < strptime("2013-01-31","%Y-%m-%d")

or, if you want to be relative ...

... | where _time >= relative_time(now(),"-3d@d")  AND _time < relative_time(now(),"-2d@d")

View solution in original post

jonuwz
Influencer

Because when you use a timerangepicker, it tells the indexers what timerange to grab off the disks.

When you do a loadjob, it can't limit the search in that way, so all the data is returned.

If _time is saved in your saved search you can do something like :

... | where _time >= strptime("2013-01-30","%Y-%m-%d") AND _time < strptime("2013-01-31","%Y-%m-%d")

or, if you want to be relative ...

... | where _time >= relative_time(now(),"-3d@d")  AND _time < relative_time(now(),"-2d@d")

ryastrebov
Communicator

Thank you!

0 Karma
Get Updates on the Splunk Community!

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...