【发布时间】:2015-12-11 20:26:28
【问题描述】:
我已经在一个节点上实现了 Nagios 3.5.1,以监控来自 Ganglia gmetad 和 gmond 客户端通过 ganglia-nagios-bridge.py 脚本发送到 Nagios 的基本指标。
目前,我遇到了警报问题,因为电子邮件没有发送出去,即使我可以看到在 Nagios Web UI 中记录了警报。我的一个怀疑是有 2 个丢失的文件,/var/spool/mail/nagios 和 /var/mail/nagios。我想找出这两个文件丢失的原因,以及我可以做些什么来解决这个问题。
以下是我的contacts.cfg文件:
define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
email brazelton.w.mann@hpe.com ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
###############################################################################
###############################################################################
#
# CONTACT GROUPS
#
###############################################################################
###############################################################################
# We only have one contact in this simple configuration file, so there is
# no need to create more than one contact group.
define contactgroup {
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin
}
我已经确认我可以使用 mail 命令向这个地址发送电子邮件。操作系统:Red Hat Enterprise Linux 6.6。
运行命令安装 nagios 和依赖组件:
yum install httpd
yum install mailx
yum install nagios
yum install nagios-www
yum install nagios-plugins-all
yum install nagios-plugins-nrpe
yum install php
【问题讨论】: