The File Content monitor scans the specified files for a string pattern and can be used to scan log files for a known error string. It is intended for scanning text files such as logs, for example, and not binary files. For best performance, select as few files to scan as possible. Using regular expressions to specify filename and scan pattern can affect the monitor’s performance. It is imperative to create detailed regular expressions, specifically for specifying the scan pattern, in order to achieve the best results.

Provide a unique name and description for the monitor, then configure the following:

  • Folder path. The Universal Naming Convention (UNC) file path WhatsUp Gold uses to access the folder. Enable Include sub-folders to scan folders under the selection for the specified content.
  • Files to include. Select All files to configure the monitor to scan all accessible files or select Files with matching names to specify a wildcard or regular expression to limit the monitors search to specific file(s).
    Note: Wildcards expressions can be used to filter your file search results. For example, to list all text files with .txt extension, you would use: *.txtOr, to find all text files named file_1.txt, file_2.txt, you would use: file?.txtFor these examples, the * wildcard is used for matching multiple characters and the ? wildcard is used for matching a single character.
  • Pattern to monitor. Select Literal string or Regular expression, then enter the single line of content for which the monitor should search. Enable the Perform case sensitive comparison option to ensure the monitor considers upper and lower case characters as entered.
  • Scan entire file content. Select this option to search an entire file for the pattern.
  • Scan only the content added to the file since the last poll. Select this option to limit the search to only new information in a file.
    Note: If the Scan only the content added to the file since the last poll option is selected, WhatsUp Gold tracks the offset within the file reached during scanning, then picks up from that point during the next scan. This is not necessarily the end of the file as a timeout could result in not reaching the end of the file. If a file scanned is deleted, then re-created with new content, then one of two things can happen: If the recreated file is smaller than the last scanned offset for that file, WhatsUp Gold start scanning from the beginning of the file. Or, if the recreated file is the same size or larger than the last scanned offset, then WhatsUp Gold picks up the scanning from the last scanned offset.
    Important: Associate actions with the file content monitor itself as opposed to a target device to which the monitor is applied. Applying actions to a file content monitored device when this scan method is selected can cause the monitor to report a failure followed by subsequent success each time the device is polled after a change is made to the scanned file(s).
  • Timeout. Enter the length of time attempts to connect to the selected device. When the specified time is exceeded without connecting, a timeout occurs and stops trying to connect to the server. This is considered a failed connection
  • Ignore Timeout Error. Enable this option to ignore any timeout errors encountered when scanning files.
  • Monitor is up/down if the pattern occurs at least x times. Specify the number of instances of the pattern the monitor must find to report as either Up or Down.