Show TOC

Function documentationExample of Log File Monitoring

 

The RFC call work process developer trace monitoring, is used here as an example of log file monitoring. There is a trace file containing, for example, RFC environment errors, for each work process. These files are in the work folder of the instance directory. Create a metric group to monitor the number of times the string ERROR occurs in all trace files.

Activities

To monitor the RFC call work process developer traces and integrate them in the monitoring and alerting infrastructure, proceed as follows:

Create a customer template
  1. Call the SAP Solution Manger Configuration (transaction SOLMAN_SETUP).

  2. Go to Technical Monitoring, select the use case System Monitoring, and go to the step Template Management.

  3. Go to change mode by choosing Edit.

  4. To monitor an instance-specific ABAP log file, create a customer template for the Start of the navigation path Technical Instance Next navigation step SAP ABAP 7.00 – 7.03 End of the navigation path.

    Select this SAP template, and choose Create Customer Template. In the Template Settings tab, enter ABAP 7.0x with Dev. Trace Monitoring as the template name. You can enter notification and incident settings for the template, here. The example uses the global settings, so no entries are required.

  5. Save the template. As you only use this template as a test, and do not want to transport it further, set the Local Object flag.

Creating a User-Defined Metric
  1. Go to Expert mode, and choose Creating a User-Defined Metric.

  2. To create a new metric, choose the drop-down box Start of the navigation path Create Next navigation step Metric End of the navigation path.

  3. In the user-defined metric creation wizard, enter the required information in the 6 tabs. In the Overviewt enter the basic metric details.

    Input field

    Meaning

    Name

    Enter the metric name RFC Developer Trace Errors. The metric is displayed in technical monitoring under this name.

    Category

    Specify the metric category Exceptions.

    Class

    Specify the class Metric Group.

    Data Type

    The data type of a metric depends on the data supplier. The data supplier File Text Pattern Search delivers data of the type Whole Numberl.

    Unit

    Enter the metric unit Errors.

    Active

    Set this flag, so that the metric is used.

    Customer description

    Enter a description of the metric. For the example, copy the metric name above.

  4. In the Data Collection tab, specify the value to be assigned to the metric, by specifying the data supplier and its input parameters.

    Input field

    Meaning

    Collection interval

    Specify the value capture frequency; use the default value 5 Minutes.

    Data collector

    Specify how the data is captured. For the log file monitoring data supplier, it is Diagnostic Agent (Push).

    Data Provider

    Specify the data provider which monitors any files for text patterns. This is File Text Pattern Search.

    When you have specified the data provider, enter its input parameters. For a metric group, specify which parameters apply to the whole group, and which vary between variants (in this case, the parameter FILEPATTERN). A metric variant is created in the metric group for each file whose name satisfies the input parameter FILEPATTERN.

    Reset the flag in the Configure column for the following parameters, and enter the data which is the same for all variants in the group:

    Parameter ID

    Meaning

    DELTA_READ

    Specify whether each read reads the file from the beginning, or only the rows which have been added by the data provider since the last read. In this example, choose TRUE, so that only new rows are monitored.

    FOLDER

    This is the full path to the folder containing the monitored files. Enter \Q$INSTANCE_FULL_PATH$/work\E ein ($INSTANCE_FULL_PATH$ is the full path of the ABAP instance).

    SEARCHPATTERN

    The search pattern for which the file is to be monitored. Enter .*ERROR.*.

    For the parameter FILEPATTERN, set the flag in the Configure column, choose Add Variant, and enter the name pattern of the files to be monitored, in the table Metric Group Variants. In this case, all files which begin with dev_rfc, followed by a sequence of digits (the work process number), are to be monitored. The file name should end with that, so that .old files are not monitored. As a regular expression, this is dev_rfc[0-9]+$.

    Note Note

    General information about this data provider and its input parameters is under Log File Monitoring Data Providers.

    End of the note.
  5. Specify, in the Data Usage tab, which components use this metric. Accept the default settings.

  6. Specify in the Threshold Values tab, how the delivered measured values of the metric are rated (status green, yellow or red). In this case, the status should be red if the search pattern ERROR occurs at least once. Choose the threshold type Numeric (Green/Red), and in the input field Trigger at Value, enter 1.

  7. You can restrict the validity of the metric to specified types of managed objects, in the Validity tab. Accept the default setting.

  8. In the Others tab, enter the technical name of the metric (it must begin with Z, so that it is in the customer namespace). In this example, specify the technical name Z_RFCERRORS.

  9. Go to the next step in the wizard. Assign the metric to alerts. You cannot yet do so, because the alert does not yet exist.

  10. End the wizard with End, and save the metric.

Create an Alert
  1. To create a new alert, choose the drop-down box Start of the navigation path Create Next navigation step Alert End of the navigation path.

  2. In the user-defined alert creation wizard, enter the required information in the 7 tabs. In the Overview enter the basic alert details.

    Input field

    Meaning

    Name

    Enter the alert name Too Many Errors in RFC Developer Trace. The alert is displayed in technical monitoring Alert Inbox, under this name.

    Category

    Specify the im alert category Exceptions.

    Severity

    Rate the alert 5 (medium).

    Do not group occurrences

    Do not change this flag.

    Active

    Set this flag, so that the alert is used.

    Customer description

    Enter a description of the alert. For the example, copy the alert name above.

  3. You can overwrite the default values for this alert in the Messages, Notifications, Third-Party Component and Automatic Reactions tabs. Leave them unchanged for this example.

  4. In the Rules tab, specify how an event or alert is rated if it depends on several metrics. Accept the default setting Rate as Worst Case.

  5. In the Others tab, enter the technical name of the alert (it must begin with Z, so that it is in the customer namespace). In this example, specify the technical name Z_RFCERRORS_ALRT.

  6. Go to the next step in the wizard. Assign the alert to the metric. The metric list shows the metrics of this category which can be assigned. The metric RFC Developer Trace Errors should be displayed. Assign this metric.

  7. Exit the wizard by choosing Finish.

Assigning and Activating the Template
  1. You have now created a template, and a metric and a customer alert for it. Save the template.

  2. To use the template for your managed objects, assign it to them, and activate.

  3. Go to the next configuration step, (Specify Scope), select the managed objects (in this case, technical systems of type ABAP), and go to the next step (Set Up Monitoring).

  4. You can assign these managed objects to the template. Choose Assign Templates for the instances, und the template ABAP 7.0x with Dev. Trace Monitoring, for the product. Choose Copy and Activate, to activate the assignment.

Display the New Metric in Technical Monitoring
  1. Call the Technical Monitoring work center.

  2. Call the ABAP system to which you have assigned the template, and start System Monitoring.

  3. Select a managed object. System Monitoring is shown in a new window.

  4. Go to the new metric by expanding an instance in the Details and Instance Exceptions subscreens.