SAP HanaDB Monitoring Extension

Use Case

Deployable on premise or in the cloud, SAP HANA is an in-memory data platform that lets you accelerate business processes, deliver more business intelligence, and simplify your IT environment. By providing the foundation for all your data needs, SAP HANA removes the burden of maintaining separate legacy systems and siloed data, so you can run live and make better business decisions in the new digital economy. HanaDB Monitoring Extension gathers metrics and sends them to the AppDynamics Metric Browser.


  1. This extension requires the Java Machine Agent.
  2. The HanaDB Driver ngdbc.jar is required.
  3. A HanaDB User with the following privileges is required:
    1. MONITORING: this role contains privileges for full read-only access to all metadata, the current system status in system and monitoring views, and the data collected by the statistics server.
    2. PUBLIC : this role contains privileges for filtered read-only access to the system views.


Either Download the Extension from the AppDynamics Marketplace or Download the Extension from the Github releases or Build from Source.

  1. Download the HanaDBMonitor-<version>.zip file to the directory <machine agent home>/monitors.

    Run the following command after you have successfully downloaded the .zip file in the correct directory.

    > unzip HanaDBMonitor-<VERSION>.zip -d  <machine agent home>/monitors/
  2. Copy the ngdbc.jar in the <machine agent home>/monitors/HanaDBMonitor/ folder
  3. Set up config.yml. At minimum this is:
        - connectionString: "jdbc:sap://<cluster1_host1>:<port>;<cluster1_host2>:<port>?communicationtimeout=20000"
          username: ""
          password: ""
  4. Restart the Machine Agent.

Build from Source

  1. Clone this repository
  2. Run mvn -DskipTests clean install
  3. The file can be found in the target directory

Directory Structure

src/main/resources/configContains monitor.xml and config.yml
src/main/javaContains source code to the HanaDB monitoring extension
targetOnly obtained when using maven. Run 'maven clean install' to get the distributable .zip file.
pom.xmlmaven build script to package the project (required only if changing Java code)


Metrics can be configured in the config.yml file.

A reference for the HanaDB System Views can be found here

The Queries can be adjusted to your needs to gather metrics from the HanaDB. Please see below example:

  - statement: "select * from M_DISK_USAGE where USED_SIZE >= 0"
     - name: "HOST"
       type: "name"
     - name: "USAGE_TYPE"
       type: "name"
     - name: "USED_SIZE"
       type: "metric"
       convertFrom: ""
       convertTo: ""
     - name: "HOST"
       type: "name"
       type: "metric"
       convertFrom: ""
       convertTo: ""
       type: "metric"
       convertFrom: ""
       convertTo: ""

Password Encryption Support

Please visit this page to get detailed instructions on password encryption. The steps in this document will guide you through the whole process.


Always feel free to fork and contribute any changes directly via GitHub.


  1. Verify Machine Agent Data: Please start the Machine Agent without the extension and make sure that it reports data. Verify that the machine agent status is UP and it is reporting Hardware Metrics.
  2. config.yml: Validate the file here.
  3. Metric Limit: Please start the machine agent with the argument -Dappdynamics.agent.maxMetrics=5000 if there is a metric limit reached error in the logs. If you don't see the expected metrics, this could be the cause.
  4. Check Logs: There could be some obvious errors in the machine agent logs. Please take a look.
  5. The config cannot be null error: This usually happens when on a windows machine in monitor.xml you give config.yml file path with linux file path separator /. Use Windows file path separator \ e.g. monitors\Monitor\config.yml. For Windows, please specify the complete path.
  6. Collect Debug Logs: Edit the file, conf/logging/log4j.xml and update the level of the appender com.appdynamics and com.singularity to debug. Let it run for 5-10 minutes and attach the logs to a support ticket.
  7. If you encounter Exceptions with [Read timed out] please check the communicationtimeout setting within the connectionString. The query and the processing time might not fit into the specified window.


For any questions or feature request, please contact AppDynamics Center of Excellence.