Getting Data In

Search for logs before and after given timestamp

ryanholland
Explorer

I would like to be able to provide a timestamp and have splunk return the log nearest/before the timestamp and nearest/after the timestamp, essentially bookending the provided timestamp.

The use case is that a report is given to me with an "event" occurring at a give timestamp. I want to search and find the authentication "start" and authentication "stop" messages for the device/user associated with the event that encompass the timestamp.

Ideas?

0 Karma

Ayn
Legend
0 Karma

Ayn
Legend

If it's not so much a matter of getting events based on time, but rather the IP address, it sounds like a subsearch could be more useful? http://docs.splunk.com/Documentation/Splunk/5.0.2/Tutorial/Useasubsearch

0 Karma

ryanholland
Explorer

Looked over localize, but I'm not sure how to get what I need. Use case is I'm given an IP Address and a timestamp for an event. I then have user logon/logoff logs that have the IP address. So, with the given information, I need to find the associated logon and logoff log that bookmarks the provided timestamp for that IP.

Does this make sense? How can I get this, using localize+map commands or any other means?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...