Would you like to learn how to use configure Zabbix E-mail Notification Setup? In this tutorial, we are going to show you how to configure Zabbix to send e-mails when an alert trigger is activated.

• Zabbix version: 3.4.12

Equipment list

Here you can find the list of equipment used to create this tutorial.

This link will also show the software list used to create this tutorial.

Zabbix Playlist:

On this page, we offer quick access to a list of videos related to Zabbix installation.

Don’t forget to subscribe to our youtube channel named FKIT.

Tutorial – Gmail Integration

First, we need to enable your Gmail account to receive connections from external programs.

Open your browser and access your Gmail account.

In our example, the following URL was entered in the Browser:

http://gmail.google.com

On the login screen, enter your Gmail username and password.

Gmail account

After the login, you need to access the following URL:

• https://myaccount.google.com/lesssecureapps

Select the option to enable the use of less secure applications.

google less secure app

Now, we need to test if we can use the Linux command-line to send an email using Gmail.

Use the following command to install the required packages.

Copy to Clipboard

Edit the SSMTP configuration file to connect to our Gmail account.

Copy to Clipboard

In our example, we are using the Gmail account virtualcoin.videos@gmail.com.

In our example, the Gmail account virtualcoin.videos@gmail.com is using the password kamisama123.

You need to change the Gmail account and password to reflect your account.

Use the following command to send an email using the command-line.

Copy to Clipboard

Check your Gmail inbox for the test message that you just sent.

gmail inbox

If the test was successful you may advance to the next section of this tutorial.

If the test was unsuccessful, the following message may be presented.

• ssmtp: Authorization failed (534 5.7.14 https://support.google.com/mail/answer/78754 v24-v6sm2921112pfl.31 – gsmtp)

To solve this problem, you need to access the following URL .

• https://accounts.google.com/DisplayUnlockCaptcha

Select the option to unblock your account.

google unlock account

Try again to send the email using the command-line.

If the test was successful you may advance to the next section of this tutorial.

Tutorial – Zabbix Email Notification Setup

Open your browser and enter the IP address of your web server plus /zabbix.

In our example, the following URL was entered in the Browser:

• http://35.162.85.57/zabbix

On the login screen, use the default username and default password.

• Default Username: Admin
• Default Password: zabbix

zabbix login

After a successful login, you will be sent to the Zabbix Dashboard.

zabbix dashboard

On the dashboard screen, access the Administration menu and select the Media Types option.

Locate and click on the option named Email.

Zabbix Media Type

On the Email properties screen, you need to enter the following configuration.

• SMTP server – Enter the E-mail server IP address or Hostname.
• SMTP server port – Enter the SMTP TCP port of the e-mail server.
• SMTP helo – Enter the domain name of your e-mail address.
• SMTP email – The e-mail address that will send Zabbix notifications.
• Connection Security – The security protocol that should be used to connect to the e-mail server.
• Authentication – The username and password of the e-mail account that will send Zabbix notifications.

Here is the original image, before our configuration.

Zabbix media type email

Here is the new image with our configuration.

• SMTP server – SMTP.GMAIL.COM
• SMTP server port – 465
• SMTP helo – gmail.com
• SMTP email – virtualcoin.videos@gmail.com
• Connection Security – SSL/TLS
• Authentication Username – virtualcoin.videos@gmail.com
• Authentication Password – kamisama123

Zabbix email media type

Click on the Update button.

On the dashboard screen, access the Configuration menu and select the Action option.

zabbix action menu

Locate and the option named:  Report problems to Zabbix administrators

In order to enable this action, you need to click on the word Disabled in red.

zabbix enable email notification

It will turn on the word Enabled in green.

zabbix enable email notification status

This will configure Zabbi to send e-mail notifications to the users that are members of the Zabbix Administrator group.

By default, only the user Admin is a member of the Zabbix administrators group.

By default, the Admin user has no e-mail address associated to the account.

Now, we need to associate an e-mail address to the Admin account.

Login on the Zabbix web interface as the Admin user.

On the top right part of the screen, access the user profile settings.

Zabbix Profile Settings

On the user profile screen, access the Media tab and add a new Email configuration.

Here is an image with our configuration.

user profile add email

Here is the summary of the Admin user e-mail configuration.

zabbix user profile media

Congratulations! You have configured the Zabbix server e-mail notification

Tutorial – Testing Zabbix Notification

Now, we are going to show you how to test your trigger notification configuration.

In our example, we are going to create a fake ICMP problem.

On the dashboard screen, access the Configuration menu and select the Host option.

zabbix add host

On the top right of the screen, click on the Create host button.

Zabbix Create Host

On the Host configuration screen, you will have to enter the following information:

• Host Name – TEST
• Visible Hostname – TEST
• New group – TEST
• Agent Interface – 5.5.5.5

Zabbix Test notification

Access the Templates tab and add the following template.

• Template module ICMP Ping

Zabbix mail Trigger Test

After finishing the host configuration go back to the Zabbix dashboard initial screen and wait 5 minutes.

Wait for the ICMP problem trigger to activate.

Take a look at the email inbox of user Admin.

Check if the Zabbix server sent you an email notification reporting this problem.

Congratulations! You have successfully tested your Zabbix email notification.