Ubuntu under zaibbix3.2 Alarm Setup

Source: Internet
Author: User

1. Install sudo apt install sendmail

2. Test Send mail:

echo "Body! " | mail-s title [email protected]

3 . Continue to install mail server after successful. Ubuntu System for HEIRLOOM-MAILX

Apt-get Install HEIRLOOM-MAILX

#yum install MAILX//centos for Mailx,centos after installation also need to change the configuration file see

4. start configuration after installation . sh Send Script

Mkdir/etc/zabbix/alertscripts

VIM/ETC/ZABBIX/ZABBIX_SERVER.CONF//Modify alert scripts to the following path

Alertscriptspath=/etc/zabbix/alertscripts

/etc/init.d/zabbix_server Restart//restart Zabbix server

#vim/etc/zabbix/alertscripts/sendmail.sh//write a mail send script

Messages= ' echo $ | Tr ' \ n ' \ n '

Subject= ' echo | Tr ' \ r \ n ' \ n ' echo ' ${messages} ' | Mail-s "${subject}" $ >>/tmp/sendmail.log 2>&1

Chown zabbix.zabbix/etc/zabbix/alertscripts/sendmail.sh

chmod +x/etc/zabbix/alertscripts/sendmail.sh

5, You can test the script, look at the line or not.

Su-zabbix

cd/etc/zabbix/alertscripts/

Sh sendmail.sh [email protected] "test message header" "Test message Content"//See if the call can be performed by Zabbix user

6, configuration ---action enabled; In this step, you can edit the contents and format of the sent message.

7. Management --- alarm media types - Create media types such as:

Add 3 script parameters:

  {ALERT. Sendto},{alert. SUBJECT},{ALERT. MESSAGE}

3 parameters that correspond to the 3 parameters required by the sendemail.sh script : Recipient address, subject, details

8, Click on the management ---"User-----" admin can see the alarm media.

8 . Click on the alarm media when you come in and click Add.

8. add the appropriate alarm media

One, manage ------ user groups --------Zabbix administrators

Ubuntu under zaibbix3.2 Alarm Setup

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.