When files go missing on Servers apps can crash and time can be spent trying to find the files that went missing. This Monitory Policy was created for such a case where the admin needs to know when important files are deleted that cause app instability.
NOTE: the method shown in this Monitor Policy can be adapted for any other Command Line or Batch file scripted checks as needed.
A Command Metric was created and used in a Policy to find if a file exists or not. If not, alerts are enabled, and you can also add additional tasks, such as Email alerts. This policy was Exported and attached to this KB.
The command checks:
We used a test file named MonitorFile.log on the root of C:\. Change this as needed.
To Import the attached XML file: