Alerting

How to search a log file in a path

syedikramulla
Explorer

Hello,

My application will generate a daily log file with the file name App_YYYYMMDD.log.  Example App_20220118.log, App_20220119.log.   I am trying to write a query which should return a table with single column having value as '0',  if the file for current week day is not generated.  The query should also have an condition to  wait for certain time before returning '0'. For example, let's say query should wait for 8 hours from the start of the day (12 AM) before returning the result.  Can you please share if you have written similar query.

 

Regards,

Syed

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Are you ingesting these logs?

Is it that you want to know at 8am, if a log for that day has been ingested?

If so, schedule a report to run at 8am and find the latest log name. This is often indexed as source. You can then extract the date from the source field and compare it today's date

0 Karma

syedikramulla
Explorer

Yes I am ingesting the log file contents and have a query to generate an alert if there's an error message in the log file.  Not sure if file name is also ingested.  Let me check that.

0 Karma
Get Updates on the Splunk Community!

Optimize Cloud Monitoring

  TECH TALKS Optimize Cloud Monitoring Tuesday, August 13, 2024  |  11:00AM–12:00PM PST   Register to ...

What's New in Splunk Cloud Platform 9.2.2403?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2403! Analysts can ...

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...