歡迎您光臨本站 註冊首頁

NAGIOS 通過簡訊通知監控內容,無法到達?

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

NAGIOS 通過簡訊通知監控內容,無法到達?

NAGIOS 通過簡訊通知監控內容,無法到達?
各位朋友:
     請教一個問題。我通過nagios 2.9監控伺服器,而且有簡訊貓,現在監控內容可以通過郵件提示,但是通過簡訊下發總是失敗。

我用手動測試下發信息可以接收到:

/usr/bin/printf "192.1681.200 is down" |/usr/local/gnokii/bin/gnokii --sendsms 1381152***
這樣手機可以收到信息。
我在   commands.cfg 文件里寫
#duanxin test
define command {
command_name   host-notify-by-sms
command_line /bin/echo -e "$HOSTADDRESS$ ($NOTIFICATIONNUMBER$)n$HOSTSTATE$n$SHORTDATETIME$"| /usr/local/gnokii/bin/gnokii --sendsms $CONTACTPAGER$
}
define command {
command_name   notify-by-sms
command_line   /usr/bin/printf "%b" "$HOSTADDRESS$($NOTIFICATIONNUMBER$)n$SERVICEDESC$-$SERVICESTATE$n$OUTPUT$n$SHORTDATETIME$" | /usr/local/gnokii/bin/gnokii --sendsms 13811522***
}
定義這樣的命令下發。
而且在
more contacts.cfg
define contact{
        contact_name                    admin
        alias                           system admin
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands   notify-by-sms,notify-by-email
        host_notification_commands      host-notify-by-sms,host-notify-by-email
        email                           net@isojoy.com
        pager                           13811522***
        address1                        cn119110@hotmail.com
        address2                        net@isojoy.com
        }

這個文件里也做了設備,現在吧MYSQL 服停止,EMAIL 會馬上通知我,但是簡訊一直沒有收到!

tail  -f  /usr/local/nagios/var/nagios.log
SERVICE NOTIFICATION: admin;nagios-server;mysql;CRITICAL;notify-by-email;Cant connect to MySQL server on 127.0.0.1 (111)
SERVICE NOTIFICATION: admin;nagios-server;mysql;CRITICAL;notify-by-sms;Cant connect to MySQL server on 127.0.0.1 (111)
日誌里也記錄下發,但是一直沒有收到,不知道為什麼呢?
《解決方案》

LZ: 我一直想搞一個Linux下面也可以用的簡訊貓。不知道你的是什麼牌子?在哪裡能買到?多少錢?
請給我回個郵件 liuzh66@gmail.com

多謝!

[火星人 ] NAGIOS 通過簡訊通知監控內容,無法到達?已經有1184次圍觀

http://coctec.com/docs/service/show-post-29970.html