Ubuntu – Configure Zabbix to send email notifications through Exim

eximmonitoringUbuntuzabbix

I've been working through the installation and configuration of Zabbix over the past couple of days and I think I've finally got everything working… except the sending of notifications / alerts.

I'm running on a Ubuntu server which is using Exim to send emails. I'd previously used this Exim setup to send notifications for Nagios so I know that Exim itself works.

However, I can't seem to get Zabbix to send out notifications.

Here's what I've done so far:

  • Set up a "test trigger" like so:

Trigger severity >= "Information" Send message to User "Admin"

  • The Admin user has a email contact (and I've sent command line emails from Exim on the server using "sendmail" to this email address successfully)
  • The media type for email is set. (I've used 127.0.0.1 as the smtp server address)
  • I've checked the user permissions and it is read/write for all host groups

The triggers are definitely getting set but no actions are being called… I think my problem is within Zabbix as it's not actually executing the actions

And idea how to configure this correctly?

EDIT: More info about my problem (thanks @Richlv)

1- Audit has nothing indicating any errors in it. In fact it doesn't have anything about any actions being executed either…

2- The user is the Zabbix super user

3- Media configuration is correct, I can send test emails to that address from command line using sendmail (which is actually Exim)

4- There are no recovery messages or escalations selected for the test action

5- My zabbix version is 1.8.2

Best Answer

I figured it out! My setup was correct afterall. Here's what was happening:

Triggers are only set when a state changes, therefore all my triggers were either false OR true and were not changing state as the items I was monitoring were not changing state either.

To successfully test my triggers, I had to do this:

  1. Make an item to ping a server every 5 sec (you can just use a default template item but I wanted results fast...)
  2. Make an action for my server which gets executed if:

    Trigger severity >= "Warning" AND Host = "My Server"

  3. I then created a trigger which gets set if ping = 1 (which it always does...) and volia! I received an email

The problem I was having was that by creating my "test trigger" before my "test alert" the trigger was already getting set before my alert was saved. And so... i had no idea why I wasn't seeing any notifications.

Related Topic