Mk_sap_hana makes host stale

CMK version: 2.1.0p15
OS version: SLES 15 SP 4

Hello all,
ive been experiencing on a couple of VMs the issues described in this Topic.

From what ive understand, by reading the above topic, this problem is related to hung connections caused by some plugins in my case its the fault of mk_sap_hana.

I post here what i wrote on the above mentioned topic:

Got the same issue with the mk_saphana plugin.

So the solution you guys came up with is to disable the problematic plugin ?
Unfortunately, in my case, this is impossible since the VM are productive and they need to be monitored 24/7.

Restarting the cmk-agent-ctl-daemon.service made the trick but this solution cannot be considered definitive.

In the attached screenshot, as you can see, the agent was “freezed” after ive restarted it i got no problem since the 26/05:

This plugin is present in several monitored VMs but only this is causing issue.

The check of every service are being executed every 2 minute.

Is there a way to prevent the agent from “freezing” again ? Could, maybe, a wrong configuration of the mk_saphana plugin be the root cause of this problem ?

Kr,
Davide

As said, since ive been monitoring productive environment, it is impossible for me to disable the plugin.

Is there a valid reason that causes this behavior ? Is there some possible workaround ?

Thx,
Davide

Hi,

For us the DB agent plugins from checkmk are not very efficient and have a quite long runtimes on bigger environments. Because of that we developed our own agent plugins for DB2 and SAP HANA.
If you are a brave gui you can give it a try:

mk_sap_hana.sh (10.4 KB)

The code is using a different configuration file:

sap_hana_tenant.cfg

The config file is a BASH array
dbs = (sysid,key,db sysid,key,db)
Each DB has a unique KEY!

You may use -d for debugging and -v for verbose output.

It works here since a year or so and we are on 2.1.0p37.

let me know in case you need further help but please consider I am not a SAP HANA expert :wink:

regards

Mike

Hi Mike,
thanks for the response.

Im currently trying it on a development :grin:.

I need a hand to better understand the sap_hana_tenant.cfg file syntax.

dbs = (sysid,key,db sysid,key,db)

So, the key, is the one listed by hdbuserstore List but the other parameter ?
Is sysid referring to the instance number or it is referred to the SID ?
The db parameter ?

Also, can i specify only one database in the dbs array ?

Thanks in advance,
Davide

Correct, the key is what you get with hdpuserstore list
sysid is the instance number, eg. 00
db is the database name like systemdb

Basically its a BASH array of strings
So you can have

dbs = (00,user1_key,systemdb 00,user2_key,mydb 01,user3_key,otherdb)

Thanks Mike,
after removing the space in the array it woks out perfectly :grin:.

Davide

Can you please mark the answer as the solution if it solved your problem?

1 Like

To sum up:
the script provided by Mike (thanks again Mike :smiley: ) made the trick.
The host which have installed the mk_sap_hana plugin appear to not be stale anymore, this is probably caused since the new script is more light and extract less data than the default one.

I was having trouble by setting UP the sap_hana_tenant.cfg file, solved the issue by removing the white space in the bash array:

> dbs = (instance_number,key,db_name) <- WRONG

> dbs=(instance_number,key,db_name) <- CORRECT

Davide

Hi dabia,

As I provided the correct plugin it would be fair if you mark my answer as the solution.

thank you

1 Like