################################################################################
#
# NOTIFICATION COMMANDS
#
################################################################################

# 'host-notify-by-email' command definition
define command{
	command_name	host-notify-by-email
	command_line	/usr/bin/printf "%b" "***** Nagios  *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | sed -e 's/&quot/"/g' -e 's/&lt/</g' -e 's/&gt/>/g' -e 's/&amp/\&/g' | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" -r 'Nagios Integration <nagi@hst>' $CONTACTEMAIL$
}

# 'service-notify-by-email' command definition
define command{
	command_name	service-notify-by-email
	command_line	/usr/bin/printf "%b" "***** Nagios  *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | sed -e 's/&quot/"/g' -e 's/&lt/</g' -e 's/&gt/>/g' -e 's/&amp/\&/g' | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" -r 'Nagios Integration <nagi@hst>' $CONTACTEMAIL$
}

################################################################################
#
# PERFORMANCE DATA COMMANDS
#
################################################################################

# 'process-service-perfdata' command definition
#define command{
#  command_name  process-service-perfdata
#  command_line  /opt/nagiosgrapher/contrib/fifo_write /opt/nagiosgrapher/var/ngraph.pipe '$HOSTNAME$\t$SERVICEDESC$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n' 3
#}

################################################################################
#
# OCSP / OCHP Commands
#
################################################################################

define command{
  command_name  submit_service_check_result
  command_line  /wwwm/nagi/instroot/custom-plugins/libexec/event_handler/submit_service_check_result $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATEID$ '$SERVICEOUTPUT$' '$SERVICEPERFDATA$'
}

define command{
  command_name  submit_host_check_result
  command_line  /www/nagi/instroot/custom-plugins/libexec/event_handler/submit_service_check_result '$HOSTNAME$' '$HOSTSTATEID$' '$HOSTOUTPUT$'
}

define command{
  command_name    check_snmp_traffic_device
  command_line    $USER2$/check_snmp_int.pl -H $HOSTADDRESS$ -C $ARG1$ -w 300000,300000 -c 300001,300001 -n '$ARG2$' -k -f -Y -B -r
}
