Start of Content Area

Function documentation Select the File Content that Is to Be Monitored  Locate the document in its SAP Library structure

Use

You can use SAP NetWeaver management agents to monitor files, for example, for their size, their existence, their last change date, or their content. You define all of this in Log File-Templates, along with information about which file content for which the files are to be monitored. You do this by setting appropriate parameters in the log file template. These parameters are described below.

You can monitor the contents of any text files. This function is particularly useful, however, for log files. The following functions are available, among others:

      You can search for search patterns (such as ERROR). If the log file agent finds the search pattern, an alert is generated (you can define the properties of the alert, such as its color or severity, yourself in the log file template), and the corresponding line of the monitored file is displayed in the alert monitor.

      You can monitor the number of times a search pattern occurs in a file. An alert is then generated if the threshold value that you have set for this number is exceeded.

      You can also search for search patterns with no alert value (such as RELEASE).

You can also make additional settings about the search method:

      Are the search patterns case-sensitive?

      Should the system check from the start of a file at every check, or only check the newly-added lines?

      Should the growth of the file be monitored?

      Should all lines of the file be displayed in the alert monitor – or only those that contain the search pattern?

      Should the hits for the search pattern be displayed cumulatively?

Features

Monitored Search Pattern

For every monitored file, you can specify multiple search patterns in the log file template for which the agent is to search the file. To do this, enter a number <n> for each search pattern in the parameter suffix of the following parameters. Start with the number 0.

If a corresponding search pattern is found, the system displays an alert. You can also define the color, severity, and assigned message of this alert in the log file template.

PATTERN_<n>="<character string>"        (PATTERN_0 is required)

You set the search pattern for which the file is to be searched here; by default, this pattern is case-sensitive (see below); wildcards are not permitted.

MESSAGEID_<n>="<message ID>"                (Default = RT 149)

If the above search pattern is found, set the message number that is assigned to the alert here.

VALUE_<x>=[RED,YELLOW,GREEN]                (Default = YELLOW)

If the above search pattern is found, set the color of the alert in the monitoring infrastructure here.

SEVERITY_<x>=[0...255]                            (Default = 0)

If the above search pattern is found, set the severity of the alert in the monitoring infrastructure here.

MESSAGECLASS_<n>="<message class>"    (Default = SAP-T100)

If the above search pattern is found, set the message class that is assigned to the alert here.

CMP_FROM_BEGIN_<x>=[0,1]                        (Default = 0)

You can decide whether the above search pattern is only to be found if it is at the start of a line (1), or whether it can be at any position in the line (0).

You can increase the performance of the monitoring if you know that the search pattern always occurs at the start of the line (for example, ERROR in many log files).

CUMULATIVE_ALERT_THRESHOLD_<n>=<number>   (optional, default: not set)

If the search pattern occurs very frequently in a file, by default, a corresponding number of alerts is generated in the monitoring infrastructure. In cases of this type, it would be better to receive only one alert that informs the user that, for example, the search pattern WARNING was found 140 times in a file.

If you set this parameter, a performance attribute called Matches for <Pattern> is generated. With the value <number> of the parameter, you set the threshold value – for example, if the parameter has the value 5 and the search pattern occurs five times in the monitored file, an alert is generated in the performance attribute specified by the parameter VALUE (see above).

The lines of the monitored files are still written in the log attribute Lines found for pattern, an alert is no longer generated for this search pattern in that node.

Note

If you set CUMULATIVE_ALERT_THRESHOLD_<n>=0, the number of times that the pattern is found is displayed in the attribute Matches for <Pattern>, but no alert is generated for the node.

Search Pattern to Be Displayed  (Without Alert Function)

You can use the parameters explained above to monitor files for search patterns to which an alert is to be assigned (for example, to the search pattern Error). This function is not ideal for displaying search patterns to which no alert is to be assigned (such as version or date information). Only one log attribute is available in the Alert Monitor for all monitored search patterns, meaning that only one line is displayed even in the case of multiple search patterns.

There is therefore a second way in which you can monitor files for search patterns. If a search pattern of this type is found, the Alert Monitor displays the corresponding line as the content of a separate text attribute. You can define the name of the text attribute yourself. If the search pattern exists at several places in the log file, the system displays the last position in which it is found.

APPL_INFO_<x>="<character string>"    (Optional parameter)

You set the search pattern for which the file is to be searched here; by default, this pattern is case-sensitive (see below); wildcards are not permitted.

If the search pattern is found, the line of the file in which the search pattern was found is displayed in the alert monitor.

APPL_INFO_MTE_NAME_<x>="<MTE_Name>"  (Optional parameter)

You set the name of the text attribute in which the line is displayed here; the complete node name is INFO[<MTE name>]

General Settings for the Monitored Log Files

In addition to the search patterns themselves, you can make general settings about the search with the following parameters:

IGNORE_CASE=[0,1]                                      (Default: 0)

By default, all search patterns are case-sensitive (0). If upper and lower case are to be ignored, set IGNORE_CASE=1.

RESCANFROMBEGIN=[0,1]                              (Default: 0)

You can use this parameter to determine whether the log file agent checks a file from the start at every check (1), or only checks the newly-added lines (0).

In most log files, new lines are simply added to the end of the existing file. In this case, it would be incorrect to set RESCANFROMBEGIN=1, since then the same existing search pattern (such as ERROR) would trigger a new alert every time the file was read by the log file agent.

SHOWNEWLINES=[0,1]                                    (Default: 0)

Use this parameter to determine whether the growth of the file is to be monitored:

       Value=1: The Alert Monitor creates the subnode Newlines; that is, the number of lines created  per minute is reported

       Value=0: Newlines is not created

REPORT_MATCHING_LINES_ONLY=[0,1]        (Default: 0)

By default, all lines of the monitored file are reported in the log attribute Lines found for pattern – even if the search pattern is not included in the relevant line. If you set this parameter, only the lines that contain the relevant search pattern are copied to the agent’s shared memory.

Note

If you set this parameter, and the value Last incoming message is set for the setting Display “current value” like, the last matching line is always displayed in the log attribute in the Current Status view in the Alert Monitor.

Activities

If you want to use file monitoring with SAP NetWeaver management agents, create one or more log file templates. Specify this log file template in Configuration File SAPCCMSR.INI.

Note

If you create a log file template, take account of the information in Structure of the Log File Templates for Monitoring Files, which contains a short summary of all possible parameters. Other parameters of log file templates are described by topic in the following sections:

        Select the Files that Are to Be Monitored

        Select the General File Properties that Are to Be Monitored

        Select the Time Periods for the File Monitoring

        Defining the Node Properties for File Monitoring

Example

See Example Log File Templates

This graphic is explained in the accompanying text Infrastructure of the SAP NetWeaver Management Agents Start Page

 

End of Content Area