sap_host_exporter

command module
v0.0.0-...-89a9d69 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

SAP Host Exporter

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

Exporter CI Dashboards 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 & build
  2. Go
  3. RPM
Manual clone & build
git clone https://github.com/SUSE/sap_host_exporter
cd sap_host_exporter
make
make install
Go
go get github.com/SUSE/sap_host_exporter
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:

export DISTRO=SLE_15_SP2 # change as desired
zypper addrepo https://download.opensuse.org/repositories/server:/monitoring/$DISTRO/server:monitoring.repo
zypper install prometheus-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.

Hint: You can deploy a full SAP NetWeaver cluster via Terraform with SUSE/ha-sap-terraform-deployments; this exporter and the whole Prometheus monitoring stack will be automatically installed and configured for you.

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.

License

Copyright 2020 SUSE LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file 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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
lib
test
mock_sapcontrol
Package mock_sapcontrol is a generated GoMock package.
Package mock_sapcontrol is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL