Adding File Monitoring Template
You can now track changes on critical system and user files and be notified if a specific change occurs.
E.g. If you want to get notified about an increase in a file's size, you can configure an appropriate file monitoring template with a file size monitor and apply the same to devices in which you want the files monitored.
Using file monitoring, you can monitor the following parameters on Windows/ WMI based devices:
- File Content: Presence of a word/string or in a log file (Supports RegEx too)
- File size: Monitor increase or decrease in the size of the file
- Presence of a file: Check the availability of a file in the specified directory (to check if it has been moved, renamed, or deleted)
- File age: Keep track of the age of a file and take actions based on its age
- File modification: Get notified if a file has been modified
Steps to configure a file monitoring template
- Go to Settings → Monitoring → Files.
- Click New Template. Add New Template page opens.
- Configure the following fields:
- Template Name: Configure a name for the template.
- File Path: Specify the path in which OpManager should locate the file.
- Polling Interval: Configure the interval at which OpManager should monitor the file.
- Description: Provide a brief, meaningful description for the template.
- If you wish to associate the monitor to existing devices, click on Save & Associate. This option will prompt you to select the required devices to which the monitor must be associated. Select the required devices and click on Save.
- If you wish to only add the monitor ( and not associate it to any of the existing devices ), click on Save.
Configuring Alerts for File Monitors
Configure the monitoring criteria based on which you want to be notified:
- File Contains: To monitor if a word/string is being printed in a log file, you have to install OpManager's log file monitoring agent in the end server/device where the application is running. Once you install the agent, it looks for the specified string in the said log file. If the word/string is printed in the log file, OpManager raises an alert. If required, you can configure the agent to match the case when searching for the word/string, and also to notify the admin if the alert is raised for a certain number of times.
Click here to know more on this type of monitor and the prerequisites to be satisfied for log file monitoring.
- File Existence: OpManager looks for the file in the specified path and alerts based on the conditions specified. You can configure to be notified if the file does not exist in the path specified, or be notified if the file exists, or you can choose not to monitor. Also, you can choose the severity that you would like to assign to this alert. The notification can be triggered if the alert condition is met for a predefined number of times. That is, OpManager alerts you if a particular file exists/ is unavailable in a path during two consecutive polls.
- File Size: Configure OpManager to alert you if the file size goes over, or comes below a specified size. Select the relevant threshold for alerting. You can configure the size in terms of bytes, KB, MB, or GB, and you can also choose the severity that you would like to assign to this alert. The alert can be triggered if the threshold is violated a specified number of times.
- File Age: Similarly, you can configure OpManager to alert you based on the age of the file. For instance, you can be notified if a file is over 20 days old.
- File Modification: When a file is modified, the date on which the file is modified is updated. You can configure OpManager to notify you whenever there is a change in the date modified. This option helps you keep track of any changes done in critical files.
Associating the File monitor to devices
Having created a template with the alert criteria, you can now associate the template to the devices.
- Go to Settings → Monitoring → Files.
- Click Associate.
- Select the required template from the drop-down.
- Select the devices for which you want to apply this template and click on the right arrow to move them to the 'Selected devices' list.
- Click Associate button at the bottom of the tab to associate the template to all the selected devices.
The monitor is now added to the device and OpManager raises alerts based on the alert conditions provided by the user.