Splunk Search

How to retrieve latest log using aplunk query

pratap924
New Member

We need to create a splunk alet to get the total number of products processed as part of Job execution. But below three logs are indexing during diff.time intervals with same logging information. Could you please help me to retrieve the latest log i.e, Wed May 14 11:01:00 EDT log data.

Wed May 14 11:01:00 EDT 2014|INFO|com.macys.seo.monitor.JobMonitor|printJobProgress:22|SEO_JOB_MONITOR >>>>>>> Processed 129,442 products out of 129,442 products <<<<<< |ScheduledExecutorFactoryBean-1
Wed May 14 10:31:00 EDT 2014|INFO|com.macys.seo.monitor.JobMonitor|printJobProgress:22|SEO_JOB_MONITOR >>>>>>> Processed 94,812 products out of 129,442 products <<<<<< |ScheduledExecutorFactoryBean-1
Wed May 14 10:00:59 EDT 2014|INFO|com.macys.seo.monitor.JobMonitor|printJobProgress:22|SEO_JOB_MONITOR >>>>>>> Processed 40,890 products out of 129,442 products <<<<<< |ScheduledExecutorFactoryBean-1

Tags (1)
0 Karma

MuS
Legend

Hi pratap924,

you could do something like this:

 com.macys.seo.monitor SEO_JOB_MONITOR | tail 1

this will search for com.macys.seo.monitor and SEO_JOB_MONITOR and returns the last one found.

hope this helps ...

cheers, MuS

0 Karma
Get Updates on the Splunk Community!

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

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...