LogicMonitor’s SAP HANA monitoring package leverages the SAP JDBC package to monitor and alert on the status of the HANA database in SAP systems.
Logicmonitor’s SAP HANA package has been developed with version 2.0 of SAP HANA on-premise server and version 4.0 of the SAP HANA cloud. It may work on older versions. Installations of SAP using databases other than HANA are not supported by this package.
As SAP releases newer versions of HANA, LogicMonitor will test and extend coverage as necessary.
Follow these steps to set up monitoring for HANA databases in SAP systems.
- Requires Logicmonitor Collector version 30.000 or above.
- SAP HANA JDBC Jar installed on the Collector.
- (Recommended) For on-premises installations, use SNMP to monitor Linux installations used by SAP HANA.
Install the SAP JDBC on a Collector
LogicMonitor uses the SAP JDBC connector to get data from SAP HANA. The SAP JDBC is .jar file that must be installed on the Collector.
- This suite was tested with the version 2.8.14 of the JDBC driver but may work with other versions. See the Maven Repository for SAP JDBC.
- For instructions for adding this .jar file to the Collector, see Adding Groovy Libraries.
Add Resources Into Monitoring
Add your SAP HANA resources into monitoring if they have not yet been added. For more information on adding resources into monitoring, see Adding Devices.
- For SAP HANA Cloud installations, use the cloud endpoint as the hostname. An example cloud endpoint is: 5f670e4e-bdda-455d-9bee-f24284290121.hana.trial-us10.hanacloud.ondemand.com
- For on-premises installations, we recommend using the DNS name of the SAP service for the hostname. Otherwise, the IPv4 address will also work.
- (Optional) For Linux installations, enable SNMP to monitor each Linux device.
Obtain Credentials for SAP HANA
Logicmonitor needs an SAP HANA user and password to access data. This user needs “read only” access to some specific system tables. Use the SAP SQL console to create a user and give the user access to the tables/views.
Use the following configuration as a guide for creating a user and setting permissions. Your SAP installation may require a different configuration.
- Replace the phrase “Enter Your Password” with the password for the LM_User.
- To use a different username, replace LM_USER with the username of your choice.
CREATE RESTRICTED USER LM2_USER PASSWORD "Enter Your Password" NO FORCE_FIRST_PASSWORD_CHANGE; ALTER USER LM_USER ENABLE CLIENT CONNECT; GRANT CATALOG READ TO LM_USER; GRANT SELECT ON _SYS_STATISTICS.STATISTICS_CURRENT_ALERTS TO LM_USER; GRANT SELECT ON SYS.M_BACKUP_CATALOG TO LM_USER; GRANT SELECT ON SYS.M_BLOCKED_TRANSACTIONS TO LM_USER; GRANT SELECT ON SYS.M_CACHES TO LM_USER; GRANT SELECT ON SYS.M_CONNECTION_STATISTICS TO LM_USER; GRANT SELECT ON SYS.M_CONNECTIONS TO LM_USER; GRANT SELECT ON SYS.M_DATABASE TO LM_USER; GRANT SELECT ON SYS.M_DATABASES TO LM_USER; GRANT SELECT ON SYS.M_DATABASE_HISTORY TO LM_USER; GRANT SELECT ON SYS.M_DISKS TO LM_USER; GRANT SELECT ON SYS.M_EXPENSIVE_STATEMENTS TO LM_USER; GRANT SELECT ON SYS.M_GARBAGE_COLLECTION_STATISTICS TO LM_USER; GRANT SELECT ON SYS.M_HOST_INFORMATION TO LM_USER; GRANT SELECT ON SYS.M_HOST_RESOURCE_UTILIZATION TO LM_USER; GRANT SELECT ON SYS.M_JOB_PROGRESS TO LM_USER; GRANT SELECT ON SYS.M_LANDSCAPE_HOST_CONFIGURATION TO LM_USER; GRANT SELECT ON SYS.M_LICENSE TO LM_USER; GRANT SELECT ON SYS.M_MEMORY TO LM_USER; GRANT SELECT ON SYS.M_RECORD_LOCKS TO LM_USER; GRANT SELECT ON SYS.M_SERVICE_MEMORY TO LM_USER; GRANT SELECT ON SYS.M_SERVICE_STATISTICS TO LM_USER; GRANT SELECT ON SYS.M_SERVICE_THREADS TO LM_USER; GRANT SELECT ON SYS.M_SERVICES TO LM_USER; GRANT SELECT ON SYS.M_SHARED_MEMORY TO LM_USER; GRANT SELECT ON SYS.M_SYSTEM_OVERVIEW TO LM_USER; GRANT SELECT ON SYS.M_TABLE_VIRTUAL_FILES TO LM_USER; GRANT SELECT ON SYS.M_TRANSACTIONS TO LM_USER; GRANT SELECT ON SYS.M_VOLUME_IO_STATISTICS TO LM_USER; GRANT SELECT ON SYS.M_VOLUME_SIZES TO LM_USER; GRANT SELECT ON SYS.M_VOLUMES TO LM_USER;
Assign Properties to Resources
The following custom properties must be set on the SAP HANA resource within LogicMonitor. For more information on setting properties, see Resource and Instance Properties.
|SNMP credentials||(Optional) The properties required to establish SNMP credentials vary depending on the SNMP version being used. See Defining Authentication Credentials.|
|hana.port||(Optional) The TCP port on which HANA is access; defaults to 39013. Enter as many ports as needed with comma separators.|
|hana.dbname||(Optional) HANA database name. Only needed if manually setting up instances. If more then one dbname is needed, use a comma to separate the names.|
|hana.dbname.url||(Optional) If hana.dbname is configured then a URL is required for each dbname. The URL format is:
Import all the SAP HANA LogicModules from the LogicMonitor Public Repository. See LogicModules in Package.
If these LogicModules are already present, ensure you have the most recent versions. If all setup requirements are complete, data collection will start once the LogicModules are imported.
- Multiple ports are needed for multiple database instances. Each database is discovered from the TCP port.
- If a database uses multiple hosts, the hosts should automatically be discovered. Make sure the primary endpoint for HANA is the hostname of the resource.
- The “SAP HANA Troubleshooter” DataSource captures configuration and permissions issues. If data is not being returned as expected, navigate to this DataSource in the Resources tree and check for the existence of errors (errors display as instances in the Resources tree). Additionally, any errors captured by the troubleshooter DataSource are included in alert details.
- The modules in this package are designed with a debug mode embedded in the data collection scripts. If issues occur, turn on debug mode by setting the variable debug to “true” to get more information in the output when testing the script in the Collector Debug Facility. For more information on testing scripts in the Collector Debug Facility, see Script Troubleshooting.
LogicModules in Package
LogicMonitor’s package for SAP HANA consists of the following LogicModules. For full coverage, please ensure that all of these LogicModules are imported into your LogicMonitor platform.
|addCategory_SAP_HANA||PropertySource||For Local instances of SAP HANA, will add category “HANA” and for cloud instances will add “HANA_Cloud”.|
|HANA Backup Age||DataSource||Time in seconds since the end of the last backup for each backup time.|
|HANA Database Availability||DataSource||Monitors availability of HANA service in a single or multi-tenant environment. Will also alert if the collector can’t connect to HANA. This is the main alerting module for connectivity.|
|HANA Disk Usage||DataSource||Monitors disk usage of HANA in a single or multi-tenant environment.|
|HANA Host Memory Utilization||DataSource||SAP Database Host memory utilization statistics as reported by the SAP database. Checks for multiple hosts on a SAP instance and groups by host.|
|HANA Memory by Database Instance||DataSource||Breakdown of memory use by database and process running on each database. Some processes are assigned to multiple database and will show up twice. If a process in a multi-tenant environment hits alert status there may be duplicate alerts.|
|HANA Service Status||DataSource||SAP Database service status as reported by the SAP database.|
|HANA TableSize On Disk (virtual files)||DataSource||This will return the sum of the physical size of all virtual file containers on disk level, representing the total size of the catalog objects on disk level. If this deviates drastically from the data volume utilization you observe, there are objects utilizing the data volume other than database tables and indices. If the sum of the virtual file containers does not match the disk utilization observed on OS level for the data volume, further checks are necessary.|
|HANA Top 10 Active Connections||DataSource||Top 10 connections with some connection information. Checks how many connections have happened in the last collection time period. Looks at the count of connections over the last 15 minute to create instances and the polls every 5 minutes for count of connections and amount of data transferred.|
|SAP Troubleshooter||DataSource||Checks for known issues on SAP databases. Checks connections strings and table availability to reveal configuration problems.|
When setting static datapoint thresholds on the various metrics tracked by this package’s DataSources, LogicMonitor follows the technology owner’s best practice KPI recommendations. If necessary, we encourage you to adjust these predefined thresholds to meet the unique needs of your environment. For more information on tuning datapoint thresholds, see Tuning Static Thresholds for Datapoints.