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:
- Please download the PowerShell script that is attached to the bottom of this article. (name: activity_files_health.ps1)
- Place the script on the machine where the Activity Files Shared Folder is located.
- NOTE: by editing it with notepad++ for example, you can read the script's help and examples. (or Get-help in PS)
- 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
- Set a daily schedule to repeat every 30 minutes
- Define an action which will start PowerShell.exe
- Add an argument (which explained below)
- Add start path
- 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).
- Define the conditions according to your needs
- Define the settings according to your needs
An event in the event viewer is written (successful and when there was an issue) in the application log.