Skip to content

Latest commit

 

History

History
129 lines (84 loc) · 4.36 KB

README.md

File metadata and controls

129 lines (84 loc) · 4.36 KB

SAP Host Exporter

This is a bespoke Prometheus exporter enabling the monitoring of SAP systems (a.k.a. SAP NetWeaver applications).

Exporter CI

Table of Contents

  1. Features
  2. Installation
  3. Usage
    1. Configuration
    2. Metrics
    3. systemd integration
  4. Contributing
    1. Design
    2. Development
  5. License

Features

The exporter is a stateless HTTP endpoint. On each HTTP request, it pulls runtime data from the SAP system via the SAPControl web interface.

Exported data include:

  • Start Service processes
  • Enqueue Server stats
  • AS Dispatcher work process queue stats

Installation

The project can be installed in many ways, including but not limited to:

  1. Manual clone and build
  2. Go
  3. RPM

Manual clone and build

git clone https://github.com/SUSE/sap_host_exporter
cd sap_host_exporter
make build
make install

Go

go install github.com/SUSE/sap_host_exporter@latest

RPM

You can find the repositories for RPM based distributions in SUSE's Open Build Service.
On openSUSE or SUSE Linux Enterprise you can just use the zypper system package manager:

zypper install sap_host_exporter

Usage

You can run the exporter as follows:

./sap_host_exporter --sap-control-url $SAP_HOST:$SAP_CONTROL_PORT

Though not strictly required, it is advised to run the exporter locally in the target SAP instance host, and connect to the SAPControl web service via Unix Domain Sockets:

./sap_host_exporter --sap-control-uds /tmp/.sapstream50013

For further details on SAPControl, please refer to the official SAP docs to properly connect to the SAPControl service.

The exporter will expose the metrics under the /metrics path, on port 9680 by default.

Configuration

The runtime parameters can be configured either via CLI flags or via a configuration file, both of which are completely optional.

For more details, refer to the help message via sap_host_exporter --help.

Note: the built-in defaults are tailored for the latest version of SUSE Linux Enterprise and openSUSE.

The program will scan, in order, the current working directory, $HOME/.config, /etc and /usr/etc for files named sap_host_exporter.(yaml|json|toml). The first match has precedence, and the CLI flags have precedence over the config file.

Please refer to the example YAML configuration for more details.

Metrics

The exporter won't export any metric it can't collect, but since it doesn't care about which subsystems are present in the monitored target, failing to collect metrics is not considered a hard failure condition. Instead, in case some of the collectors fail to either register or perform collect cycles, a soft warning will be printed out in the log.

Refer to doc/metrics.md for extensive details about all the exported metrics.

systemd integration

A systemd unit file is provided with the RPM packages. You can enable and start it as usual:

systemctl --now enable prometheus-sap_host_exporter

Contributing

Pull requests are more than welcome!

We recommend having a look at the design document and the development notes before contributing.

Copying

Copyright 2020-2025 SUSE LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this code repository except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.