Splunk Enterprise Security

I need to get the very oldest log event displayed on a dashboard , any tricks to speeding this up?

daniel333
Builder

All,

I need to make a dashboard providing evidence of compliance for our auditors. I was going to use the tail command but it's VERY slow even with the fact I only have a few hundred megs of data right now. Any tricks here to speed this up?

index=os source=/var/log/secure | table _raw | tail  1
0 Karma
1 Solution

masonmorales
Influencer
 index=os source=/var/log/secure  | stats earliest(_raw) as _raw

View solution in original post

FrankVl
Ultra Champion

Do you need the actual event itself, or just the timestamp of the oldest event?

For the latter, a | metadata search would be most efficient I guess. So something along the lines of:

| metadata type=sources index=os source=/var/log/secure 
| table firstTime,source 
| convert ctime(firstTime)
0 Karma

daniel333
Builder

I actually need the entire event actually. But good call on the metadata command. Cool stuff.

0 Karma

masonmorales
Influencer
 index=os source=/var/log/secure  | stats earliest(_raw) as _raw

adonio
Ultra Champion

start by tailing before tableing
you are passing all the events in the world through the table command only to look for the last one

 index=os source=/var/log/secure 
    | tail  1
    | table _raw
0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...