Skip to main content

Saphana Receiver

Status Available in: contrib Maintainers: @dehaansa Source: opentelemetry-collector-contrib

Supported Telemetry

Metrics

Overview

Prerequisites

The receiver is intended to support SAP HANA version 2, older versions have not been tested.
A monitoring user requires SELECT access to the relevant monitoring views. The following sql script should create a monitoring role and apply it to a monitoring user if executed by a user with sufficient permissions connected to the SAP HANA instance.
--Create the user
CREATE RESTRICTED USER otel_monitoring_user PASSWORD <password>;

--Enable user login
ALTER USER otel_monitoring_user ENABLE CLIENT CONNECT;

--Create the monitoring role
CREATE ROLE OTEL_MONITORING;

--Grant permissions to the relevant views
GRANT CATALOG READ TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_BACKUP_CATALOG TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_BLOCKED_TRANSACTIONS TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_CONNECTIONS TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_CS_ALL_COLUMNS TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_CS_TABLES TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_DATABASE TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_DISKS TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_HOST_RESOURCE_UTILIZATION TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_LICENSES TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_RS_TABLES TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_SERVICE_COMPONENT_MEMORY TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_SERVICE_MEMORY TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_SERVICE_REPLICATION TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_SERVICE_STATISTICS TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_SERVICE_THREADS TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_SERVICES TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_VOLUME_IO_TOTAL_STATISTICS TO OTEL_MONITORING;
GRANT SELECT ON SYS.M_WORKLOAD TO OTEL_MONITORING;
GRANT SELECT ON _SYS_STATISTICS.STATISTICS_CURRENT_ALERTS TO OTEL_MONITORING;

--Add the OTEL_MONITOR role to the monitoring user
GRANT OTEL_MONITORING TO otel_monitoring_user;

Configuration

The following settings are required:
  • endpoint (default: localhost:33015): The hostname/IP address and port of the SAP HANA instance
  • username
  • password
The following settings are optional:
  • collection_interval (default = 60s): This receiver runs on an interval. Each time it runs, it queries memcached, creates metrics, and sends them to the next consumer. The collection_interval configuration option tells this receiver the duration between runs. This value must be a string readable by Golang’s ParseDuration function (example: 1h30m). Valid time units are ns, us (or Β΅s), ms, s, m, h.
  • initial_delay (default = 1s): defines how long this receiver waits before starting.
  • tls:
    • insecure (default = true): whether to disable client transport security for the exporter’s connection.
    • ca_file: path to the CA cert. For a client this verifies the server certificate. Should only be used if insecure is set to false.
    • cert_file: path to the TLS cert to use for TLS required connections. Should only be used if insecure is set to false.
    • key_file: path to the TLS key to use for TLS required connections. Should only be used if insecure is set to false.
Example:
receivers:
  saphana:
    endpoint: "localhost:33015"
    collection_interval: 60s
    metrics:
      saphana.cpu.used:
        enabled: false
The full list of settings exposed for this receiver are documented in config.go with detailed sample configurations in testdata/config.yaml.

Metrics

Details about the metrics produced by this receiver can be found in metadata.yaml. Further details of the monitoring queries used to collect them may be found in queries.go.
If all of the metrics collected by a given monitoring query are marked as enabled: false in the receiver configuration, the monitoring query will not be executed.

Metrics

