Configuring email parameters

The most common notification method is email. Whenever something interesting happens in Zabbix, an action can be taken. We will set it up so that an email is sent to us. Before we decide when and what should be sent, we have to tell Zabbix how to send it.

To configure the parameters for sending emails, do the following: 

  1. Open Administration | Media types 
  2. Click on Email in the Name column

You'll get a simple form that you can fill in with the appropriate values for your environment:

Change the SMTP server, SMTP helo, and SMTP email fields to use a valid email server. The SMTP email address will be used as the From address, so make sure it's set to something your server will accept. If needed, configure the SMTP authentication, and then click on the Update button. 

Additionally, you can also make use of the Connection security and the Authentication options if you need to authenticate when connecting to your mail-server.

New in Zabbix 4.0 is the Options tab. The Options tab contains the alert processing settings. Concurrent sessions allow you to select one. This setting will only allow one process to send emails. This is fine for small setups. Unlimited will allow Zabbix to spin up an unlimited list of processes to send out emails. This can be needed in larger setups to get out the amount of messages needed to ensure everybody is informed on time. Custom will allow you to specify a custom number of processes.

The other option, Attempts, allows us to specify how many attempts Zabbix will make to get those emails out when it fails to deliver the message to the mail-server. The Standard option is 3 times and the maximum number of attempts is 10. The Retry interval option will specify how much time Zabbix waits between every attempt to send that message again. Times between 0 and 60 (seconds) are supported, but also time suffixes such as 1 m and 5 s.

Now that we have configured the server to send emails and set what the From address should be, it still doesn't know the email addresses that our defined users have, which is required to send alerts to them.

To assign an email address to a user, take the following steps:

  1. Open Administration | Users. You should see only two users: Admin and Guest.
  2. Click on Admin in the Alias column and switch to the Media tab, as follows:

  1. Click on the Add button. The only thing you have to enter here is a valid email address in the Send to textbox, preferably yours.
  2. Once you are done, click on Add and then Update in the User properties screen.

In Zabbix 4, it is now possible to add multiple Send to email addresses. If this is the case, then Zabbix will send one email to all the specified recipients.

You can specify more than one time period using a semicolon (;) separator:  d-d,hh:mm-hh:mm;d-d,hh:mm-hh:mm...

The When active option is used in Zabbix to let it know that it can only send emails during these times. See the documentation for more details on how to define those times: https://www.zabbix.com/documentation/4.0/manual/appendix/time_period.

By marking the boxes Use if severity, we tell Zabbix to only send emails if the trigger has a certain severity level.

That finishes the very basic configuration required to send out notifications to users via email.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.155.58