2015-12-11 28 views
0

我在一个节点上实现了Nagios 3.5.1,通过ganglia-nagios-bridge.py脚本监控来自Ganglia gmetad和gmond客户端的Nagios的基本指标。Nagios邮件目录不存在

目前,我遇到警报问题,因为电子邮件不会发送出去,即使我可以在Nagios Web UI中看到警报记录。我有一个怀疑是,有2个缺少丢失的文件/ var/spool/mail/nagios和/ var/mail/nagios。我想知道为什么这2个文件丢失,以及我能做些什么来解决这个问题。

以下是我的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   [email protected] ; <<***** 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 
} 

我确认我可以使用邮件命令将电子邮件发送到这个地址。操作系统:红帽企业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

回答

0

首先请检查你能够通过以下命令从操作系统发送电子邮件:

echo test | mail -s 'test mail' [email protected] 

如果您收到电子邮件那么很可能你有问题,他们邮件命令配置。