Since Checkmk 1.5 it is possible to monitor SAP HANA. The easiest way to get the Plugin working is to use the Agent Bakery: WATO - CONFIGURATION → Monitoring Agents → Rules → AGENT PLUGINS → SAP HANA.
In this manual we will explain all configuration options for SAP Hana. Especially the options of sap_hana.cfg if the use of the Agent Bakery is not possible.
SAP HANA Config example
Note: Please don't modify sap_hana.cfg if you're using the Agent Bakery.
1. Example: Credentials = User and password / RUNAS = instance / SID = XYZ
2. Example: Credentials = User and password / RUNAS = agent / SID = XYZ
3. Example: Credentials = USERSTOREKEY / RUNAS = instance or agent / SID = XYZ
Note: The configuration of the SID in the sap_hana.cfg is optional. The agent plugin detects the SID automatically
4. Example: Credentials for Connect (ODBC interface)
With Werk #10937 (Checkmk 2.0) we introduced a new check to monitor the status of SAP HANA Connect. It supports HANA V1.0 and HANA 2.0. In order to get the needed data from SAP HANA, you need to update the agent plugin "mk_sap_hana" as well.
Setup > Monitoring Agents > SAP HANA > Edit rule: SAP HANA
5. Difference between RUNAS=agent and RUNAS=instance
→ With RUNAS=agent the Checkmk Agent tries to execute the mk_sap_hana Plugin
→ With RUNAS=instance the Checkmk Agent connects with the SAP instance user to the database
Execute plugin manually
For testing and diagnosis you can execute the plugin manually. You need to set 'MK_CONFDIR' that mk_sap_hana can find the configuration file which is stored in /etc/check_mk
The mk_sap_hana Plugin provides a detailed log. Therefore, you can use --debug. Please redirect the output to a file for a better overview.
For debugging, it can be useful to execute some SQL-Statements manually. Please check out the debug log for more information.
Here is one example for SAP HANA Status: