Zabbix Series 5: Actions & Media


Just a little bit crazy...
Verified Provider
I got to stop getting distracted....
Actions? Media?
Media - A method of executing of sending a message. e.g SMS, Email or custom script. It is in this section you also define configuration such as the email address to send the email from and the SMTP server to use. This section is found under "Administration > Media Types"
Action - A set of conditions, operations and message bodies to handle a trigger event changing. This is what you will need most of the time. An action may use a Media entry, but it does not have to (e.g executing a script on the agent).
Setting up Email Notification

  • Set the settings for your email notification on the Email page. You should already have a SMTP server running on, else install postfix.
  • Create a new Action. Once created you will have a page where you can configure the message details. You can customize the email message sent as much as you like, and there are many macro's to choose from
  • On the conditions tab you can set any conditions that you want to require (or hosts to ignore). For example -
  • Operations defines what you want to happen when these conditions are met, there can be more than one operations divided into one or more steps (for a time based event escalation e.g to higher level techs). An example of what this should look like for email notifications is -

Email is boring surely I can do cooler stuff?

Of course. You can also execute custom scripts (either on the monitoring server, or over the agent/ssh on the triggering host). This can allow you to perform automated actions (particularly in cases where your response time might be too slow to prevent issues). 

Examples of useful triggers and actions include:

  • TimeWait connections > 750k && Rate of Increase > 10k/s - iptables rate limit
  • /var/log filling up - forced logrotate
  • Send notification to a frontend server of a service going down (so as to not have to poll API)