Check SAP Availability and Response Time

CHECK_SAP_RFCPING

Check SAP Availability and Response Time (Packet Round Trip Time) via SAP load balancing or directly to a specific application server based on SAPs RFCSDK.

This plugin calls rfcping to connect to a SAP application or message server and returns some state info (eg: packet round trip time).

Plugin created for Nagios Monitoring.

Synopsis:

check_sap_rfcping [-h] [-L] [-t timeout] [-v] [-V] [-r r3name] [-s
       sysnr] [-n pingcount] [-i pinginterval] [-k pingKB] [-w warn] [-c crit]
       -m mshost | -a ashost 

if the --ww and --cc options are missing the average round trip time will not be checked.

for more information call:

check_sap_rfcping -h
perldoc check_sap_rfcping

Requirements

    RFCSDK from SAP

How to check the SAP RFC functionality

Please check the functionality with the user under which the nagios service is running (normally nagios: su - nagios)

Don't check with root, because of global permissions.

Examples of native rfcping commands:

Checking a SPECIFIC APPLICATION SERVER

rfcping ashost=/H/sapgate1/S/3297/H/pcintel sysnr=53

Checking servers via LOAD BALANCING

rfcping r3name=BIN mshost=/H/sapgate1/S/3297/H/hs0311 group=PUBLIC

rfcping is a command from the SAP RFCSDK toolkit (http://service.sap.com/swdc).

Information about where to find the current version of the RFC Library is described in SAP Note 413708. SAP Note 27517 describes the installation of the RFCSDK.

SAP is a trademark of SAP AG, Germany.

Adaption of Script:

Before calling the script please check some variables which defines the path to rfcping and libraries.

use constant RFCPING => "/usr/local/rfcsdk/bin/rfcping"; 

Please modify the environment variable LD_LIBRARY_PATH if you havn't defined the rfcsdk libraries globally via /etc/ld.so.conf (ldconfig).

$ENV{'LD_LIBRARY_PATH'} = '/usr/local/rfcsdk/lib/';

Configuration:

Copy this plugin to the nagios plugin installation directory e.g.: /usr/lib(64)/nagios/plugin

Command Definition:

        # "check_sap_rfcping" command definition
        # checking via Message Server
        define command{
          command_name check_sap_rfcping_ms
          command_line $USER1$/check_sap_rfcping -m /H/$HOSTADDRESS$ -r $ARG1$
        }

        # checking a specific application server
        define command{
          command_name check_sap_rfcping_as
          command_line $USER1$/check_sap_rfcping -a /H/$HOSTADDRESS$ -s $ARG1$
        }

Plugin History:

    Version 1.3 - 2009-12-04       LD_LIBRARY_PATH added if not globally defined
    Version 1.2 - 2009-02-17       some new "use lib .." statements
    Version 1.1 - 2007-12-19       fixed problem with **ePN
                                   (Missing right curly or square ...)
    Version 1.0 - 2007-12-16       first release