【基本介绍】
这里我们介绍nagios利用飞信提供短信报警功能
【飞信安装测试】 - linux平台
http://bbs.it-adv.net/viewthread.php?tid=916&extra=&page=1
1. libACE库的支持
拷贝相应的so文件到/usr/lib下面
2. fetion的安装配置
解压fetion文件到安装路径,例如/usr/local/fetion
3. 测试飞信是否正常 - 前提是你的手机测试过飞信
/usr/local/fetion/fetion --mobile=137*** --pwd=*** --to=137*** --msg-utf8="test"
【nagios配置】
配置命令
# notify-service-by-email
define command{
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddre
ss: $HOSTADDRESS$\nState: $SERVICESTATE$\n\
nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVI
CESTATE$ **" $CONTACTEMAIL$
}
# notify-host-by-sms
define command{
command_name notify-host-by-sms
command_line /usr/local/fetion/fetion --mobile=xxx --pwd=xxx --to=xxx,xxx,xxx --msg-gb=" $NOTIFICATIONTYPE$ H
ost Alert: $HOSTNAME$($HOSTADDRESS$) is $HOSTSTATE$ " --exit-on-verifycode=1 --msg-type=1
}
配置联系人
# create contact
define contact{
contact_name test_user
#use generic-contact
service_notification_options c,w,r,u
host_notification_options d,u,r
service_notification_commands notify-service-by-sms,notify-service-by-email
host_notification_commands notify-host-by-sms,notify-host-by-email
host_notification_period 24-7
service_notification_period 24-7
email xx
}
define contactgroup{
contactgroup_name xxx_user
alias Nagios xxx
members test_user
}
配置host,service
define host{
use linux-server
host_name xx-web03
address xx.xx.xx.xx
max_check_attempts 2
normal_check_interval 5
notification_interval 5
contact_groups xxx_user
check_command check-host-alive
notification_options d,u,r
}
【问题】
问题一
/usr/local/fetion/fetion: error while loading shared librarIEs: libstdc++.so.6: cannot open shared object file: No such file or Directory
解决方法:
yum -y install libstdc++.so.6
问题二
/usr/local/fetion/fetion: error while loading shared libraries: libgssapi_krb5.so.2: cannot open shared object file: No such file or directory
解决办法
yum install krb5-libs
问题三
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
解决办法:
yum -y install libz.so.1 --setopt=protected_multilib=false
【参考引用】
http://tamenglang.blog.51cto.com/431396/183917
分享到:
相关推荐
Nagios SNMP Plugins package contains two plugins to be used with Nagios
nagios-plugins-2.2.1.tar.gz nagios-plugins-2.2.1.tar.gz
nagios-plugins-release-2.2.1.tar不太找的到,分享一下
nagios-plugins-1.4.14.tar.gz
nagios-plugins-1.4.13.tar.gz.gz nagios-plugins-1.4.13.tar.gz.gz
nagios插件包,在安装nagios时可能需要使用到,nagios官方插件包包含50多个插件,该插件包为稳定版本。
nagios-plugins-1.5 nagios插件
Nagios-Plugins-Memcached-0.02.tar.gz
一款很好用的nagios-cn中文工具,快来下载吧!!!!!!
nagios-plugins-1.4.9.tar.gz
-Nagios飞信linux短信报警脚本配置.
nagios-plugins-2.1.4.tar.gz
nagios-plugins-1.4.16.tar.gz nagios 插件
nagios-plugins-2.1.1.tar.gz
nagios-cn-plugins-2.0.3.tar.xz icinga检测功能插件 service icinga-nrpe start 客户端启动
nagios-cn-3.2.0.tar.bz2 nagios汉化版,其他地方都找不到哦!
nagios-4.0.1.tar.gz nagios-4.0.1.tar.gz nagios-4.0.1.tar.gz
Nagios是一款用于系统和网络监控的应用程序。它可在你设定的条件正对主机和服务进行监控,在状态变差和变好的时候给出告警信息
nagios安装snmp插件,实现SNMP监控。
nagios-3.0.6.tar.gz nagios-3.0.6.tar.gz nagios-3.0.6.tar.gz