Monitoring HANA 2.0 with replication
Hello everyone, today I want to show a way how you can integrate your HANA 2.0 system in the Solution Manager System Monitoring. This way is one, that I invented together with my colleges in a customer project. Its based on several wiki pages from wiki.snc.sap.com and Notes.
Disclaimer: I made this document as neutral as possible, but I was out of demo landscapes. All blacken out parts are hostnames, SID, system numbers, ports, etc….
With a little bit of your imagination, you will manage that. I believe in you!
What we are dealing with
SAP Solution Manager 7.2 SPS 6 on HANA 2.0
2 Application Server ABAP on 2 VM
2 HANA Appliance with each HANA 2.0 as Tenant. PRIM und SEC
DB replication between PRIM and SEC is active.
Logical hostname for each server
Virtual hostnames for each DB Tenant
We also have nearly the similar for the JAVA part, but I wont set an focus on that in this article.
Lets do it
First we need the Diagnostic Agent (with hostagent) on every host. Depending on your landscape configuration, don’t forget it to set it “on the fly”. How do you install and configure the DAA and hostagent is already very good descripted in this SNC wiki. Please keep in mind that HANA 2.0 is a little bit different as 1.0.
For the SLD connection there is a very handy tool in the HANA Lifecycle Manager.
Modify the hostname parameters in global.ini of the Tenant database with hdbstudio or SQL.
sldsystemhome = <logical hostname database> sldvirtdbhome = <virtual hostname database you will use for the High Availability Scenario (should be the same as in the DEFAULT.PFL at the application server)>
ALTER SYSTEM ALTER CONFIGURATION ('global.ini','DATABASE','<database_name>') SET ('customizable_functionalities', '<parameter_name>')='<parameter_value>'
Further information in this wiki:
The Managed System Configuration does sometimes not what it should do, so I prefer to set the DB Connection manually in transaction DBCO in the Solution Manager System.
DB connection is the ID of the Tenant.
Connection info is the <virtual_adress>:3<systemNR><TenantPort>
That’s the initial setting, it will be changed later automatically (sometimes not)
HANA System DB
Now we have to configure the System DB in the LMDB. The primary side we give the extended ID <SID>PRIM an the secondary side <SID>SEC.
Then we jump on the PRIM in “Technical Instances” and add the primary instance with logical hostname, call it master and add the server installation path.
After that, save and resynchronize with SLD.
In the first screen click on details and now you should see the Tenants with SAP_HDBSubSystemDatabase.
Do the same for the SEC side an set in “Related Database” the Replication Relation (PRIM side or SEC side).
For more information:
HANA Main Instance
Now we create a main instance for our HANA system.
Create manually in the LMDB a new HANA instance with the virtual hostname an the HANA Tenant <SID>.
Add in “Addition Attributes of Technical System” a connection for “Remote Database Connection” and “Application Monitoring”. Use the connection from DBCO.
Go to the SLD and “Technical System”. There select the DB instance you created in the step before and add the software instance “SAP HANA Platform Edition 2.0” with database and client.
For more information, but outdated: Note 2503076
PRIM and SEC instance in LMDB
In LMDB choose the Tenant DB with the logical hostnames that were provided automatically and change the extended SID to <SID>PRIM and <SID>SEC. In “Additional Attributes of Technical System” add the Remote Database Connection und Remote DB Connection For Application Monitoring.
In “Related Database” add the main instance with the virtual hostname and the secondary side with its hostname. Save it and double check it on secondary side.
Go to Software -> Product Instances (Details) and add “SAP HANA Platform Edition 2.0” with Client and Database. Set the Diagnostic Relevance on Database. Do that on PRIM, SEC and main.
I think, that the last two steps normally had should be done by the SLD and LMDB process automatically, but in this project I tried a hundred times and it didn’t. So I have done it manually.
If you know a better, more automatically way, please don’t hesitate and write me, or better reply on this blog!
Managed System Configuration
Now there should be the PRIM and SEC HANA instance in the Managed System Configuration of the ABAP instance.
In the System Monitoring you can now add the Monitoring Templates to the instances. Please use your own self design Templates, because the default ones have a lot false positives and negatives.
If it was done everything right, it should look like this in the system monitoring:
I used this screen, because it is a good example for a false negative. The Monitoring had a problem to delete the propagated status from database. It is solved with Note 2192841 https://launchpad.support.sap.com/#/notes/2192841