Hitachi

JP1 Version 13 JP1/Integrated Management 3 - Manager Overview and System Design Guide


3.15.5 SAP system monitoring function

You can monitor the system log information and CCMS alert information of SAP system by using Script exporter, JP1/Base's log trap function, log trapper on Fluentd, and the SAP system log extract commands (jr3slget, jr3alget) of SAP system that JP1/IM - Agent ships with.

Note that you cannot run JP1/IM - Agent in containers and use SAP system monitoring function.

Table 3‒23: Function list of SAP system monitoring function

Function

Description

Script execution function (Script exporter)

Executes the log extract command for SAP system periodically. Gets the executability of a command/execution duration, etc. as a metric.

SAP system log extract commands (jr3slget, jr3alget)

Extracts system log information and CCMS information from SAP system and outputs the contents to a text file. You use Script exporter to execute commands for SAP. It can also be executed from cron, jobs etc.

Script execution result monitoring function

Monitors the log information of SAP system output by the SAP system log extract commands.

Monitor using either of Fluentd, JP1/Base script execution result monitoring function.

Script execution result monitoring function (Fluentd)

The system log information and CCMS alert information output by the script executed by the script execution function (Script exporter) are read, analyzed, and JP1 events are issued.

Script execution result monitoring function (JP1/Base)

Reads the system log information and CCMS alert information output by the script executed by the script execution function (Script exporter), and issues a JP1 event.

Metric output function

Sends metric about monitoring SAP system to JP1/IM - Manager.

Metric output function (Script exporter)

Sends metric about the script execution function (Script exporter) to JP1/IM - Manager.

Metric output function (Fluentd)

Sends metric about the script execution result monitoring function to JP1/IM - Manager.

Organization of this subsection

(1) Prerequisites

The SAP system log extract command must be set up as an optional function of JP1/IM - Agent.

For setup instructions, see 1.23.3 Configuring SAP system monitoring and 2.21.3 Configuring SAP system monitoring in the JP1/Integrated Management 3 - Manager Configuration Guide.

The RFC library for operating the SAP system log extract command and the supported SAP system version are based on JP1/PFM - Agent for EAP. For details, see the Release Notes for JP1/IM - Agent.

(a) Service

The services that must be started to use SAP system monitoring function depend on how the command is executed (Script exporter or otherwise) and how logging is monitored (Fluentd or JP1/Base), as shown in the following tables.

Table 3‒24: Services that must be started to use the SAP system monitoring function

How to monitor logs

Command execution method

Script exporter

Miscellaneous (cron, jobs, etc.)

Fluentd

- JP1/IM - Agent host

Following JP1/IM - Agent services

  • jpc_imagent

  • jpc_imagentproxy

  • jpc_prometheus_server

  • jpc_alertmanager

  • jpc_fluentd

  • jpc_script_exporter

- JP1/IM - Manager host

  • JP1/IM - Manager services

  • JP1/Base

- JP1/IM - Agent host

Following JP1/IM - Agent services

  • jpc_imagent

  • jpc_imagentproxy

  • jpc_prometheus_server

  • jpc_alertmanager

  • jpc_fluentd

- JP1/IM - Manager host

  • JP1/IM - Manager services

  • JP1/Base

JP1/Base

- JP1/IM - Agent host

Following JP1/IM - Agent services

  • jpc_imagent

  • jpc_imagentproxy

  • jpc_prometheus_server

  • jpc_alertmanager

  • jpc_script_exporter

  • JP1/Base services

- JP1/IM - Manager host

  • JP1/IM - Manager services

  • JP1/Base

- JP1/IM - Agent host

  • JP1/Base

- JP1/IM - Manager host

  • JP1/IM - Manager services

  • JP1/Base

(2) Function Details

Use Script exporter, JP1/Base log trapping function, Fluentd's log monitoring function, and JP1/IM - Agent's bundled SAP system log extract commands to monitor SAP system.

