Even though the script works after some customizations in the google account. (Disabling some restrictions). It does not work using Zabbix system. The way I am trying to use it is the following
- copy to AlertScriptsPath, /etc/zabbix/alert.d
- chmod 755 zabbix-alert-smtp.sh
- Go to Zabbix web UI, Administration > Media types > Create media type
- Enter Script name: zabbix-alert-smtp.sh
-
Save
-
Create Action through Zabbix web UI and use a specific trigger in conditions.
But getting the following results which attach on screenshots.
(Message not sent)
Is there anything wrong at my side. Could you provide more detailed instructions for the integration of your script with zabbix?
Kind Regards,
Stavros
If the script works with command line, It might your environment problem.
AlertScriptsPath might be wrong.
In my environment, a path of AlertScriptsPath is below.
/usr/local/share/zabbix/alertscripts/
Please check your zabbix server settings.(ex.
/usr/local/etc/zabbix_server.conf
)Reach a limitation of sending emails
Gmail have a limitation of maximum count of sending emails via smtp.gmail.com.
In this case, you can receive emails later.
else
You can find more details in zabbix documentation(https://www.zabbix.com/documentation/2.4/manual/config/notifications/media/script)