sapnetweaverreceiver

package module
v1.29.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

README

SAP Netweaver Receiver

This receiver collects metrics from SAP Netweaver instance based on the SAPControl Web Service Interface. Stats are collected from the GetAlertTree and EnqGetLockTable methods.

Supported Pipelines

  • Metrics

How It Works

  1. The user configures this receiver in a pipeline.
  2. The user configures a supported component to route telemetry from this receiver.

Prerequisites

  • SAP Netweaver 7.10+
  • The ability to authenticate to the OS
  • SAP read-only permission
  • For SAP version 7.38+, (Windows: execute permission, Unix: write permission) is required for each instance of sapstartsrv on the host. If this permission is being assigned to a group, the - monitoring user in the group must have the group set as primary. If authentication or authorization check fails the request will fail with “Invalid Credentials" or "Permission denied" fault string.
  • The receiver must run on host to execute OS executables in order to collect sapnetweaver.certificate.validity, sapnetweaver.abap.rfc.count and sapnetweaver.abap.session.count metrics.

More information on how to setup a SAP NetWeaver Stack for each operating system and version can be found here.

Configuration

Field Type Default Description
metrics map (default: see DefaultMetricsSettings here) Allows enabling and disabling specific metrics from being collected in this receiver.
endpoint string http://localhost:50013 The name of the metric created.
username string (no default) Specifies the username used to authenticate using basic auth.
password string (no default) Specifies the password used to authenticate using basic auth.
profile string (no default) Specifies the profile path in the form of /sapmnt/SID/profile/SID_INSTANCE_HOSTNAME to collect sapnetweaver.abap.rfc.count and sapnetweaver.abap.session.count metrics.
collection_interval duration 60s This receiver collects metrics on an interval. This value must be a string readable by Golang's time.ParseDuration.
Example Configuration
receivers:
  sapnetweaver:
    metrics:
    endpoint: http://localhost:50013
    username: root
    password: password
    collection_interval: 60s
processors:
  batch:
exporters:
  googlecloud:
    project: my-gcp-project

service:
  pipelines:
    metrics:
      receivers: [sapnetweaver]
      processors: [batch]
      exporters: [googlecloud]
Example Configuration With TLS
receivers:
  sapnetweaver:
    metrics:
    endpoint: https://sapnetweaver.example.com:50014
    username: root
    password: password
    collection_interval: 60s
    tls:
      ca_file: "certs/ca.crt"
      key_file: "certs/server.key"
      cert_file: "certs/server.crt"
processors:
  batch:
exporters:
  googlecloud:
    project: my-gcp-project

service:
  pipelines:
    metrics:
      receivers: [sapnetweaver]
      processors: [batch]
      exporters: [googlecloud]

The full list of settings exposed for this receiver are documented here with detailed sample configurations here.

Metrics

The following metrics are available with ICM version 7.81+:

  • sapnetweaver.job.aborted: GetAlertTree name = AbortedJobs
  • sapnetweaver.request.count: GetAlertTree name = StatNoOfRequests
  • sapnetweaver.request.timeout.count: GetAlertTree name = StatNoOfTimeouts
  • sapnetweaver.connection.error.count: GetAlertTree name = StatNoOfConnectErrors

Details about the metrics produced by this receiver can be found in metadata.yaml

Documentation

Overview

Package sapnetweaverreceiver is an OTel compatible receiver

Index

Constants

View Source
const (

	// MBToBytes converts 1 megabytes to byte
	MBToBytes = 1000000
)

Variables

View Source
var (
	ErrNoUsername      = errors.New("invalid config: missing username")
	ErrNoPwd           = errors.New("invalid config: missing password")
	ErrInvalidHostname = errors.New("invalid config: invalid hostname")
	ErrInvalidEndpoint = errors.New("invalid config: invalid endpoint")
)

Errors for missing required config parameters.

Functions

func NewFactory

func NewFactory() receiver.Factory

NewFactory creates a factory for SAP Netweaver receiver.

Types

type Config

type Config struct {
	scraperhelper.ScraperControllerSettings `mapstructure:",squash"`
	configtls.TLSClientSetting              `mapstructure:"tls,omitempty"`
	confighttp.HTTPClientSettings           `mapstructure:"tls,omitempty,squash"`
	// Metrics defines which metrics to enable for the scraper
	MetricsBuilderConfig metadata.MetricsBuilderConfig `mapstructure:",squash"`
	// Endpoint string `mapstructure:"endpoint"`
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
	Profile  string `mapstructure:"profile,omitempty"`
}

Config defines configuration for SAP Netweaver metrics receiver.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate validates the configuration by checking for missing or invalid fields

Directories

Path Synopsis
internal
models
Package models contain request and response structures used for the SAPControl Web Service Interface
Package models contain request and response structures used for the SAPControl Web Service Interface

Jump to

Keyboard shortcuts

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