Page 1 of 1

Custom Notification Command

Posted: Thu Feb 04, 2021 4:52 am
by Eireocean
Good Day,

We are trying to create a custom notification command using msend (BMC Patrol). I am just not familar with what would be the default variables available in Nagios Core. Here is the command as of now ... comes from AIX environemnt but using in Linux :

Code: Select all

# 'notify-service-by-msend' command definition
define command{
        command_name    notify-service-by-msend
        command_line    /usr/bin/sudo /bmcpatrol/pw/server/bin/msend -n @srv000000/1828#mc -a ITISS_EV -b "itiss_host=${HOST};itiss_ipaddress=127.0.0.1;itiss_severity=Critical;itiss_message=${SERVICE} UNAVAILABLE. PLEASE CONTACT XXX.;itiss_date=`date +'%d/%m/%Y'`;itiss_time=`date +'%H:%M'`;itiss_clearable=SET;itiss_eid=${SERVICE}_${HOST};itiss_ci=${SERVICE}"
        }
The variables that are releavant outside of Nagios are below with possible options to replace them :

${HOST} = $HOSTADDRESS / $HOSTALIAS
${SERVICE} = $SERVICEDESC


Are these correct ?

Regards