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.

Prerequisite

  • This extension requires the Java Machine Agent.
  • The HanaDB Driver ngdbc.jar is required.
  • Installation

    1. Download the HanaDBMonitor-<version>.zip file found on this page into the following 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. Set up config.yml:
      # HanaDB Host/IP and port.
      host: ""
      port: ""
      
      # Specify this key if Password Encryption Support is required. If not keep it empty
      # If specified, DBPassword is now the encrypted passwords.
      encryptionPassword: ""
      encryptionKey: ""
      
      # DB username and password.
      username: ""
      password: ""
      
      jdbcPrefix: "jdbc:sap://"
      jdbcOptions: "?communicationtimeout=2000"
      
      #prefix used to show up metrics in AppDynamics
      metricPathPrefix: "Custom Metrics|HanaDB"
      #This will create it in specific Tier. Replace 
      #metricPrefix:  "Server|Component:|Custom Metrics|HanaDB Server|"
      # number of concurrent tasks
      numberOfThreads: 10
      
      queries:
        - statement: "select * from M_DISK_USAGE where USED_SIZE >= 0"
          columns:
           - name: "HOST"
             type: "name"
           - name: "USAGE_TYPE"
             type: "name"
           - name: "USED_SIZE"
             type: "metric"
             convertFrom: ""
             convertTo: ""
        - statement: "select HOST, USED_PHYSICAL_MEMORY, FREE_PHYSICAL_MEMORY from M_HOST_RESOURCE_UTILIZATION"
          columns:
           - name: "HOST"
             type: "name"
           - name: "USED_PHYSICAL_MEMORY"
             type: "metric"
             convertFrom: ""
             convertTo: ""
           - name: "FREE_PHYSICAL_MEMORY"
             type: "metric"
             convertFrom: ""
             convertTo: ""
      
      
    3. Restart the Machine Agent.

    Directory Structure

    Directory/FileDescription
    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

    Metrics can be configured in the config.ymlfile.

    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:

    queries:
      - statement: "select * from M_DISK_USAGE where USED_SIZE >= 0"
        columns:
         - name: "HOST"
           type: "name"
         - name: "USAGE_TYPE"
           type: "name"
         - name: "USED_SIZE"
           type: "metric"
           convertFrom: ""
           convertTo: ""
      - statement: "select HOST, USED_PHYSICAL_MEMORY, FREE_PHYSICAL_MEMORY from M_HOST_RESOURCE_UTILIZATION"
        columns:
         - name: "HOST"
           type: "name"
         - name: "USED_PHYSICAL_MEMORY"
           type: "metric"
           convertFrom: ""
           convertTo: ""
         - name: "FREE_PHYSICAL_MEMORY"
           type: "metric"
           convertFrom: ""
           convertTo: ""
    
    

    Contributing

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

    Support

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