File Monitor Test

This test monitors a configured directory, and reports the total number of files in that directory that match configured patterns. In addition, the test also reports the age of the oldest file of all the matching files.

Target of the test : Any Unix or Windows host

Agent deploying the test : An internal agent

Outputs of the test : One set of results for every configured FILE PATH

Configurable parameters for the test
  1. TEST PERIOD - How often should the test be executed
  2. Host - The host for which the test is to be configured
  3. port - The port at which the host listens
  4. file path - Specify the full path to the directory to be monitored. For eg., c:\app\logdir. Multiple directory paths can be configured in the following format: <DisplayName1>@<DirectoryPath1>,<DisplayName2>@<DirectoryPath2>,... Every DisplayName will appear as a descriptor of this test. For instance, on a Windows host your specification can be: LogPath:C:\eGurkha\agent\logs,OraPath:C:\Oracle\alerts\logs. Likewise, on a Unix host, your specification can be: LogPath:opt/eGurkha/agent/logs,ErrorPath:opt/usr/tmp/errors.
  5. filename pattern - If only a single directory has been configured against file path, then, in this text box, provide a comma-separated list of filename patterns to be monitored. For example, error,warning. Your pattern specifications can also include wildcard characters. For example, to monitor files with names that begin with the word 'log', and those that end with the word 'err', your pattern specification can be: log*,*err. Similarly, to monitor those files with names that embed say, 'warn', your specification can be: *warn*. A leading * signifies any number of leading characters, and a trailing * signifies any number of trailing characters.

    If multiple directories have been configured against file path, then, you can specify a file pattern for each directory so configured. Your specification in this case should be of the following format: <DisplayName_of_Filepath1>@<Filename_pattern1>,<DisplayName_of_Filepath2>@<Filename_pattern2>,...For instance, if the file path has been configured with two directories with display names LogPath and OraPath, the filename pattern can be: LogPath:*error*,OraPath:*alert*. You can also configure multiple patterns for each directory specified against filepath. For example, if the file path has been configured with two directories with display names LogPath and OraPath, and you want to monitor all files with names that contain the strings ‘error’ and ‘info’ in each of the directories, your specification would be: LogPath@*error*,LogPath@*info*,OraPath@*error*,OraPath@*info*.


    The file name patterns should not contain file extensions – for instance, your filename pattern specification cannot be as follows: LogPath:*error*.log,OraPath:*alert*.txt.

  6. date pattern - In some environments, file names may begin with the dates on which the files were created/modified. If you want this test to monitor only those files that begin with configured date patterns, then set the DATE PATTERN flag to True. In this case, only those FILENAME PATTERNs that begin with a date pattern will be considered for monitoring by this test. All other patterns will be ignored. If the DATE PATTERN is set to False, then all configured FILENAME PATTERNs will be monitored.

    Say, you want to monitor only those files with names that begin with dates of the format, ddmmyy. To achieve this, first set the DATE PATTERN flag to True, and then, specify the following in your FILENAME PATTERN text box: <DisplayName_of_FilePath>@ddmmyy*.*.

  7. INCLUDE SUB DIRECTORY – By default, this test will only search the directories configured against file path for the specifiled filename patterns. If these directories contain sub-directories, then such sub-directories will by default be excluded from monitoring. This is why, the INCLUDE SUB DIRECTORY flag is set to False by default. If you want this test to also scan the sub-directories within the configured file paths for the specified filename patterns, then set the INCLUDE SUB DIRECTORY flag to True
  8. file extension – By default, this parameter is set to none, indicating that this test monitors all files that match the configured filename pattern regardless of the file extensions. However, if you want the test to monitor only those matching files that have a specific extension – say txt, log, ini, etc. - then mention that extension against the file extension parameter. Note that only one extension can be provided here.
  9. DETAILED DIAGNOSIS - To make diagnosis more efficient and accurate, the eG Enterprise embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option.

    The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:

    • The eG manager license should allow the detailed diagnosis capability
    • Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0.
Measurements made by the test
Measurement Description Measurement Unit Interpretation

Number of files:

Indicates the number of files that match the configured pattern in this directory.


Use the detailed diagnosis of this measure to determine which files match the configured pattern, the last modified date and time of every file, and the age of each file (in minutes).

Age of oldest file:


Indicates the age (in minutes) of the oldest file that matches the configured pattern in this directory.


Use the detailed diagnosis of the Number of files measure to identify the oldest file of this pattern.