2.0-zabbix Configuring Message Alarms

Source: Internet
Author: User
Tags custom name

Both SendMail and postfix can send mail if the service is already started.


The purpose of setting up the trigger is to let the monitoring service implement the alarm, how to tell the alarm, let us configure the message alarm. E-mail is sent by the server through its own SendMail service, sometimes if the configuration is not appropriate or the service does not start, we are not outgoing mail. So, test it first.

Note: The following actions are done on the Zabbix server

# Yum install-y sendmail

#/etc/init.d/sendmail Start

# echo "Test Mail" |mail-s "testtest" [email protected]

If it is a virtual machine, it is possible to receive the mail, but if the real machine can still be received, but most likely in the Junk mail box. Let's configure Zabbix email alerts.

# mkdir-p/home/zabbix/bin

# vim/home/zabbix/bin/baojing.sh

The contents are:

#! /bin/bash

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

After saving, modify the permissions of the file

# chmod +x/home/zabbix/bin/baojing.sh


In the/etc/zabbix_server.conf configuration file, there are parameters Alertscriptspath and externalscripts, edit it

# vim/etc/zabbix_server.conf

Modify the following content

alertscriptspath=/home/zabbix/bin/#用户自定义的 Media Types script

externalscripts=/home/zabbix/bin/#用户自定义的检查的脚本 (item)


Below in the browsing inside continue to configure the message alarm.

Create MEDIEA types: "Administration"--"Media types", click on the top right corner "create media Type" which

Description fill in "baojing" or other custom name, Type select "Script", Script "baojing.sh" and then

Point "Save".


Create User: "Adimistration"-"users" in the upper right corner, select "Users", click "Create User", alias:

Test1, customize name and LastName Password:123456;group Select Guest, go back to the top for a bit media,type

Select Baojing,send to write the mailbox you want to send the message to, click Add, and save the last point.


Create action: "Configuration"--actions, top right corner "create actions", Name customization, I'm here

Write "baojing", other default, then point to the right of "Operations" under "New" button, "Operation Type" select

"Send Message", "Send Message to" Select one or more user groups to send the message, Send to users select

We previously added test1, "Send only to" select Baojing, click Add, Last click Save.


2.0-zabbix Configuring Message Alarms

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.