Security

How do I find the first firewall entry?

nick598660
New Member

Hello Everyone,

I need some help figuring out how far back my firewall logs go. If I set the time picker to "All Time", and just search for Cisco ASA, I get 20 pages of events from today.

Any ideas on how I can locate when I first started getting logs into Splunk from my firewall?

Tags (2)
0 Karma
1 Solution

whrg
Motivator

Hello @nick598660,

You can use the metadata command to list the timestamps of the first event and of last the event for a list of sourcetypes/hosts/sources.

Try something like this:

| metadata type=sourcetypes index=YOURINDEX
| rename firstTime as "First Event" lastTime as "Last Event" recentTime as "Last Update"
| fieldformat "First Event"=strftime('First Event', "%c") | fieldformat "Last Event"=strftime('Last Event', "%c") | fieldformat "Last Update"=strftime('Last Update', "%c")

The web page under Settings / Indexes also lists the earliest event and the latest event for each index.

If the log volume is not too big, then you could also run a simple tail command to retrieve the first event. Set the time picker to "All Time":

index=YOURINDEX sourcetype=YOURSOURCETYPE | tail 1

View solution in original post

0 Karma

whrg
Motivator

Hello @nick598660,

You can use the metadata command to list the timestamps of the first event and of last the event for a list of sourcetypes/hosts/sources.

Try something like this:

| metadata type=sourcetypes index=YOURINDEX
| rename firstTime as "First Event" lastTime as "Last Event" recentTime as "Last Update"
| fieldformat "First Event"=strftime('First Event', "%c") | fieldformat "Last Event"=strftime('Last Event', "%c") | fieldformat "Last Update"=strftime('Last Update', "%c")

The web page under Settings / Indexes also lists the earliest event and the latest event for each index.

If the log volume is not too big, then you could also run a simple tail command to retrieve the first event. Set the time picker to "All Time":

index=YOURINDEX sourcetype=YOURSOURCETYPE | tail 1
0 Karma

nick598660
New Member

That is exactly what I was looking for. Thank You!

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...