nagios 飞信命令

define command{
        command_name    notify-host-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" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
        }

# 'notify-service-by-email' command definition
define command{
        command_name    notify-service-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$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
        }


# 'fetion sms host' command definition
define command{
        command_name		notify-host-by-sendmsg
        command_line		/usr/local/src/fx/fetion --mobile=137xxxxxxx --pwd=111111 --to=137xxxxxx --msg-utf8="$NOTIFICATIONTYPE$ alert - Host $HOSTNAME$ is $HOSTSTATE$ on $LONGDATETIME$"
        }


# 'fetion sms service' command definition
define command{
        command_name		notify-service-by-sendmsg
        command_line		/usr/local/src/fx/fetion --mobile=137xxxxxxx --pwd=111111 --to=137xxxxxxx --msg-utf8="$NOTIFICATIONTYPE$: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ on $LONGDATETIME$"
        }

你可能感兴趣的:(mobile,nagios)