Add monitoring metrics and configure email alarms in Zabbix

Source: Internet
Author: User
The alarm process for Zabbix mail is as follows: monitoring host ---- monitoring items ---- triggers ---- alarm action ---- alarm method ---- alarm users first add monitoring items 1. select the host to add monitoring items 2. click Createitem in the upper-right corner. add and configure the key value mentioned above for the metric item, here we will explain to you: Ex

The alarm process for Zabbix mail is as follows:

Host monitoring ---- monitoring items ---- triggers ---- alarm actions ---- alarm methods ---- alarm users

Add metric items first

1. select the host to add the metric item

2. click Create item in the upper-right corner to add and configure metric items.


The key value mentioned above is explained here: Example:/usr/local/zabbix/bin/zabbix_get-s192.168.4.10-kproc. num [httpd]-s specifies the IP address of the host to be detected-k specifies the key value proc used for detection. num [httpd] the key value is the net that detects the number of service processes on the monitored end. tcp. port [, 80] indicates whether the monitored service port exists.


For more information about key values, see section about zabbix key values and custom keys.

Next, add a trigger.

1. select the trigger next to the monitoring host to which you want to add the trigger.

2. click Create trigger in the upper-right corner to Create and configure the trigger.


Here, we will describe the size of this N value. for example, if the number of httpd processes on the monitored end is 9, then the value of this N can be set to N = 9, when the last value detected is less than N, that is, less than 9, this trigger will be triggered.


Second, configure alarm actions

1. select system configuration ---- operation ---- Create action new operation

2. configure the operation name and alarm email content

Click operation details ---- Create

Configure the alarm method

1. manage ---- handling method ---- Create media type Create alert method

2. configure alert methods

3. open the configuration file of zabbix server and set the storage path of the alarm script.

Vim/etc/zabbix/zabbix_server.conf remove the comments of row 390 and modify them: alertScriptsPath =/usr/local/zabbix/bin/write cd/usr/local/zabbix/bin/add email script in the path after which the script is stored #! /Bin/sh user = email user name pass = email password/usr/bin/sm-f XXXX@163.com-t $1-u $ user-p $ pass -msmtp.163.com-s "$2" -c "$3": Set the sender of the alarm email


Configure the user who receives the alarm email

1. choose Admin from manage ---- User ----

2. configure the alarm media for Admin

After the configuration is complete, after the monitoring item is down, the monitoring item will trigger the trigger. after the trigger finds the alarm action, such as email or SMS, and determines the alarm action, you will find the alert user.

Stop a service and check whether an alarm is triggered.

1 indicates that the email has been sent.

View alert emails

This completes the configuration.

Related Article

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.