nagios系统中sendmail的设置方式_北京手机专业数据
日期:2014-11-24 / 人气: / 来源:网络
以下为自己安装测试过的,如果有问题,大家一起讨论
系统环境:centos6.2 64位 最小化安装
一 安装nagios
见附件:nagios官方文档(nagios_nrpe20120929_web.pdf)
二 安装配置sendmail
我用hotmail邮箱接收nagios报警邮件
yum install sendmail m4 mailx
vim /etc/mail/access
添加
Connect:http://www.hotmail.com RELAY
Connect:192.168 RELAY(不知道什么用处)
Connect:1.1.1 RELAY(不知道什么用处)
Connect:nagios@localhost.localdomain RELAY
保存后运行
makemap -v hash /etc/mail/access.db < /etc/mail/access
service sendmail restart
测试sendmail
echo 123 | mail -s test1 ***@hotmail.com(我的邮箱)
echo 456 | sendmail -v ***@hotmail.com(我的邮箱)
两封邮件都收到了
三 整合nagios和sendmail
修改/usr/local/nagios/etc/objects/contacts.cfg
define contact{
contact_name nagiosadmin
use generic-contact
alias Nagios Admin
email ***@hotmail.com(我的邮箱)
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
host_notifications_enabled 1
service_notifications_enabled 1
}
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin
}
重启nagios
service nagios restart
至此配置结束
我这样配置后,可以收到nagios发来的报警邮件。这只是个粗略配置,具体细节还在学习中。
如何解决nagios无法使用sendmail发送监控邮件的问题
导读:nagios无法使用sendmail发送监控邮件的问题解决方法:对nagios的研究遇到了很多问题,Nagios监控邮件无法用sendmail发送,此问题也花了一些时间来解决,为了让各位网友少费些时间我将解决办法发布出来给大家分享;其实发送不了邮件关键的问题还是出在sendmail配置上面,
MySQL数据库,nagios,邮件监控,sendmail,邮件监控
作者:管理员
推荐内容 Recommended
- 江苏飞浩信息科技期待您的加入07-20
- 江苏飞浩科技欢迎您07-19
相关内容 Related
- 江苏飞浩信息科技期待您的加入07-20
- 江苏飞浩科技欢迎您07-19