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

  1. Go to Settings → Monitoring → Files.
  2. Click New Template. Add New Template page opens.
  3. 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.
  4. 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.
  5. 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:

  1. 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.

Configuring alarms - available variables for alarm messages

You can customise your alarm message generated when a provided criteria is violated, by using these alarm variables in the Alarm Message Format field:

  1. $MONITOR - Displays the name of the monitor. Can be used with all criteria types.
  2. $CURRENTVALUE - Displays the latest polled value of the provided trigger criteria (File Contains/Age/Size). Can be used with all criteria types EXCEPT File Existence and File Modification.

    Note: The variable $CURRENTVALUE works differently for File Contains and File Age/Size. For File Contains criteria type the provided search string is returned, whereas it returns the latest polled value for File Age/File Size criteria types.

  3. $THRESHOLDVALUE - Displays the threshold value of the provided trigger criteria. Can be used with File Size and File Age criteria types.
  4. $UNITS - Displays the units of the trigger criteria. Can be used for File size and File Agecriteria types.
    • Available units in File Size: bytes, KB, MB, GB
    • Available units in File Age: minutes, hours, days
  5. $MODIFIEDTIME - Displays the latest Modified Time value of the file in the provided file path. Can be used with File Modification criteria type.

Sample messages for each criteria type using alarm variables

Criteria type Supported alarm variables Sample alarm message with variables Generated alarm message
File contains $MONITOR - Monitor name

$CURRENTVALUE - Search string
File monitor $MONITOR contains the string $CURRENTVALUE File monitor FileMonitor1 contains the string test
File Existence $MONITOR - Monitor name

File monitor $MONITOR exists

(OR)

File monitor $MONITOR does not exist any more

File monitor FileMonitor2 exists

(OR)

File monitor FileMonitor2 does not exist any more

File Size $MONITOR - Monitor name

$THRESHOLDVALUE - Minimum size of file required to trigger the alarm (in bytes/KB/MB/GB)

$CURRENTVALUE - Current size of the file in the path (in bytes/KB/MB/GB)

$UNITS - Units provided for the threshold value (bytes/KB/MB/GB)
File size of the monitor $MONITOR is $CURRENTVALUE, violating the threshold of $THRESHOLDVALUE $UNITS File size of the monitor FileMonitor3 is 2, violating the threshold of 1 GB
File Age $MONITOR - Monitor name

$THRESHOLDVALUE - Minimum size of file required to trigger the alarm (in seconds/minutes/hours)

$CURRENTVALUE - Current size of the file in the path (in seconds/minutes/hours)

$UNITS -Units provided for the threshold value (seconds/minutes/hours)
File age of the monitor $MONITOR is $CURRENTVALUE, violating the threshold of $THRESHOLDVALUE $UNITS File age of the monitor FileMonitor4 is 95, violating the threshold of 90 mins
File Modification $MONITOR - Monitor name

$MODIFIEDTIME - Latest value for Modified Time of the value (MM/DD/YYYY HH:MM:SS AM/PM)
File monitor $MONITOR got modified at $MODIFIEDTIME File monitor FileMonitor5 got modified at 8/13/2017 1:12:35 AM

Associating the File monitor to devices

Having created a template with the alert criteria, you can now associate the template to the devices.

  1. Go to Settings → Monitoring → Files.
  2. Click Associate.
  3. Select the required template from the drop-down.
  4. 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.
  5. 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.

Thank you for your feedback!

Was this content helpful?

We are sorry. Help us improve this page.

How can we improve this page?
Do you need assistance with this topic?
By clicking "Submit", you agree to processing of personal data according to the Privacy Policy.