The script exporter triggers a scrape request from the Prometheus server to execute the SAP system log extract command specified in the script exporter configuration file. Outputs the system log information and CCMS alert information of SAP system extracted by this command to a text file, respectively.

SAP system log extract commands include a command for extracting system log information and a command for extracting CCMS alert information.

The system log information and CCMS alert information extracted by the SAP system log extract commands are output to a text log file. Use Fluentd's log trapper to monitor this logfile. The monitored log is output to Fluentd log. It is also issued as a JP1 event, depending on the log analysis.

It also collects information about command execution (command exit status, execution time, and exit code) as metrics. You can check the information about the script execution in the [Trends] tab of integrated operation viewer. Likewise, Fluentd logging monitoring activity is collected as a metric. Create an IM management node based on metric that was sent. For details about IM management node, see 3.15.5(2)(d) Metric output function.

(a) Script execution function (Script exporter)

The script execution function outputs the system log information and CCMS alert information of SAP system using the SAP system log extract commands when Script exporter requests scrape of Prometheus.

For details about Script exporter functions, see 3.15.1(1)(j) Script exporter (UAP monitoring capability).

You can export the system log information and CCMS alert information of SAP system to a text-format file by setting Script exporter configuration file (jpc_script_exporter.yml) to execute the command that extracts the system log information and CCMS alert information of SAP system.

For details about Script exporter configuration file specifications, see Sample file of Script exporter configuration file for SAP system monitoring in Chapter 2. Definition Files in the JP1/Integrated Management 3 - Manager Command, Definition File and API Reference.

Notes

For SAP system monitoring function, if you set the password of the user to be used for connecting to Script exporter configuration file (jpc_script_exporter.yml) or environment parameters file, ensure that these files are not visible to users who do not have access privileges.

The environment parameters file cannot be operated using the manager function described below.

  • Distribution with file download capabilities

  • Editing using the definition file manipulation function

(b) SAP system log extract command

You can use the following commands to extract system log information and CCMS alert information from SAP system.

  • Commands for extracting system log information from SAP system (jr3slget)

  • Commands for extracting CCMS alert information from SAP system. (jr3alget)

For details about the commands, see jr3slget in Chapter 1. Commands and jr3alget in Chapter 1. Commands in the JP1/Integrated Management 3 - Manager Command, Definition File and API Reference.

■ SAP system with log extraction

The SAP system log extract command accesses the external interface of the SAP system through an RFC connection. You can access the SAP system on the host, including the remote host, by specifying RFC connection information in the environment parameters file or in the arguments of the SAP system log extract command.

■ Parameter definitions for the command

The parameters of the SAP system log extract command for SAP system are specified in the arguments of the command or the environment parameters file.

To predefine various environment parameters for a command, you must create an environment parameters file as an input file for the SAP system log extract command.

You can copy the sample file of environment parameters file provided by the JP1/IM - Agent to any directory and customize it. For details about sample file of environment parameters file, see Sample file of environment parameters file for jr3slget command (jr3slget.ini.sample) and Sample file of the environment parameters file for jr3alget command (jr3alget.ini.sample) in Chapter 2. Definition Files in the JP1/Integrated Management 3 - Manager Command, Definition File and API Reference.

■ Log file output

Outputs the system log information and CCMS alert information of SAP system extracted by the above command to the log file of SAP system log extract command. The output destination is an arbitrary path specified in an environment parameters file or an argument to the SAP system log extract command. The character code to be output follows OS linguistic setting.

If you use the script execution result monitoring function (Fluentd) to monitor output log files, you must specify the output format in WRAP2.

For details about the text files that can be monitored by log trapper (Fluentd), see 3.15.3(3) Text-format log file monitoring facility (tail plug-in) .

Also, if you use JP1/Base log file trap facility to monitor log files, it is recommended to output the log files in WRAP2 format because there are issues such as trap delay in WRAP1 format.

■ Records of maintenance information

The maintenance information of the SAP system log extract command is output to the trace file of the command. The path of the trace file is any path specified by environment parameters file. If not specified, the command output to the working directory of the command. The character code to be output follows OS language setting.

