File / Directory Monitor


Creating a new File/Directory monitor

Using the REST API to add a new File/Directory monitor: Click here

To create a file / directory monitor, follow the steps given below:

  1. From the New Monitor link, select File / Directory Monitor.
  2. Provide a Display Name for the monitor.
  3. Select whether it is a File or Directory monitor.
  4. Specify the location whether the File / Directory to be monitored is in the Local or Remote Server.
      • If it is in the Local Server, specify the File Name / Directory Namewith the absolute path to the required file / directory.
        • File Name should be specified with the absolute path. Any readable files can be monitored. File formats such as .txt, .csv, .json, .log are supported. Example: C:\Desktop\test.txt (or) /home/test/test.txt
        • Directory Name should be specified with the absolute path. Example: D:\Appmanager\logs (or) /home/Appmanager/logs
        • File / Directory Names with timestamps can also be monitored using the file/directory monitor. For more information, see Specifying File / Directory Names with timestamp.
      • If it is in the Remote Server, either select the Host Name from the dropdown or create a new host, and then provide the file / directory's absolute path.

        Creating a new host:

          • You can create a new host by entering a new hostname / IP address and login credentials of the host. You can either enter the credential details like user name, password, the command prompt or select the required credential from the Credential Manager list. Select the Mode Of Monitoring (WMI for Windows, Telnet / SSH for Linux), the port and the Command Prompt, if required. Also, there is an option to Resolve Hostname / IP, enabling which will resolve the entered IP address to its corresponding hostname.
          • The new hosts that are created can also be deleted by selecting the required host and clicking on the Delete Host link. However, hostnames that are already present and configured for server monitoring cannot be deleted in this manner.

        Specifying the File Name / Directory Name:

        • File Name should be specified with the absolute path. Any readable files can be monitored. File formats such as .txt, .csv, .json, .log are supported. Example: C:\Desktop\test.txt (or) /home/test/test.txt
        • Directory Name should be specified with the absolute path. Example: D:\Appmanager\logs (or) /home/Appmanager/logs
        • File / Directory Names with timestamps can also be monitored using the file/directory monitor. For more information, see Specifying File / Directory Names with timestamp.

    Specifying File / Directory Names with timestamp: Dynamic Files / Directories that are created daily/monthly using specific date formats are supported in both Windows and Linux servers and can be monitored with the help of replaceable tags.
    For example, to monitor a file of pattern configlog_<YEAR><MONTH><DAY>.log, file name can be configured as configlog_$YYYY$MM$DD.log

    Example formats:
    Consider the time stamp: 3:05 AM, March 7 2023. Following are examples of supported formats:

    Year Patterns: $YYYY - 2023, $YY - 23
    Month Patterns: $MMMMM - March, $MMM - Mar, $MM - 03, $M - 3
    Day Patterns: $DD - 07, $D - 7
    Hour Patterns: $HH - 03, $H - 3
    Minute Patterns: $mm - 05, $m - 5

  5. For a File monitor, select the Do Content Check checkbox if you wish to run a content check. If this checkbox is enabled, perform the following steps:
    • Choose between the File Parsing Options to perform a content check to Only appended content or the Whole File.
    • Select the required option under Monitor Severity to perform this content check to change the Health or Availability severity status.
    • You can add criteria based on which the content check can be performed to change the Health or Availability severity by clicking on the Create New Rule link. This opens a new window where you can add new rules.
    • Under this window, select the severity criteria for Health (CRITICAL / WARNING / CLEAR) or Availability (UP / DOWN) from the Severity drop-down menu.
    • Enter the string for which you want to check content matching in the Content to be searched text box. You can add/remove multiple strings using the (+ / -) button.
    • There are two conditions to configure the monitor status:
      • Any: When this option is chosen, the monitor status will be affected based on the chosen Severity criteria if any of the contents from the above Content textbox match. Also, you can enter the number of contents to be checked in the corresponding textbox if you wish to check for more than one string.
      • All: If all of the content matches, the monitor status will become UP / DOWN. The monitor status will be affected based on the chosen Severity criteria.
    • You can perform a content check for regular expressions by enabling the Do Regular Expression Search checkbox (Refer Regex Guide for more info).
    • You can perform a content check for case sensitive character strings by enabling the Do Case Sensitive Search checkbox.
    • Enable the Clear monitor status when the file is not modified checkbox to control content check when the file is not updated during the polling interval. If this option is enabled and the file was not updated, then the current monitor status will be set for Availability as UP and Health as CLEAR. However, this option is displayed only after selecting the Only appended content option under File Parsing Options.
  6. For both File and Directory monitor, you can enable the Do file / directory age check checkbox to change the monitor status to UP / DOWN if the file/directory is MODIFIED / NOT MODIFIED within a certain time period.
  7. For Directory monitor, enable the Filter files in directoryoption to filter files in the given directory (does not include Sub-directories) and generate alerts. After enabling, enter the following details:
    • File Name: File name pattern with which the files need to be filtered in the directory.
    • Filter Category: Parameters based on which the files need to be filtered. Files can be filtered based on their Size, Last Modified Time, and Created Time (supported only for Windows directory).
    • Alert for Severity: The severity with which alert needs to be raised when the above specified conditions are met.
  8. Enable the Alert when file / directory doesn't exist checkbox for alerting when the required file / directory to be monitored is not found.
  9. Enter the Polling interval time period in minutes and the Timeout in seconds.
  10. If you are adding a new monitor from an Admin Server, select a Managed Server.
  11. Choose the Monitor Group from the dropdown to which you want to associate the Monitor (optional). You can choose multiple groups to associate your monitor.
  12. Click Add Monitor(s). This discovers the file/directory from the network and starts monitoring them.
