check_logfiles: Check SAP-Upgrade logfiles for userinteraction

During a SAP upgrade the admin needs to to manual interaction (checking SPAM). On a long running upgrade, with the following code the admin will get alerted if this happens and does not need to sit infront of the monitor all the time.

Was much appreciated ūüôā


@searches = (
 {
 tag => 'SAPup',
 logfile => '/usr/sap/put/abap/log/SAPup.log',
 criticalpatterns => 'begin dialogue',
 options => 'noperfdata'
 },
 {
 tag => 'SLOG701',
 logfile => '/usr/sap/put/abap/log/SLOG701',
 criticalpatterns => 'already in use',
 options => 'noperfdata'
 },
);

Implementing this into Nagios:


define service{
use                     svc_tpl_check_logfiles_prod
host_name               <hostname>
_LOGCMDFILE             /usr/local/nagios3/etc/check_logfiles_sapupgrade.cmd
_LOGPATTERN             SLOG701
service_description     check SLOG701
contact_groups          con_grp_sapupgrade_prod
first_notification_delay 0
}
define service{
use                     svc_tpl_check_logfiles_prod
host_name               <hostname>
_LOGCMDFILE             /usr/local/nagios3/etc/check_logfiles_sapupgrade.cmd
_LOGPATTERN             SAPup
service_description     check SAP UP
contact_groups          con_grp_sapupgrade_prod
first_notification_delay 0
}

Servicetemplate:


define service{
 name                            svc_tpl_check_logfiles_prod
 use                             svc_tpl_service_prod
 check_command                   cmd_check_logfiles
 register                        0
 max_check_attempts              1
 check_interval                  5 #normal check interval in hard state (minutes)
 retry_interval                  1 #check interval in soft state (minutes)
}

Checkcommand


define command{
 command_name    cmd_check_logfiles
 command_line    $USER4$/check_nrpe -H $HOSTADDRESS$ -c check_logfiles -a $_SERVICELOGCMDFILE$ $_SERVICELOGPATTERN$
}

Advertisements
This entry was posted in aix, Nagios, SAP and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.