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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...