Metric NameDescriptionUnitTypeAttributes
βœ… saphana.alert.countNumber of current alerts.{alerts}UpDownCounteralert_rating
βœ… saphana.backup.latestThe age of the latest backup by start time.sGauge
βœ… saphana.column.memory.usedThe memory used in all columns.ByUpDownCountercolumn_memory_type, column_memory_subtype
βœ… saphana.component.memory.usedThe memory used in components.ByUpDownCountercomponent
βœ… saphana.connection.countThe number of current connections.{connections}UpDownCounterconnection_status
βœ… saphana.cpu.usedTotal CPU time spent.msCountercpu_type
βœ… saphana.disk.size.currentThe disk size.ByUpDownCounterpath, disk_usage_type, disk_state_used_free
βœ… saphana.host.memory.currentThe amount of physical memory on the host.ByUpDownCountermemory_state_used_free
βœ… saphana.host.swap.currentThe amount of swap space on the host.ByUpDownCounterhost_swap_state
βœ… saphana.instance.code_sizeThe instance code size, including shared libraries of SAP HANA processes.ByUpDownCounter
βœ… saphana.instance.memory.currentThe size of the memory pool for all SAP HANA processes.ByUpDownCountermemory_state_used_free
βœ… saphana.instance.memory.shared.allocatedThe shared memory size of SAP HANA processes.ByUpDownCounter
βœ… saphana.instance.memory.used.peakThe peak memory from the memory pool used by SAP HANA processes since the instance started (this is a sample-based value).ByUpDownCounter
βœ… saphana.license.expiration.timeThe amount of time remaining before license expiration.sGaugesystem, product
βœ… saphana.license.limitThe allowed product usage as specified by the license (for example, main memory).{licenses}UpDownCountersystem, product
βœ… saphana.license.peakThe peak product usage value during last 13 months, measured periodically.{licenses}UpDownCountersystem, product
βœ… saphana.network.request.average_timeThe average response time calculated over recent requestsmsGauge
βœ… saphana.network.request.countThe number of active and pending service requests.{requests}UpDownCounteractive_pending_request_state
βœ… saphana.network.request.finished.countThe number of service requests that have completed.{requests}Counterinternal_external_request_type
βœ… saphana.replication.average_timeThe average amount of time consumed replicating a log.usGaugeprimary_host, secondary_host, port, replication_mode
βœ… saphana.replication.backlog.sizeThe current replication backlog size.ByUpDownCounterprimary_host, secondary_host, port, replication_mode
βœ… saphana.replication.backlog.timeThe current replication backlog.usUpDownCounterprimary_host, secondary_host, port, replication_mode
βœ… saphana.row_store.memory.usedThe used memory for all row tables.ByUpDownCounterrow_memory_type
βœ… saphana.schema.memory.used.currentThe memory size for all tables in schema.ByUpDownCounterschema, schema_memory_type
βœ… saphana.schema.memory.used.maxThe estimated maximum memory consumption for all fully loaded tables in schema (data for open transactions is not included).ByUpDownCounterschema
βœ… saphana.schema.operation.countThe number of operations done on all tables in schema.{operations}Counterschema, schema_operation_type
βœ… saphana.schema.record.compressed.countThe number of entries in main during the last optimize compression run for all tables in schema.{records}UpDownCounterschema
βœ… saphana.schema.record.countThe number of records for all tables in schema.{records}UpDownCounterschema, schema_record_type
βœ… saphana.service.code_sizeThe service code size, including shared libraries.ByUpDownCounterservice
βœ… saphana.service.countThe number of services in a given status.{services}UpDownCounterservice_status
βœ… saphana.service.memory.compactors.allocatedThe part of the memory pool that can potentially (if unpinned) be freed during a memory shortage.ByUpDownCounterservice
βœ… saphana.service.memory.compactors.freeableThe memory that can be freed during a memory shortage.ByUpDownCounterservice
βœ… saphana.service.memory.effective_limitThe effective maximum memory pool size, calculated considering the pool sizes of other processes.ByUpDownCounterservice
βœ… saphana.service.memory.heap.currentThe size of the heap portion of the memory pool.ByUpDownCounterservice, memory_state_used_free
βœ… saphana.service.memory.limitThe configured maximum memory pool size.ByUpDownCounterservice
βœ… saphana.service.memory.shared.currentThe size of the shared portion of the memory pool.ByUpDownCounterservice, memory_state_used_free
βœ… saphana.service.memory.usedThe used memory from the operating system perspective.ByUpDownCounterservice, service_memory_used_type
βœ… saphana.service.stack_sizeThe service stack size.ByUpDownCounterservice
βœ… saphana.service.thread.countThe number of service threads in a given status.{threads}UpDownCounterthread_status
βœ… saphana.transaction.blockedThe number of transactions waiting for a lock.{transactions}UpDownCounter
βœ… saphana.transaction.countThe number of transactions.{transactions}Countertransaction_type
βœ… saphana.uptimeThe uptime of the database.sUpDownCountersystem, database
βœ… saphana.volume.operation.countThe number of operations executed.{operations}Counterpath, disk_usage_type, volume_operation_type
βœ… saphana.volume.operation.sizeThe size of operations executed.ByCounterpath, disk_usage_type, volume_operation_type
βœ… saphana.volume.operation.timeThe time spent executing operations.msCounterpath, disk_usage_type, volume_operation_type

Attributes

Attribute NameDescriptionTypeValues
stateThe state of network request.stringactive, pending
ratingThe alert rating.string
subtypeThe subtype of column store memory.stringdata, dict, index, misc
typeThe type of column store memory.stringmain, delta
componentThe SAP HANA component.string
statusThe connection status.stringrunning, idle, queueing
typeThe type of cpu.stringuser, system, io_wait, idle
databaseThe SAP HANA database.string
stateThe state of the disk storage.stringused, free
usage_typeThe SAP HANA disk & volume usage type.string
stateThe state of swap data.stringused, free
typeThe type of network request.stringinternal, external
stateThe state of memory.stringused, free
pathThe SAP HANA disk path.string
portThe SAP HANA port.string
primaryThe primary SAP HANA host in replication.string
productThe SAP HANA product.string
modeThe replication mode.string
typeThe type of row store memory.stringfixed, variable
schemaThe SAP HANA schema.string
typeThe type of schema memory.stringmain, delta, history_main, history_delta
typeThe type of operation.stringread, write, merge
typeThe type of schema record.stringmain, delta, history_main, history_delta
secondaryThe secondary SAP HANA host in replication.string
serviceThe SAP HANA service.string
typeThe type of service memory.stringlogical, physical
statusThe status of services.stringactive, inactive
systemThe SAP HANA system.string
statusThe status of threads.stringactive, inactive
typeThe transaction type.stringupdate, commit, rollback
typeThe type of operation.stringread, write

Resource Attributes

Attribute NameDescriptionTypeEnabled
db.systemThe type of database system.stringβœ…
saphana.hostThe SAP HANA host.stringβœ…

Configuration

Example Configuration

saphana:
  metrics:
    saphana.cpu.used:
      enabled: false
  endpoint: example.com:30015
  username: otel
  password: password
  collection_interval: 2m

Last generated: 2026-04-13