■ Managing the last record extraction time

To use SAP system log extract command to extract the system log information and CCMS alert information for SAP system that was output after the previous command was executed, you must create a timestamp file. In this case, specify a timestamp file with -lasttime option when executing the command.

(c) Script execution result monitoring function

■ Script execution result monitoring function (Fluentd)

The script execution result monitoring facility (Fluentd) monitors the system log information and CCMS alert information of SAP system output to a text file using log file monitoring of Fluentd. Use the text log file monitor feature to monitor text files and convert them to JP1 events. The following two text-format log file monitor definition files are provided as sample in the monitor definition file. Sample files can be edited to the extent supported by Fluentd's log monitoring function.

  • Sample file of system log information monitoring definition file for SAP system (fluentd_sap_syslog_tail.conf)

  • Sample file of CCMS alert information monitoring definition file for SAP system (fluentd_sap_alertlog_tail.conf)

■ Script execution result monitoring function (JP1/Base)

The script execution result monitoring function (JP1/Base) monitors the system log information and CCMS alert information of SAP system output to a text file using JP1/Base log file trap facility. You can convert what is written to a text file to JP1 events.

(d) Metric output function

Metric output function sends the operation status of 3.15.5(2)(a) Script execution function and 3.15.5(2)(c) Script execution result monitoring function to JP1/IM - Manager. Sends the script execution status and the script execution result monitoring status in metric format for each of jr3slget and jr3alget commands. Create an IM management node based on metric that was sent.

■ Metric output function (Script exporter)

Use Script exporter feature to get script execution status. For Script exporter functions and metric acquired by Script exporter, see 3.15.1(1)(j) Script exporter (UAP monitoring capability).

You can check metric of Script exporter on the [Trends] tab and [Dashboard] tab of integrated operation viewer. For details about Script exporter's IM management node, see 3.15.6(1) Creating IM management node.

The label name of IM management node that you create using Script exporter is the value of scripts.name specified in Script exporter configuration file. The default value of the scripts.name of the metric output function (Script exporter) of SAP system monitoring, see Sample file of Script exporter configuration file for SAP system monitoring (jpc_script_exporter_sap.yml) in Chapter 2. Definition Files in the JP1/Integrated Management 3 - Manager Command, Definition File and API Reference.

If you define a script in Script exporter configuration file that executes the SAP system log extract command, script.name must include the SAP system log extract command name (jr3slget or jr3alget). Otherwise, SAP system monitoring metric output function's IM management node is created under Other Applications category.

IM management node that you create using SAP system monitoring metric output function (Script exporter) are created under Enterprise category. If you use SAP system monitor metric capabilities (Script exporter), make sure that Prometheus configuration file is edited so that Script exporter gets metric that SAP system monitoring metric is assigned to Enterprise category of IM management node.

For details about the settings, see 1.21.2(3)(h) Setting for executing the SAP system log extract command using Script exporter (for Windows) (Optional) and 2.19.2(3)(h) Setting for executing the SAP system log extract command using Script exporter (for Linux) (Optional) in the JP1/Integrated Management 3 - Manager Configuration Guide.

If script.name in Script exporter configuration file contains the SAP system log extract command name (jr3slget or jr3alget), IM management node of SAP system monitoring metric output function is created under Enterprise category.

■ Metric output function (Fluentd)

To obtain information on the monitoring status of script execution results, use the metric output function of Fluentd's log monitoring function. For details about metric output function, see 3.15.3(14) Metric output function.

For details about Fluentd's IM management node, see 3.15.6(1) Creating IM management node. For the category and jp1_pc_nodelabel values specified in the jp1_pc_category, see Sample file of system log information monitoring definition file for SAP system (fluentd_sap_syslog_tail.conf) in Chapter 2. Definition Files and Sample file of CCMS alert information monitoring definition file for SAP system (fluentd_sap_alertlog_tail.conf) in Chapter 2. Definition Files in the JP1/Integrated Management 3 - Manager Command, Definition File and API Reference.