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!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...