Default Parameters for EgThreshLogTest
This test monitors the thresh_log for errors and provides the complete details of these errors to simplify troubleshooting.
This page depicts the default parameters that need to be configured for the EgThreshLogTest.
In the ALERTFILE text box, specify the full path to the log file to be monitored. Since the thresh_log is by default found in the <EG_INSTALL_DIR>\manager\logs directory, the same is displayed here by default.
Also, instead of a specific log file path, the path to the directory containing the thresh_log files can be provided - e.g., /opt/egurkha/manager/logs. This ensures that eG Enterprise monitors the most recent log files in the specified directory. Specific log file name patterns can also be specified. For example, to monitor the latest log files with names containing the string thresh_log, the parameter specification can be, /opt/egurkha/manager/*thresh_log*. Here, ‘*’ indicates leading/trailing characters (as the case may be). In this case, the eG agent first enumerates all the log files in the specified path that match the given pattern, and then picks only the latest log file from the result set for monitoring.
Every time this test is executed, the eG agent verifies the following:
- Whether any changes have occurred in the size and/or timestamp of the log files that were monitoring during the last measurement period;
- Whether any new log files (that match the ALERTFILE specification) have been newly added since the last measurement period;
If a few lines have been added to a log file that was monitored previously, then the eG agent monitors the additions to that log file, and then proceeds to monitor newer log files (if any). If an older log file has been overwritten, then, the eG agent monitors this log file completely, and then proceeds to monitor the newer log files (if any).
In the SEARCHPATTERN text box, Enter the specific patterns of alerts to be monitored. The pattern should be in the following format: <PatternName>:<Pattern>, where <PatternName> is the pattern name that will be displayed in the monitor interface and <Pattern> is an expression of the form - *expr* or expr or *expr or expr*, etc. A leading '*' signifies any number of leading characters, while a trailing '*' signifies any number of trailing characters. Multiple search patterns can be specified as a comma-separated list. If you want all the messages in a log file to be monitored, then your specification would be: <PatternName>:*.
By default, this test monitors error events logged in the thresh_log file. Therefore, the default SEARCHPATTERN is set as: error:*ERROR*,warn:*WARN*. This indicates that by default, the test will monitor only those lines in the thresh_log which embed the strings ERROR.
In the LINES text box, specify two numbers in the format x:y. This means that when a line in the alert file matches a particular pattern, then x lines before the matched line and y lines after the matched line will be reported in the detail diagnosis output (in addition to the matched line). The default value here is 0:0. Multiple entries can be provided as a comma-separated list.
If you give 1:1 as the value for LINES, then this value will be applied to all the patterns specified in the SEARCHPATTERN field. If you give 0:0,1:1,2:1 as the value for LINES and if the corresponding value in the SEARCHPATTERN field is like ORA:ORA-*,offline:*offline*,online:*online then:
0:0 will be applied to ORA:ORA-* pattern
1:1 will be applied to offline:*offline* pattern
2:1 will be applied to online:*online pattern
Provide a comma-separated list of patterns to be excluded from monitoring in the EXCLUDEPATTERN text box. For example, *critical*,*exception*. By default, this parameter is set to ‘none’.
By default, the UNIQUEMATCH parameter is set to FALSE, indicating that, by default, the test checks every line in the log file for the existence of each of the configured SEARCHPATTERNS. By setting this parameter to TRUE, you can instruct the test to ignore a line and move to the next as soon as a match for one of the configured patterns is found in that line. For example, assume that Pattern1:*fatal*,Pattern2:*error* is the SEARCHPATTERN that has been configured. If UNIQUEMATCH is set to FALSE, then the test will read every line in the log file completely to check for the existence of messages embedding the strings ‘fatal’ and ‘error’. If both the patterns are detected in the same line, then the number of matches will be incremented by 2. On the other hand, if UNIQUEMATCH is set to TRUE, then the test will read a line only until a match for one of the configured patterns is found and not both. This means that even if the strings ‘fatal’ and ‘error’ follow one another in the same line, the test will consider only the first match and not the next. The match count in this case will therefore be incremented by only 1.
The ROTATINGFILE flag governs the display of descriptors for this test in the eG monitoring console.This flag is set to false by default. In this case, the descriptors of the test will be of the following format: <Alert_file_name>:<SearchPattern>.
If this flag is set to true and the ALERTFILE text box contains the full path to a specific (log/text) file, then, the descriptors of this test will be displayed in the following format: Directory_containing_monitored_file:<SearchPattern>. Since the ALERTFILE parameter is set to /manager/logs/thresh_log by default in the case of this test, setting the ROTATINGFILE to true will display descriptors in the following format in the eG monitoring console: /manager/logs/thresh_log:<SearchPattern>.
On the other hand, if this flag is set to true and the ALERTFILE parameter is set to the directory containing log files (say, /manager/logs), then, the descriptors of this test will be displayed in the format: Configured_directory_path:<SearchPattern> - i.e., /manager/logs:<SearchPattern>. On the other hand, if the ROTATINGFILE parameter had been set to false, then the descriptors will be of the following format: Configured_directory:<SearchPattern> - i.e., logs:<SearchPattern> in the case of the example above.
If this flag is set to true and the ALERTFILE parameter is set to a specific file pattern, then, the descriptors of this test will be of the following format: <FilePattern>:<SearchPattern>. /opt/egurkha/manager/*thresh_log*, and ROTATINGFILE is set to true, then, your descriptor will be: *thresh_log*:<SearchPattern>. In this case, the descriptor format will not change even if the ROTATINGFILE flag status is changed.
The CASESENSITIVE flag is set to No by default. This indicates that the test functions in a ‘case-insensitive’ manner by default. This implies that, by default, the test ignores the case of your ALERTFILE and SEARCHPATTERN specifications. If this flag is set to Yes on the other hand, then the test will function in a ‘case-sensitive’ manner. In this case therefore, for the test to work, even the case of your ALERTFILE and SEARCHPATTERN specifications should match with the actuals.
By default, the OVERWRITTEN flag is set to false. Set this flag to true if you want the test to support the 'roll over' capability of the specified ALERTFILE. A roll over typically occurs when the timestamp of a file changes or when the log file size crosses a pre-determined threshold. When a log file rolls over, the errors/warnings that pre-exist in that file will be automatically copied to a new file, and all errors/warnings that are captured subsequently will be logged in the original/old file. For instance, say, errors and warnings were originally logged to a file named thresh_log. When a roll over occurs, the content of the file thresh_log will be copied to a file named thresh_log.1, and all new errors/warnings will be logged in thresh_log. In such a scenario, since the OVERWRITTENFILE flag is set to false by default, the test by default scans only thresh_log.1 for new log entries and ignores thresh_log. On the other hand, if the flag is set to true, then the test will scan both thresh_log and thresh_log.1 for new entries.
If you want this test to support the ‘roll over’ capability described above, the following conditions need to be fulfilled:
- The ALERTFILE parameter has to be configured only with the name and/or path of one/more alert files. File patterns or directory specifications should not be specified in the ALERTFILE text box.
- The roll over file name should be of the format: “<ALERTFILE>.1”, and this file must be in the same directory as the ALERTFILE.
When changing default configurations of tests, the values with "$" indicate variables that will be replaced by the eG system according to the specific server being managed - for instance, $hostName is the host/nickname of the target host, $port is the port number of the server being monitored. E.g., for a server xyz:80, $hostName will be changed automatically by the eG manager to "xyz" and $port will be changed to "80" when configuring a test.
|