配置cacti邮件报警,postfix与sendmail冲突

环境:centos6.2,cacti 0.8.8.a,net-snmp5.5 php

一、今天弄cacti邮件报警,刚开始启动sendmail不成功,一直提示: centos

”sendmail dead but subsys locked sm-client (pid  13588) is running...“, 服务器

以后查看其/var/log/maillog提示“postfix/smtpd[10859]: disconnect from localhost[127.0.0.1]” tcp

及25端口, post

netstat -tlnp |grep :25
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      11180/master        
tcp        0      0 ::1:25                      :::*                        LISTEN      11180/master   
以后中止postfix或sendmail,使用其中之一,好像是centos6.2自动安装并启动了postfix服务器,
spa

二、配置 插件

安装thold-v0.4.9-3.tgz、plugin-monitor-v1.3-1.tgz插件,解压放到cacti/plugins 目录下,到控制台启用插件, blog

console-->seting--->Mail/DNS-- ip

Mail Services    我用的是SMTP ,根据本身的选择,可是大部分状况用sendmail会出错+
From Email Address    huazi_91@139.com
From Name           problem alert ci

SMTP Options中都要写真实的本身的邮局,否则smtp的发信机制会发布出去

SMTP Hostname     写本身的,个人是huazi_91@139.com
SMTP Port           25
SMTP Username      huazi_91@139.com
SMTP Password        xxxx

Console -> Cacti Settings-Thresholds 选项
下面这些都是主意修改的地方

Base URL                  这个会自动发现不用写
Syslogging                  这个勾要选择,否则他不会给你发邮件
Dead Hosts Notifications    这个要选择
Dead Host Notification Email   这个是主机down掉会发邮件通知谁(这里写要通知的邮局,多人能够用逗号隔开)。

From Email Address    写邮件的发送方  
From Name             写problem alert


1.发送邮件报警错误
Checking Configuration...
Creating Message Text...

This is a test message generated from Cacti. This message was sent to test the configuration of your Mail Settings.

Your email settings are currently set as follows

Method: Sendmail
Sendmail Path: /usr/sbin/sendmail

Sending Message...

ERROR: DirectInject command output: 'Recipient names must be specified ' error: ''
DirectInject command output: 'Recipient names must be specified ' error: ''

===================
那么setting---mail/DNS选项或者alert选项中,把sendmail发信机制改为smtp

2.若是出现553.3.8.2 认证错误,那么请填写正确smtp信息
好比用户名密码


以后,就是设置阀值报警,

配置参考地址:http://tinkoko.blog.163.com/blog/static/596236182009155317977/

相关文章
相关标签/搜索