How to Configure SAP Application service in Zabbix

 

Step 1:- Login to server

SOLMAN:~ # insserv /etc/init.d/zabbix_agentd [ To start automatically after reboot]

 

 

Step 2:- Login to application

SOLMAN:~ # su - mhsadm

SOLMAN:mhsadm 51> which sapcontrol

/usr/sap/MHS/SYS/exe/run/sapcontrol

SOLMAN:mhsadm 53> which R3trans

/usr/sap/MHS/SYS/exe/run/R3trans

SOLMAN:mhsadm 54> echo $LD_LIBRARY_PATH

/usr/sap/MHS/SYS/global/syb/linuxx86_64/sybodbc:/sybase/MHS/ASE-15_0/lib:/sybase/MHS/OCS-15_0/lib:/sybase/MHS/OCS-15_0/lib3p64:/sybase/MHS/OCS-15_0/lib3p:/usr/sap/MHS/SYS/exe/run:/usr/sap/MHS/SYS/exe/uc/linuxx86_64:/usr/sap/hdbclient

SOLMAN:mhsadm 55>

 

Step 3:-

SOLMAN:~ # visudo

zabbix ALL=(ALL) NOPASSWD: /opt/zabbix/r3trans.sh

 

Step 4:-

# vi /opt/zabbix/r3trans.sh

sudo su - mhsadm -c "/usr/sap/MHS/SYS/exe/run/R3trans -d -w /tmp/trans_zabbix.log" | egrep finished | awk '{ print $3 }' | grep -o "[0-9]*"

 

Step 5:-

SOLMAN:~ # chmod 755 /opt/zabbix/r3trans.sh

 

Step 6:-

SOLMAN:~ # vi /opt/zabbix/bin/check_sap_hana_health.sh

export LD_LIBRARY_PATH=/usr/sap/MHS/SYS/global/syb/linuxx86_64/sybodbc:/sybase/MHS/ASE-15_0/lib:/sybase/MHS/OCS-15_0/lib:/sybase/MHS/OCS-15_0/lib3p64:/sybase/MHS/OCS-15_0/lib3p:/usr/sap/MHS/SYS/exe/run:/usr/sap/MHS/SYS/exe/uc/linuxx86_64:/usr/sap/hdbclient

/usr/sap/MHS/SYS/exe/run/sapcontrol -nr 00 -function GetProcessList

 

Step 7:-

SOLMAN:~ # chmod 755 /opt/zabbix/bin/check_sap_hana_health.sh

 

Step 8:-

SOLMAN:~ # usermod G sapsys zabbix

 

Step 9:-

SOLMAN:~ # vi /opt/zabbix/etc/zabbix_agentd.conf

UserParameter=check_sap_hana[*],/opt/zabbix/bin/check_sap_hana_health.sh | egrep $1

UserParameter=check_r3trans,sudo /opt/zabbix/r3trans.sh

 

 

Step 10:-

SOLMAN:~ # /etc/init.d/zabbix_agentd restart

 

Step 11:- Verify the data

SOLMAN:~ # /opt/zabbix/bin/check_sap_hana_health.sh

 

08.12.2015 13:26:16

GetProcessList

OK

name, description, dispstatus, textstatus, starttime, elapsedtime, pid

disp+work, Dispatcher, GREEN, Running, Message Server connection ok, Dialog Queu e time: 0.00 sec, AS Java: All processes running, 2015 11 06 16:11:33, 765:14:43 , 20655

igswd_mt, IGS Watchdog, GREEN, Running, 2015 11 06 16:11:33, 765:14:43, 20656

 

SOLMAN:~ # /opt/zabbix/r3trans.sh

0000

SOLMAN:~ #

 

Step 12:- add in zabbix front end.

 

Please Create below Macros:

For HANA_APP for Template: Template_SAP_HANA_ABAP_APP

{$DISPATCHERPORT} 3200

{$GWPORT} 3900

{$MSGSRVPRT} 3600

 

PLEASE WRITE A FEEDBACK OR SUGGESTIONS TO BELOW EMAIL IDS.

prashantkumar.chawan@gmail.com

info@mytara.co.in