Amazon SES for Zabbix Custom Alert Script

Muhammad Bagus Ramadhan
2 min readFeb 4, 2019

Zabbix is an open source monitoring solution for network monitoring and application monitoring. It has a lot of customisable metric from process level to device level.

Like the other monitoring solution, zabbix offers some way to tell you about your network condition. In this moment, I want to show you how to send email alert using Amazon Simple Email Service. I wrote this script using python and Boto AWS SDK.

Put the script inside zabbix alert script folder. In my case, I will put it inside /usr/local/share/zabbix/alertscript. And don’t forget to put your ses-region, aws-access-key-id, and aws-secret-access-key. And put a valid email address as a sender that you’ve set in your ses.

After that go to your Zabbix dashboard and navigate to Administration > Media Type, then click “Create media type”. On the Media type page, put your desired media name, choose script, then your script name.

Then you need to put these 3 parameter. If not, your script will not run properly. Click add to insert your new custom email alert.

After that, go to Administration >Users. Choose one user then go to Media tab. Click Add to create new mail alert using the script.

Choose Type to your Zabbix script type. Put active and valid email address as a recipient at Send to. Choose when to send the email alert, 1–7 means Mon to Sun, and the later is send hour. Choose severity type to send email alert. And don’t forget to check the Enabled. Click Add to save.

If you didn’t miss anything, your custom alert script should work and you will get some email alert about your network condition.

--

--