Get the App
SLTechnology News&Howtos  ›  Servers  › 

What are the common problems of zabbix email alarm?

Shulou Source: shulou.com Published: 2022-05-31 16:10:36 09月21日 Update

This article mainly explains "what are the common problems of zabbix email alarm". Friends who are interested may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what are the common problems of zabbix email alarm.

Use a 163 mailbox

The set smtp-auth-password=111111 in the mailx configuration file is the authorization code, and the principal account needs to activate smtp service.

Vim / etc/mail.rc set from=11111@163.com set smtp=smtp.163.com set smtp-auth-user=111111 # take 163mailbox as an example, this is not a password, but an authorization code set smtp-auth-password=111111 set smtp-auth=login

When you customize the external email alarm as an attachment, you should modify the configuration file of mailx to change the variable of LANG to English.

Vim / usr/lib/zabbix/alertscripts/mailx.sh #! / bin/bash export.UTF-8 # defines LANG, which can solve the problem that the content of sent email is binary. Remove messages= `echo $3 | tr'\ n''\ n' `subject= `echo $2 | tr'\ n' 'echo "${echo}" | mail-s "${subject}" $1 > / tmp/mailx.log 2 > & 1

When you find that the zabbix report shows that the email has been sent successfully, but you have not received it, you can check the mailx log.

Cat / tmp/mailx.log

How to solve the problem that alarm time is the same as recovery time

Open configuration > > actions > > event triggers > > (alarm actions you enabled)

# default message is the alarm time used for alarm: {EVENT.DATE}-{EVENT.TIME} # recovery information is used to restore the recovery time of notification: {EVENT.RECOVERY.TIME} so far, I believe you have a better understanding of "what are the common problems of zabbix email alarm". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Email questions alarms content time FAQ FAQ configuration information actions that is files mailboxes learning practical deeper success subject event binary Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Apple NVidia Docker MySQL