Zabbix Alerting via e-mail

Print version

9. Zabbix Alerting via e-mail

In case of any issue within your network, e.g. drop in the signal quality, or the unit being unreachable, Zabbix can automatically send an e-mail to predefined e-mail addresses. The following example will show just one procedure, other ways are possible (e.g. via the script).

9.1. E-mail Configuration

The e-mail can be set in the the Administration – Media Types menu. Edit the E-mail type corresponding to your server settings. In our example, we use our own SMTP server reachable from Zabbix server. No special security or password is required. You should be able to use any SMTP server.

E-mail configuration

Fig. 9.1: E-mail configuration

9.2. Users Configuration

The e-mails are sent to the users’ e-mail addresses. Go to the Administration – Users menu and configure the required e-mail addresses within the user’s details (Media).

User’s e-mail

Fig. 9.2: User’s e-mail

You define the time when the e-mail will be sent (e.g. do not send it over the night) and the severity of the issue (e.g. send me the e-mail just in case of a critical issue).

9.3. Actions

The last step is to configure the action – configure which issue causes the e-mail to be sent. Go the Configuration – Actions menu and create a new Action.

Action

Fig. 9.3: Action

Usually, you will use the MACROs for the e-mail body/subject. In this example, the Subject of the e-mail will consist of the host’s Name, Trigger status (Problem, OK) and Trigger Name. Within the body of the message, there are additional information such as the Trigger Severity, URL and the Issue details.

If the issue is fixed, we also send a recovery message. It is the same message, but saying “OK” instead of “PROBLEM”.

Action conditions

Fig. 9.4: Action conditions

The action is executed if it meets the conditions, e.g. the trigger value is “PROBLEM” and the host is a RipEX (or RAy2 unit). The conditions can be combined with AND or OR statements.

Action Operation

Fig. 9.5: Action Operation

The operation does not need to be just an e-mail, but it can consist of sending SMS or jabber messages. Or based on the issue duration, it can perform different tasks. In the example above, we send the e-mail to the user “servis” immediately when the issue occurs. There are no additional steps.