Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure QQ Mail alarm mechanism in monitoring software Zabbix

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

It is believed that many inexperienced people have no idea about how to configure QQ Mail alarm mechanism in the monitoring software Zabbix. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

I will try it on the basis that both the zabbix server and the client have been configured before.

Configure on the monitoring host:

1. Use yum to install the mailx mailbox service: * yum install mailx-y

two。 After installation, add the following configuration in the last line: * vim / etc/mail.rc # Note NetEase, QQ Mail needs to open the client authorization code for third-party login set from=1924586025@qq.comset smtp=smtp.qq.comset smtp-auth-user=1924586025@qq.comset smtp-auth-password= authorization code # if it is NetEase, QQ and other mailboxes, enter the authorization code set smtp-auth=login here

3. Try to send an email to verify that QQ Mail can accept: * echo "hello world" | mail-s "testmail" 1924586025@qq.com

4. Write an email script: * cd / usr/lib/zabbix/alertscripts* vim mailx.shangx.shangxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.shangx.shangxxxxxxxx.shangx.shangx.com: * cd / usr/lib/zabbix/alertscripts* vim mailx.shanghai mailx.shanghai mailx.shangx.email script: * cd / usr/lib/zabbix/alertscripts* vim mailx.shanghai mailx.shangx.email script: * binapace subject send tmp/mailx.log `echo $3 | tr'\ n''\ n' `echo $2 | tr'\ r\ n''\ n' `email "${messages}" | mail-s "${subject}" $1 > / tmp/mailx.log 2 > & 1

5. Grant permissions and test the script: * touch / tmp/mailx.log* chown-R zabbix.zabbix / tmp/mailx.log* chmod + x / usr/lib/zabbix/alertscripts/mailx.sh* chown-R zabbix.zabbix / usr/lib/zabbix/*. / mailx.sh 1924586025@qq.com "mail"zabbix service" # Test whether the email script works properly

Next, configure it on the browser:

1. Open Management > alarm Media Type > create Media Type: name: mail-test Type: script name: mailx.sh script Parameter: / / add the following three parameters {ALERT.SENDTO} {ALERT.SUBJECT} {ALERT.MESSAGE}

two。 Next, you need to specify the user and make relevant settings: administration > user > Click Host xxx > alarm medium Type: mail-test / / call the above script recipient: 1924586025@qq.com other default settings

3. Then define the action: configure > Action > Delete the default tag, modify the trigger condition > create the action name: mailx condition A host group = Linux servers

4. Configure the action: action-"configure default operation step duration 60 default recipient: {TRIGGER.STATUS}: {TRIGGER.NAME} default information: alarm host: {HOST.NAME} alarm IP: {HOST.IP} alarm time: {EVENT.DATE}-{EVENT.TIME} alarm level: {TRIGGER.SEVERITY} alarm message: {TRIGGER.NAME}: {ITEM.VALUE} event ID: {EVENT.ID } = Operation details = Operation Type: send message to user: Admin (Zabbix Administrator) send only to: mail-test / / must be configured or the mail will not be sent successfully

Recovery operation: {TRIGGER.STATUS}: {TRIGGER.NAME} recovery information: recovery host: {HOST.NAME} recovery IP: {HOST.IP} recovery time: {EVENT.DATE}-{EVENT.TIME} recovery level: {TRIGGER.SEVERITY} recovery information: {TRIGGER.NAME}: {ITEM.VALUE} recovery ID: {EVENT.ID} = operation details = operation type: send message to user: Admin (Zabbix Administrator) send only To: mail-test / / must be configured or the mail will not be sent successfully

5. Finally, test the mailbox alarm: the steps are as follows: (1) add the monitoring item httpd service of the monitored host, download and turn on the httpd service at the monitored end (2) simulate the fault: then turn off the httpd service (3) check whether the alarm email is received (4) simulate the failure relief: turn on the httpd service (5) to see if the recovery email has been received

Add monitoring item httpd service:

After shutting down the httpd service, an alarm message appears on the detection page:

Then QQ Mail received an alarm email:

After reading the above, have you mastered how to configure QQ Mail alarm mechanism in the monitoring software Zabbix? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report