Setting an alert for the On-Premises Monitor that isn't writing files to Activity folder

For OnPrem customers which use Insights (IOP), their Monitor generates files into the Activity files folder and then they get indexed into the IOP database. In case the monitor stops exporting real time data files, we offer an alert which can be setup (for hybrid cloud customers we have such alert defined on our side which alerts when the monitor stops uploading data).

The following script / scheduled task will send an e-mail alert to pre-configured recipients. 

In order to define the alert (scheduled task) which will run every 30 minutes, and will execute the script with a delay of 45 minutes, please follow these steps:

  1. Please download the PowerShell script that is attached to the bottom of this article. (name: activity_files_health.ps1)
  2. Place the script on the machine where the Activity Files Shared Folder is located. 
  3. NOTE: by editing it with notepad++ for example, you can read the script's help and examples. (or Get-help in PS)
  4. Open Task Scheduler > create new scheduled task as the example below:
    • Define a name 
    • Run after user logon (Run whether user logged on or not)
    • Run with highest privileges

2018-07-31_1347.png

  • Set a daily schedule to repeat every 30 minutes

2018-07-31_1346_001.png

2018-07-31_1347_001.png

  • Define an action which will start PowerShell.exe
  • Add an argument (which explained below)
  • Add start path

2018-07-31_1346.png

  • In the actions tab, the argument field is very important. As you can see in the argument, the script is located in c:\code, the path may change according to your setting
  • If you look at the argument, in the powershell script help\example -  
    • The delay is 45 minutes, the address from and to are defined and the subject of the email is also there and can be defined as you like, and finally you define which SMTP server to use. (if user and password is needed, in the script you will find an example with that syntax).

2018-07-31_1347_002.png

  • Define the conditions according to your needs

2018-07-31_1345_001.png

  • Define the settings according to your needs

2018-07-31_1345.png

An event in the event viewer is written (successful and when there was an issue) in the application log.

2018-07-31_1158.png2018-07-31_1158_001.png

 

 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request
Powered by Zendesk