cd /usr/local/nagios/libexec
if [ $# -ne 5 ];then
phone=”$1″
passwd=”$2″
sendto=”$3″
msg=”$4″
/usr/local/bin/python /usr/local/fetion/fetion.py “$phone” “$passwd” “$sendto” ”
fi
define command{
command_name notify-service-by-SMS
command_line /usr/local/nagios/libexec/SMS mobile no. password mobile no. “** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **”
}
#’notify-host-by-sms’ command definition
define command{
command_name notify-host-by-SMS
command_line /usr/local/nagios/libexec/SMS mobile no. password mobile no. “** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **”
}
——————————————————–
name generic-contact
service_notification_period 24×7
host_notification_period 24×7
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands notify-service-by-email,notify-service-by-SMS
host_notification_commands notify-host-by-email,notify-host-by-SMS
register 0
}
————————————————————
转载于:https://blog.51cto.com/gnnjw/410731
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/110703.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...