Installation of Centreon-Nagios-SAP-Plugins on RHEL5
Installation of Centreon-Nagios-SAP-Plugins on RHEL5 Applies to SAP ERP 2005 Redhat RHEL 5 on x86_64 Systems
Summary This paper describes the steps to install a monitoring solution based on Nagios. SAP CCMS monitors can be ed and monitored from within this application.
Author(s): Pascal Bombardier Company: BULL Created on: 30 October 2008
Author Bio Pascal Bombardier has 10 years of experience in ERP consulting, integration and development. His competences ranges from Operating systems to ERP software, from functional analysis to implementation and development. He is working for BULL company and currently ed the SAP Linuxlab as a hardware partner, where he certifies SAP software components on Bull hardware.
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 1
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
Table of Contents 1.Nagios Pre-requisites.....................................................................................................................................3 2.Nagios installation..........................................................................................................................................3 3.Centreon Pre-requisites.................................................................................................................................4 4.Centreon Installation......................................................................................................................................4 5.SAP plugins compilation................................................................................................................................5 6.Configuration Example...................................................................................................................................6 7.Application Views...........................................................................................................................................7
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 2
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
1.Nagios Pre-requisites Check that the following packages are installed : yum yum yum yum
install install install install
httpd gcc glibc glibc-common gd gd-devel
Disable SELinux (permissive mode)
2.Nagios installation Nagios QuickStart http://nagios.sourceforge.net/docs/3_0/quickstart-fedora.html Create nagios
/usr/sbin/add -m nagios wd nagios /usr/sbin/groupadd nagcmd /usr/sbin/mod -G nagcmd nagios /usr/sbin/mod -G nagcmd apache
Install Nagios from source tar xvf nagios-3.0.4.tar.gz cd nagios-3.0.4 ./configure --with-command-group=nagcmd make all make install make install-init make install-config make install-commandmode
Configure the mail address vi /usr/local/nagios/etc/objects/s.cfg
Finish Nagios installation
make install-webconf htwd -c /usr/local/nagios/etc/htwd.s nagios service httpd restart
Install the Nagios plugins tar xzf nagios-plugins-1.4.13.tar.gz cd nagios-plugins-1.4.13 ./configure --with-nagios-=nagios --with-nagios-group=nagios make make install
Check Nagios configuration
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg Comment line 551 (#time_change_threshold=)
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 3
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
Install and start Nagios service chkconfig --add nagios chkconfig nagios on service nagios start
3.Centreon Pre-requisites Install rrdtool from EPEL website wget http://.fedora.redhat.com/pub/epel/5/i386/epel-release-53.noarch.rpm rpm -Uvh epel-release-5-3.noarch.rpm yum install rrdtool
Install php – mysql yum install mysql-server yum install php php-mysql php-pear php-snmp php-posix php-gd php-ldap yum install libpng libpng-devel perl-Config-IniFiles perl-Crypt-DES perl-DigestHMAC perl-Digest-SHA1 perl-GD perl-IO-Socket-INET6 perl-Net-SNMP rrdtool-perl perl-Socket6
Start Mysql
chkconfig mysqld on service mysqld start
4.Centreon Installation tar xvf centreon-1.4.2.7.tar.gz ./install.sh ... Where is installed RRD perl modules [RRDs.pm] ? /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi
Goto http://SERVER/centreon/ php pear extensions failed
Setup the proxy
pear config-set http_proxy "http://proxy:8080"
Copy paste the command line from the browser to a shell pear install -o -f --alldeps DB DB_DataObject DB_DataObject_FormBuilder MDB2 Date Numbers_Roman Numbers_Words HTML_Common HTML_QuickForm HTML_QuickForm_advmultiselect HTML_Table Auth_SASL HTTP Image_Canvas Image_Color Image_Graph Image_GraphViz Mail Mail_Mime Net_SMTP Net_Socket Net_Traceroute Net_Ping Validate SOAP
Click on “Recheck”, all pear extensions should be OK. Enter Centreon Database Name : centreon
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 4
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
Enter Centreon Data Storage Database Name : centstorage
the Nagios configuration files from the server “/usr/local/nagios/etc” to the client PC nagios.cfg cgi.cfg resource.cfg objects/*
In Centreon, goto resource.cfg files
“Configuration / Nagios / Import” and the nagios.cfg, cgi.cfg and
Restarting Nagios from Centreon does not work # visudo
Comment the following line #Defaults
requiretty
Configure service performance collection in nagios.cfg In Centreon, goto “Configuration / Nagios / Nagios CFG”
and set
Performance Data Processing Option Yes Service Performance Data Processing Command process-service-perfdata Service Performance Data File /usr/local/nagios/var/service-perfdata
Start the ODS database chkconfig –add ods chkconfig ods on service ods start
5.SAP plugins compilation Get the following files sap-ccms-plugin-0.7.3.tar.gz http://sourceforge.net/projects/nagios-sap-ccms/ RFC_14-10004427_700NUC.SAR http://service.sap.com/ / RFCSDK / 700 / Non-Unicode / x86_64 sap_ccms.patch.txt http://www.nagios-portal.org/wbb/index.php?page=Thread&postID=81533 # tar xvf sap-ccms-plugin-0.7.3.tar.gz # sapcar -xvf RFC_14-10004427_700NUC.SAR # rfcsdk/lib/librfc.a sap-ccms-plugin-0.7.3/src/sap_moni : overwrite `sap-ccms-plugin-0.7.3/src/sap_moni/librfc.a'? y # patch -p0 < sap_ccms.patch.txt patching file sap-ccms-plugin-0.7.3/src/Makefile patching file sap-ccms-plugin-0.7.3/src/sap_moni/Makefile # cd sap-ccms-plugin-0.7.3/src # vi check_sap_cons.c ...
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 5
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
printf("%s %s %s %s %s | %s=%s\n",nodes[j].Mtsysid, nodes[j].Mtmcname, nodes[j].Objectname, nodes[j].Mtnameshrt, nodes[j].currentValue, nodes[j].Mtnameshrt, nodes[j].currentValue); ... # make
Installation
# sap_moni.so /lib64 # check_sap check_sap_cons check_sap_instance check_sap_instance_cons check_sap_multiple check_sap_mult_no_thr check_sap_system check_sap_system_cons /usr/local/nagios/libexec/ # chown apache:nagios /usr/local/nagios/libexec/* # -a config /etc/sapmon
6.Configuration Example Adjust .cfg to to the systems
[_BUL] =-d BUL -u sap* -p wd -h ls3023 -s 00
Adjust agents.cfg to monitor the required indicator [TEMPLATE_100] MONI_SET_NAME="SAP CCMS Monitor Templates" MONI_NAME="Dialog Overview" PATTERN_0="*ResponseTime" [TEMPLATE_105] MONI_SET_NAME="SAP CCMS Monitor Templates" MONI_NAME="Dialog Overview" PATTERN_0="*sLoggedIn" [TEMPLATE_110] MONI_SET_NAME="SAP CCMS Monitor Templates" MONI_NAME="Entire System" PATTERN_0="*EsAct" [TEMPLATE_200] MONI_SET_NAME="SAP CCMS Monitor Templates" MONI_NAME="Database" PATTERN_0="*Fullest tablespace" [TEMPLATE_210] MONI_SET_NAME="SAP CCMS Monitor Templates" MONI_NAME="Entire System" PATTERN_0="*DBRequestTime" [TEMPLATE_300] MONI_SET_NAME="SAP CCMS Monitor Templates" MONI_NAME="Operating System" PATTERN_0="*5minLoadAverage" [TEMPLATE_999] MONI_SET_NAME="SAP CCMS Monitor Templates"
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 6
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
MONI_NAME="Entire System" PATTERN_0="*"
7.Application Views
Welcome screen
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 7
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
Service View
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 8
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
Hosts View
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 9
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
Reporting Screen
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 10
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
Host Graphics
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 11
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
Host Graphics with SAP Monitors
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 12
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
Services Configuration – Main View
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 13
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
Service Configuration – Detail View
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 14
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
Generate Nagios Configuration
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 15
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
Related Content Please include at least three references to SDN documents or web pages. SAP on Linux •
https://www.sdn.sap.com/irj/sdn/linux
ed Platforms •
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/792dd957-0d01-0010-319be1211e5c66b0
SAP on Linux Forum •
https://www.sdn.sap.com/irj/sdn/forum?forumID=189
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 16
Installation of Centreon-Nagios-SAP-Plugins on RHEL5
Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not ed by SAP. Changes made based on this information are not ed and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.
SAP DEVELOPER NETWORK | sdn.sap.com © 2007 SAP AG
BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com 17