#!/bin/sh

# Arguments: '$LASTHOSTCHECK$' '$HOSTNAME$' '$SERVICEDESC$' '$HOSTGROUPNAME$' '$SERVICEGROUPNAME$' '$SERVICESTATE$' '$SERVICESTATETYPE$' '$SERVICEDURATIONSEC$' '$HOSTDURATIONSEC$' '$SERVICEOUTPUT$' '$SERVICEPERFDATA$'

SVC_GROUP=$5
if [ -z "$SVC_GROUP" ]
then
	SVC_GROUP="DEFAULT_GROUP"
fi

if [ "$SVC_GROUP" = '$SERVICEGROUPNAME$' ]
then
	SVC_GROUP="DEFAULT_GROUP"
fi

#if [ "$SVC_GROUP" = '$SERVICEGROUPNAME$' ]
#then
#	SVC_GROUP=""
#fi

#/usr/local/notify/notify_service.pl.new "$1" "$2" "$3" "$4" "$SVC_GROUP" "$6" "$7" "$8" "$9" "${10}" "${11}" >>/tmp/punotify.log 2>&1

/usr/local/notify/notify_service "$1" "$2" "$3" "$4" "$SVC_GROUP" "$6" "$7" "$8" "$9" "${10}" "${11}" >>/usr/local/monitoring/log/punotify.log 2>&1

