Splunk Search

Can you help me break my search up into two smaller ones?

bealm
New Member

I have a query that is taking up too many resources I am told. I decided to break it up into two smaller reports (one for the first 12 hours yesterday, one for the last 12 hours yesterday).

How do I add this to the query without using the drop down options or manually changing the period of time? Current report:

index=main source="/var/log/bwi/lanwan" VIP="*prod*" VIP=*etw* CN="*" | rex field=_raw "(^.*protocol=|^.*\s(via).*\snegotiated\sProtocol\s)(?<Protocol>.*?)\s(cipher=|with\sCipher\s)(?<Cipher>\w+-*\w*)" | dedup CN | rename CN AS PropertyNumber, OU AS PropertyName | eventstats max(time_in_sec), min(time_in_sec) avg(time_in_sec), first(_time) as latest_time by PropertyNumber | table PropertyNumber,PropertyName,Protocol,Cipher,_time
Tags (1)
0 Karma

mstjohn_splunk
Splunk Employee
Splunk Employee

hi @bealm,

Did the answer below solve your problem? If so, please resolve this post by approving it! If your problem is still not solved, keep us updated so that someone else can help ya. Thanks for posting!

0 Karma

cmerriman
Super Champion

you should just be able to do earliest=-1d@d latest=-1d@d+12h and earliest=-1d@d+12h latest=@d in the base search for the two separate searches

0 Karma

bealm
New Member

I am awaiting my team to introduce this as a solution -- I believe strongly it will work but I may not know for a day or so... when I find out that it has worked I will complete this properly.. I would like to leave it open for now

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

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