Alerting

Monitor and generate alert if no changes are made to a monitored file

mdzmuran
Observer

A monitored file changes very frequently. If no new change occurs during a specified interval, it means that the process which makes changes to the log file is down. This can be used to monitor if the process is alive. How can I monitor and generate alert on an event "no changes made to monitored file during nnn minutes"?

Tags (3)
0 Karma
1 Solution

whrg
Motivator

Hello @mdzmuran,

When you say "no changes made", does that mean no events are being indexed into Splunk?

How about you count the number of indexed events for your particular log file for the last 15 minutes:

index=YOURINDEX source=YOURFILE | stats count

If the count is 0 then I assume the process is down. Save this search as an alert with the custom trigger condition "search count = 0"

View solution in original post

0 Karma

whrg
Motivator

Hello @mdzmuran,

When you say "no changes made", does that mean no events are being indexed into Splunk?

How about you count the number of indexed events for your particular log file for the last 15 minutes:

index=YOURINDEX source=YOURFILE | stats count

If the count is 0 then I assume the process is down. Save this search as an alert with the custom trigger condition "search count = 0"

0 Karma

whrg
Motivator

Which operating system are you using?

0 Karma

mdzmuran
Observer

The monitored files are on a UNIX machine. The directories are accessible from a Windows machine with Splunk Forwarder (UNC is used in Spunk directory definition). Splunk Forwarder monitores these files, it is working now and communicating with Splunk Free (at this moment). So monitoring files works, I can check for errors, generate alerts on errors, etc. And I want to check an event "nothing happens to the files".

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...