Configuring Generic Log File Monitor Criteria

Enterprise Manager monitors the log files for the occurrence of operator-specified patterns that the owner of the Management Agent software is able to read. You can use this facility for monitoring abnormal conditions recorded in the log files present on the host.

Log files are periodically scanned for the occurrence of desired patterns and an alert is raised when the pattern occurs during a given scan. During a scan, new content created since the last scan is searched for the occurrence of the desired patterns.

The operator should specify the criteria for log file monitoring using the Metric and Collection Settings Page. To configure the log file monitoring criteria, first identify the monitoring criteria using the form <log file name, match pattern in perl, ignore pattern in perl>.

Perform the following steps using the Enterprise Manager console:

  1. Search for Log File Pattern Matched Line Count in the table displayed for Metrics with Thresholds filter. Click the pencil icon in this row to navigate to the Edit Advanced Settings: Log File Pattern Matched Line Count page.

  2. You can edit or remove existing criteria by selecting the row from the Monitored Objects table and clicking Edit or Remove. Refer to Notes about Specifying Monitored Objects for details on configuring the criteria.

Optionally, perform the following steps directly in the ORACLE_HOME directory of the Management Agent present on the managed host.

  1. By default, matching number of lines is reported through log file monitoring. To enable upload of matching content for a specific file, add the absolute path for the file to the $ORACLE_HOME/sysman/admin/lfm_ifiles file. The $ORACLE_HOME/sysman/admin/lfm_ifiles.template file is a template needed for creating the $ORACLE_HOME/sysman/admin/lfm_ifiles file.
  2. For security purposes, you may want to disable monitoring of sensitive files by Enterprise Manager permanently by adding the names of the sensitive files to the $ORACLE_HOME/sysman/admin/lfm_efiles file. The $ORACLE_HOME/sysman/admin/lfm_efiles.template file is a template needed for creating the $ORACLE_HOME/sysman/admin/lfm_efiles file.

Notes about Specifying Monitored Object

The set of columns (Log File Name, Match Pattern In Perl, Ignore Pattern In Perl) uniquely specifies the criteria to be monitored. Each row in the Monitored Object table specifies a unique criteria to be monitored. Multiple criteria can exist against the same log file.

Column Description

Log File Name

In this column, specify the absolute path for the log file to be monitored. SQL wild characters can be used for specifying multiple file names.

Examples:

(a) /orahome/log/f1.log This value would monitor single log file.(b) /orahome/log/%.log This value would monitor all files with suffix .log in /orahome/log directory.

Match Pattern in Perl

In this column, specify the pattern to be matched for. Perl expressions are supported.

This column specifies the pattern that should be monitored in the log file. During each scan, the file is scanned for occurrence of the specified match pattern [with case ignored].

Example:

(a) Pattern Value = ERROR This pattern will be true for any line containing error

(b) Pattern Value = .*fan.*error.* This pattern will be true for lines containing fan and error

Ignore Pattern in Perl

This column specifies the ignore pattern. In the given Log file, line containing the match pattern will be ignored if the ignore pattern is contained in that line.

In this column, specify any pattern that should be ignored. Perl expressions are supported.

If nothing needs to be ignored, specify %

Time Stamp

If this column is present, always specify it to be %.