Zabbix Configuration of mail alerts

Source: Internet
Author: User


First, install and configure the mail service


1. See if the service is already installed

Rpm-qa | grep mailx //No need to install if already installed


2. Installation

Yum Install Mailx


3. Modify the following configuration file

Vim/etc/mail.rc

Add the following content:

Set [email protected] smtp=smtp.qq.com //Fill in your email address

Set smtp-auth-user= user name smtp-auth-password= password //mailbox username and password

set smtp-auth=login                                      // authentication method

#chmod. MAILRC //Comment information, remove the # number other people do not have permission, only root can modify the file


4. Testing

echo "Test" | Mailx-s "Zabbix" xxx //xxx on behalf of the recipient's email address


Second, configure Zabbix mail alarm


1. Configure media types

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/75/10/wKioL1Yx19mzC2UsAABngx54HnA749.jpg "title=" QQ picture 20151029162438.png "alt=" Wkiol1yx19mzc2usaabngx54hna749.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/75/0E/wKioL1YxwADjj4pUAAFr2r5aJEs963.jpg "style=" float: none; "title=" QQ picture 20151029144218.png "alt=" Wkiol1yxwadjj4puaafr2r5ajes963.jpg "/>

2. Write the following script

Vim sendmail.sh

#!/bin/bash

echo "$ $" | /bin/mailx-s "$" $


3. Configure the mailbox and information to receive alert messages


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/75/0E/wKioL1Yxw8Pg0a24AAPvxJZnoMc271.jpg "title=" QQ picture 20151029145428.png "alt=" wkiol1yxw8pg0a24aapvxjznomc271.jpg "/>650) this.width=650;" src= "/HTTP/ S3.51cto.com/wyfs02/m01/75/0e/wkiol1yxxagivwtnaagqpsbzky8821.jpg "title=" qq picture 20151029150001.png "alt=" Wkiol1yxxagivwtnaagqpsbzky8821.jpg "/>



650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/75/11/wKiom1Yxx_ejzFEZAAHfazLccHk719.jpg "style=" float: none; "title=" QQ picture 20151029151645.png "alt=" Wkiom1yxx_ejzfezaahfazlcchk719.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/75/0E/wKioL1YxyC2wAf2_AADhwDOW__o216.jpg "style=" float: none; "title=" QQ picture 20151029151735.png "alt=" Wkiol1yxyc2waf2_aadhwdow__o216.jpg "/>


Send to: E -mail address of sender

Use if severity: warning information from top to bottom respectively for unclassified, consulting, warning, general serious, serious, disaster and other 6 kinds of information, according to their own needs set

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/75/11/wKiom1YxxLrAvJZDAAER0zXoOf4303.jpg "style=" float: none; "title=" QQ picture 20151029150328.png "alt=" Wkiom1yxxlravjzdaaer0zxoof4303.jpg "/>


4. Configuring the Action,action primary role the Send mail action taken when a trigger is triggered

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/75/12/wKiom1Yx0_mznfUgAAIC8Ku3zlA693.jpg "title=" QQ picture 20151029160812.png "alt=" Wkiom1yx0_mznfugaaic8ku3zla693.jpg "/>


The 5.Action tab is used to configure the name of the action, the contents of the message, and other basic information

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/75/0F/wKioL1Yx0XryQKgRAALlXmcL8_o990.jpg "style=" float: none; "title=" QQ picture 20151029155215.png "alt=" Wkiol1yx0xryqkgraallxmcl8_o990.jpg "/>


6.TheConditions tab is used to define which trigger to use for this action, which host to apply to, or the main group


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/75/12/wKiom1Yx1e-BsUyiAAEIPlQb2BQ315.jpg "title=" QQ picture 20151029161726.png "alt=" Wkiom1yx1e-bsuyiaaeiplqb2bq315.jpg "/>


7.operations defines the operation details

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/75/0F/wKioL1Yx0XuxwRY6AAKFGjzxxZE795.jpg "style=" float: none; "title=" QQ picture 20151029155323.png "alt=" Wkiol1yx0xuxwry6aakfgjzxxze795.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/75/12/wKiom1Yx0UeRtS0oAAQ_C54lNSw488.jpg "style=" float: none; "title=" QQ picture 20151029155542.png "alt=" Wkiom1yx0uerts0oaaq_c54lnsw488.jpg "/>


The above is the Zabbix alarm configuration

This article is from the "Boy" blog, please be sure to keep this source http://systemyw.blog.51cto.com/7424832/1707771

Zabbix Configuration of mail alerts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.