zabbix 郵件警示配置

來源:互聯網
上載者:User

標籤:

 使用mailx發送警示郵件,具體過程如下:

配置安裝mailx軟體

rpm -qa | grep mailx    //如果已經安裝則無需再安裝

yum install mailx     //使用yum 方式進行安裝

make && make install UCBINSTALL=/usr/bin/install  //源碼安裝命令

修改設定檔 /etc/mail.rc

添加如下內容:

set [email protected] smtp=smtp.qq.com

set smtp-auth-user=xxxx smtp-auth-password=xxxx

set smtp-auth=login

說明:from 就是寄件者的郵件地址,最好是你自己的一個可用的郵件地址。

smtp 發送郵件伺服器網域名稱

smtp-auth-user 登入郵箱的使用者名稱

smtp-auth-password 登入密碼

smtp-auth 驗證方式了

#chmod 600 .mailrc

測試:echo "1111" | mailx -s "zabbix" xxx

zabbix上配置郵件警示具體過程

  1. 配置Media types

    650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/74/5C/wKioL1YbcLuBp08bAAOiRR7C6Ms741.jpg" title="1.jpg" alt="wKioL1YbcLuBp08bAAOiRR7C6Ms741.jpg" />

    650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/74/5C/wKioL1YbcMrxKn_BAAEKe7ENHjg438.jpg" title="2.jpg" alt="wKioL1YbcMrxKn_BAAEKe7ENHjg438.jpg" />

    指令碼的位置:

    zabbix_server.conf

    AlertScriptsPath=/usr/local/zabbix/scripts/email_alerts.sh

  2. 配置接收警示郵件的郵箱資訊


    650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/74/60/wKiom1YbclaAMQCSAAHpIJtYBe8037.jpg" title="3.jpg" alt="wKiom1YbclaAMQCSAAHpIJtYBe8037.jpg" />

    650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/74/60/wKiom1YbdxCBzm9vAAJeKfs5ivo016.jpg" title="1111.jpg" alt="wKiom1YbdxCBzm9vAAJeKfs5ivo016.jpg" />

  3. 配置Action,Action主要作用當觸發器觸發時採取的發送郵件操作

    650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/74/60/wKiom1YbcliCS1NPAAKCvS6tWcM264.jpg" title="5.jpg" alt="wKiom1YbcliCS1NPAAKCvS6tWcM264.jpg" />

    Action選項卡裡面用於配置action的名字,郵件的內容等基本資料

    650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/74/5D/wKioL1YbcnahYf4nAAIFOZ-vfm4019.jpg" style="float:none;" title="6.jpg" alt="wKioL1YbcnahYf4nAAIFOZ-vfm4019.jpg" />

    conditions選項卡裡用於定義,此動作使用哪個觸發器,應用於哪個主機,或主機群組

    650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/74/60/wKiom1YbclmSWdU3AAGOVIV4gAQ883.jpg" style="float:none;" title="7.jpg" alt="wKiom1YbclmSWdU3AAGOVIV4gAQ883.jpg" />

    operations定義了操作詳情

    650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/74/5D/wKioL1YbcnfCek_fAANgBv7nbMQ847.jpg" style="float:none;" title="8.jpg" alt="wKioL1YbcnfCek_fAANgBv7nbMQ847.jpg" />

本文出自 “咚咚的部落格” 部落格,請務必保留此出處http://weadyweady.blog.51cto.com/3012956/1702175

zabbix 郵件警示配置

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.