配置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/

相關文章
相關標籤/搜索