A: In recent days again Zabbix turned out toss, and in the alarm this toss an afternoon, each time to make a long time, Xin lost time ample, now record hope next time, do not need so long time;
I encountered the problem, probably two categories, one is the last article in the SendMail extremely slow problem, here is not to repeat, the second is the configuration of the Zabbix page, in the selection of "Alarm medium type" This block, I choose "e-mail" type It died or dead will not send out mail: Finally changed to "script" type, You can call the police; I put an error on my e-mail message: The most important thing to record is the configuration of the alarm medium of the script type, the next time you use this method directly:
Two: with "script" for the alarm media type configuration method:
1. Create a script to send the message before the server is local:
Locate alertscripts #先找到本地存放脚本的目录cd/usr/lib/zabbix/alertscripts #这是我的目录vim baoj.sh #!/bin/sh echo "$ $" | Mail-s "$" $1chown Zabbix.zabbix Baoj.shchmod + x baoj.sh
2. Configure the "script"-based alerting method in the Zabbix Web page:
--Administrator media types---Create media type
Name: Can be any
Type: Select Script
Script Name: The names of the scripts
Enable: Must be ticked
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6C/18/wKiom1U_Yz2SUSWPAALAOIhQSnw701.jpg "title=" Zabbix-1.png "alt=" Wkiom1u_yz2suswpaalaoihqsnw701.jpg "/>3. Set the user's alarm address:
Administrator--User-to-Admin (Zabbix Administrator)-->media
Type Select the previous step to create the name "script _mail"
Send to write the destination email address to be sent
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6C/14/wKioL1U_ZkbCa8iYAASnYcBCNt8801.jpg "title=" Zabbix2.png "alt=" wkiol1u_zkbca8iyaasnycbcnt8801.jpg "/>4. Create action
Configuration--Actions-->create action
A.action Items
Name: Casual
Default Subject:
Fault {TRIGGER. STATUS}, server: {HOSTNAME1} occurred: {Trigger.name} failed!
Default message:
Alarm host: {HOSTNAME1} alarm time: {EVENT. DATE} {EVENT. TIME} Alarm level: {TRIGGER. SEVERITY} Alarm message: {trigger.name} alarm item: {TRIGGER. KEY1} Problem Details: {item.name}:{item. VALUE} current status: {TRIGGER. Status}:{item. VALUE1} Event Id:{event.id}
Recovery message: Tick
Recovery Subject:
Restore {TRIGGER. STATUS}, server: {HOSTNAME1}: {trigger.name} restored!
recovery message:
Alarm Host: { hostname1} Alarm Time : {EVENT. Date} {event. time} Alarm Level: { TRIGGER. severity} Alarm Information: {TRIGGER.NAME} Alarm item: {TRIGGER. key1} problem Details: { Item.name}:{item. value} Current Status: { TRIGGER. Status}:{item. value1} Event id:{ Event.id}
Enabled: Tick
B.condition Items
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6C/14/wKioL1U_aUDB3lcZAAKPlCqzfoo148.jpg "title=" Zabbix-3.png "alt=" wkiol1u_audb3lczaakplcqzfoo148.jpg "/> c.operations items
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6C/14/wKioL1U_afzztN7JAAKnkmvPLX0113.jpg "title=" Zabbix-4.jpg "alt=" wkiol1u_afzztn7jaaknkmvplx0113.jpg "/>650" this.width=650; "src=" http://s3.51cto.com/wyfs02/ M01/6c/18/wkiom1u_ahwjtrdlaaspib0lt-g262.jpg "title=" zabbix-5.jpg "alt=" Wkiom1u_ahwjtrdlaaspib0lt-g262.jpg "/> 5. You can stop the Zabbix_agent service and try it out;
Three: attached I did not configure the successful use of e-mail for the media alarm method (reported error):
7064:20150428:175111.168 cannot connect to SMTP server ' localhost ': Cannot connect to [[localhost]:25]: [111] Connection R Efused
This article is from "Cloud Zhongshan" blog, please be sure to keep this source http://jiapeng.blog.51cto.com/6706171/1639911
Zabbix problem with alarm configuration