zabbix 郵件警示

來源:互聯網
上載者:User
zabbix通過sendmail實現Email警示

http://bbs.linuxtone.org/thread-9401-1-1.html

sendmail的安裝過程在此略過,如有不會的兄弟,可以在google上搜尋相關文章。

       我的zabbix相關環境:

              OS: centos 5.4  x86_64       zabbix:   1.8.3     sendmail:  8.13.8-2.el5

    在配置zabbix的Email警示之前,需要將sendmail使用的網域名稱進行相應的修改,系統預設為localhost.localdomain,其實不改也行,不過有些pop3伺服器會過濾掉來自 localhost.localdomain的郵件,導致郵件不能正常查收,所以,最好是改一下 hostname,確保郵件發送的成功率。

       以下是我線上機器修改好了的配置,可供參考。

      # cat /etc/hosts

         127.0.0.1       monitor.bot.cms    localhost.localdomain    localhost

      # cat /etc/mail/access

        Connect:localhost.localdomain           RELAY

     Connect:localhost                       RELAY

        Connect:127.0.0.1

        Connect:monitor.bot.cms                 RELAY

     # cat /etc/mail/local-host-names

        monitor.bot.cms

     修改完成後,重啟sendmail服務,通過telnet命令,測試一下看看是否已生效

     # telnet 127.0.0.1 25

     Trying 127.0.0.1...

     Connected to monitor.bot.cms (127.0.0.1).

     Escape character is '^]'.

     220 monitor.bot.cms ESMTP Sendmail 8.13.8/8.13.8; Sun, 10 Oct 2010 14:00:33 +0800

     從以上結果可以發現,localhost.localdomain 已經變成了 monitor.bot.cms 這個網域名稱,表示修改成功,接下來就可以在zabbix 的管理頁面上進行Email 警示設定了。

描述

Email

類型

Email

SMTP server

monitor.bot.cms

SMTP helo

monitor.bot.cms

SMTP email

root@monitor.bot.cms

設定完成後點擊儲存按鈕,到此Email警示設定就結束了,測試時,可以建立一個action,警示方式選擇Email, 當trigger成功觸發後,一分鐘後就可以查收郵件了。趕緊去試一下!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.