Note:
  • Applications Manager cannot perform multiple regex checks.
  • The file present in a remote Windows server cannot be monitored by using the Applications Manager which is installed in the Linux OS.
  • The severity of the monitor will be affected based on the order of the criteria configured.
  • Content matching is supported in files of approximately 5MB in size. Network latency may impact the mentioned factor.
  • The content match will be not proceeded to next criteria when the match is found.
  • When the content match is configured with Availability as DOWN or Health as CRITICAL / WARNING for Primary Severity, and if the content match is not found, then the alert will be triggered for Monitor Severity Availability as UP and Health as CLEAR respectively.
  • Similarly when the content match is configured for Availability as UP or Health as CLEAR for Primary Severity, and if the content match is not found, then the alert will be triggered for Monitor Severity Availability as DOWN and Health as CRITICAL respectively. If the user wishes to retain previous severity with Availability as UP or Health as CLEAR, then 'Clear monitor status when the file is not modified' option can be chosen.

Limitations for 'Check Content' String:

For Windows file, double quotes (") will be not be supported .
For Non-Windows file, double quotes(") needs to be prepended with backslash as (\").

Monitored Parameters

Applications Manager uses this File / Directory Monitor to monitor the changes in the selected files and directories.

  • Availability tab gives the availability history for the past 24 hours or 30 days.
  • Performance tab gives the health status and events for the past 24 hours or 30 days.
  • List view enables you to perform bulk admin configuration. Click on the individual monitors listed, to view the following information.

File Monitor

ParameterDescription
File size The size of the file. (KB)
Change in File Size The amount of change in file size. (KB)
% Change in File Size The amount of change in file size. (%)
File Modified Duration The modified time duration of the file. (Minutes)
Last Modified Time The time at which the file was last modified.
Contents Matched Displays the matched contents.

Directory Monitor

ParameterDescription
Directory Size The size of the directory. (MB)
Change in Directory Size The amount of change in directory size. (MB)
% Change in Directory Size The amount of change in directory size. (%)
Directory Modified Duration The modified time duration of the directory. (Minutes)
Total No. of Subdirectories The subdirectory count of a directory.
Total No. of Files The total number of files available in the directory.
Total No. of Files (in Main Folder) The total number of files available under the main folder in the directory.
Directory Modified Duration Amount of time elapsed since the directory was last modified (in minutes).
View Filtered Files Displays the list of files that are filtered in the directory.
Last Modified Time The time at which the directory was last modified.

Configuring RCA Message for File Monitor

The Root Cause Analysis message of the File monitor can be configured by navigating to Settings → Performance Polling → Optimize Data Collection → File / Directory Monitor. There are 3 different options available:

  1. Content match File link: This is the default option in which the contents that have been matched will be shown in the RCA message along with the link to the HTML file that contains line number and lines in which content was matched.
  2. Last Matched Lines: The last matched lines for the configured content will be added to the RCA message along with the default content file match link.
  3. All matched content:All the matched content is appended on to the RCA file along with the default content file match link.

    Note: All matched content option is only available for files hosted on linux servers and the last matched line is appended for files hosted on windows servers.