# Discovery

This plugin can be integrated with Pandora FMS *Discovery*.

To do this, you must upload the ".disco" package, which can be downloaded from the Pandora FMS library:

[https://pandorafms.com/library/](https://pandorafms.com/library/)

[![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-04/scaled-1680-/io5image.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-04/io5image.png)

Once uploaded, SAP HANA environments can be monitored by creating *Discovery* tasks from the *Management &gt; Discovery &gt; Applications* section.

[![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-04/scaled-1680-/Jteimage.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-04/Jteimage.png)

For each task, the following minimum parameters will be required:

- **SAP HANA target string:** IP address of the host running SAP HANA, port, and database instance.
- **Credentials:** Custom-type username and password. To use them, a new credential must be created in *Management &gt; Configuration &gt; Credential store*.

[![step2.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-04/scaled-1680-/step2.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-04/step2.png)

The task configuration can also be adjusted to customize the desired monitoring:

- **Max threads**: Maximum number of concurrent threads used to execute monitoring queries.
- **Target agent**: Allows manually defining the agent names where modules will be created. One agent name must be provided for each *SAP HANA target string*, preserving the same order. If left empty, the plugin will automatically create agents using the **HOST - DATABASE** format.
- **Regexp to filter modules**: Enables module filtering using regular expressions.
- **Allow regexp**: If filtering is enabled, only modules whose names match this regular expression will be created.
- **Regexp to discard modules**: Enables module exclusion using regular expressions.
- **Deny regexp**: If exclusion is enabled, modules whose names match this regular expression will not be created.
- **Backups Size**: Creates the module *backups\_estimated\_size\_bytes*, containing the estimated SAP HANA backup size.
- **Timestamp**: Creates the module *timestamp*, containing the current database date/time to verify time drift.
- **Hana Version**: Creates the module *version*, containing the installed SAP HANA version.
- **Data Disk Information**: Creates the modules *volumes\_count* and *volumes\_io\_entries*, with basic volume and I/O activity information.
- **Hana Service Statistics**: Creates modules for each detected SAP HANA service, including *ACTIVE\_STATUS*, *PROCESS\_CPU\_TIME*, *TOTAL\_CPU\_TIME*, *PROCESS\_MEMORY*, *TOTAL\_MEMORY*, *AVAILABLE\_MEMORY*, *ACTIVE\_REQUEST\_COUNT*, *PENDING\_REQUEST\_COUNT*, *ACTIVE\_THREAD\_COUNT*, *THREAD\_COUNT*, *OPEN\_FILE\_COUNT*, *REQUESTS\_PER\_SEC*, *RESPONSE\_TIME*, *START\_TIME*, and *SYS\_TIMESTAMP*.
- **Hana CPU Time**: Creates the modules *cpu\_total\_time\_ms*, *cpu\_process\_time\_ms*, and *cpu\_service\_count*, with aggregated CPU usage metrics across SAP HANA services.
- **Hana RS Fragmentation**: Creates the module *rowstore\_fragmentation\_pct*, with the estimated Row Store fragmentation percentage.
- **Hana License**: Creates the modules *license\_expiration\_date*, *license\_days\_remaining*, *license\_memory\_limit*, *license\_hardware\_key*, *license\_installation\_number*, *license\_product\_name*, *license\_system\_id*, *license\_swproductname*, and *license\_enforced*, with SAP HANA environment license information.
- **Hana IO Stats**: Creates the modules *io\_total\_read\_bytes*, *io\_total\_write\_bytes*, and *io\_total\_time\_ms*, with aggregated read, write, and I/O timing metrics.
- **Hana Get Stated Connections**: Creates the modules *connections\_total*, *connections\_running*, *connections\_idle*, *connections\_queued*, *connections\_disconnected*, and *connections\_unknown*, with active connection status metrics.
- **Hana Memory**: Creates the modules *memory\_used\_bytes* and *memory\_allocation\_limit\_bytes*, with memory usage and allocation limit metrics.
- **Hana Transactions**: Creates the modules *blocked\_transactions*, *blocked\_transactions\_distinct\_users*, and *open\_transactions*, with information about open and blocked transactions.
- **Execute custom queries**: Enables execution of custom queries defined in the **Custom queries** field.
- **Custom queries**: Allows creating multiple custom modules using *check\_begin*/*check\_end* blocks.
- **Custom module prefix**: Defines a prefix that will be appended to generated module names.
- **Custom modules (legacy)**: Allows defining custom modules using the legacy **module:query:type:description** format.

[![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2026-05/scaled-1680-/u4uimage.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2026-05/u4uimage.png)

Examples of custom queries:

```
check_begin
name connections_total
description Total connections (SYS.M_CONNECTIONS)
operation value
target SELECT COUNT(*) FROM SYS.M_CONNECTIONS
datatype generic_data
unit conns
check_end

check_begin
name connections_active
description Active RUNNING connections (SYS.M_CONNECTIONS)
operation value
target SELECT COUNT(*) FROM SYS.M_CONNECTIONS WHERE CONNECTION_STATUS = 'RUNNING'
datatype generic_data
unit conns
check_end

check_begin
name memory_used_bytes
description Total used memory (INSTANCE_TOTAL_MEMORY_USED_SIZE)
operation value
target SELECT COALESCE(SUM(INSTANCE_TOTAL_MEMORY_USED_SIZE),0) FROM SYS.M_HOST_RESOURCE_UTILIZATION
datatype generic_data
unit bytes
check_end

check_begin
name memory_allocation_limit_bytes
description Memory allocation limit (ALLOCATION_LIMIT)
operation value
target SELECT COALESCE(SUM(ALLOCATION_LIMIT),0) FROM SYS.M_HOST_RESOURCE_UTILIZATION
datatype generic_data
unit bytes
check_end

check_begin
name cpu_total_time_ms
description Aggregated total CPU time (TOTAL_CPU_TIME)
operation value
target SELECT COALESCE(SUM(TOTAL_CPU_TIME),0) FROM SYS.M_SERVICE_STATISTICS
datatype generic_data
unit ms
check_end

check_begin
name cpu_process_time_ms
description Aggregated process CPU time (PROCESS_CPU_TIME)
operation value
target SELECT COALESCE(SUM(PROCESS_CPU_TIME),0) FROM SYS.M_SERVICE_STATISTICS
datatype generic_data
unit ms
check_end

check_begin
name service_total_memory_bytes
description Aggregated total service memory (TOTAL_MEMORY)
operation value
target SELECT COALESCE(SUM(TOTAL_MEMORY),0) FROM SYS.M_SERVICE_STATISTICS
datatype generic_data
unit bytes
check_end

check_begin
name service_available_memory_bytes
description Aggregated available memory (AVAILABLE_MEMORY)
operation value
target SELECT COALESCE(SUM(AVAILABLE_MEMORY),0) FROM SYS.M_SERVICE_STATISTICS
datatype generic_data
unit bytes
check_end

check_begin
name io_total_read_bytes
description Aggregated total bytes read (TOTAL_READ_SIZE)
operation value
target SELECT COALESCE(SUM(TOTAL_READ_SIZE),0) FROM SYS.M_VOLUME_IO_TOTAL_STATISTICS
datatype generic_data
unit bytes
check_end

check_begin
name io_total_write_bytes
description Aggregated total bytes written (TOTAL_WRITE_SIZE)
operation value
target SELECT COALESCE(SUM(TOTAL_WRITE_SIZE),0) FROM SYS.M_VOLUME_IO_TOTAL_STATISTICS
datatype generic_data
unit bytes
check_end

check_begin
name io_total_time_ms
description Aggregated total I/O time (TOTAL_IO_TIME)
operation value
target SELECT COALESCE(SUM(TOTAL_IO_TIME),0) FROM SYS.M_VOLUME_IO_TOTAL_STATISTICS
datatype generic_data
unit ms
check_end

check_begin
name rowstore_free_pct
description Row Store free percentage (FREE_SIZE/ALLOCATED_SIZE)
operation value
target SELECT CASE WHEN SUM(ALLOCATED_SIZE)=0 THEN 0 ELSE ROUND(SUM(FREE_SIZE)*100.0/SUM(ALLOCATED_SIZE),2) END FROM SYS.M_RS_MEMORY
datatype generic_data
unit %
min_warning 40
min_critical 20
inverse_warning 1
inverse_critical 1
check_end

check_begin
name hana_time_utc
description Database UTC timestamp
operation value
target SELECT TO_VARCHAR(CURRENT_UTCTIMESTAMP) FROM DUMMY
datatype generic_data_string
check_end

check_begin
name hana_services_running
description Number of active services (ACTIVE_STATUS='YES')
operation value
target SELECT COUNT(*) FROM SYS.M_SERVICE_STATISTICS WHERE ACTIVE_STATUS = 'YES'
datatype generic_data
unit services
check_end
```

Examples of legacy queries:

```
legacy_memory_used:SELECT COALESCE(SUM(INSTANCE_TOTAL_MEMORY_USED_SIZE),0) FROM SYS.M_HOST_RESOURCE_UTILIZATION:generic_data:Legacy memory usage
legacy_hana_version:SELECT VERSION FROM SYS.M_DATABASE:generic_data_string:Legacy HANA version
```