Splunk Search

How to do a time based search for router logs?

salmanrc
New Member

Hello,
I am new to Splunk, so trying to get familiarize with it. I want to do a time based search for router logs, for example.

I have a Syslog A and a syslog B. Trying to do a search such that the search should show results if Syslog B occurred within 60 mins of Syslog A.

Any help is appreciated. thanks

0 Karma

cmerriman
Super Champion

what version of Splunk are you on? 6.5 has a new option for streamstats called time_window that allows you to look at a window of time (in your case, 1 hour) and you can group events together that way.

maybe something like (depending on your data): |sort 0 _time|streamstats values(syslogA) as syslogA by syslogB time_window=60m

https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Streamstats

0 Karma

salmanrc
New Member

we have 6.5.2, so will give it a try, thanks for the reply.

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...