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!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...