Ad Widget
Collapse
Zabix send mail only for specific erro
Collapse
X
-
I installed ssmtp and used mail command (after install mailutils on my server) to send emails using simple script
I used the following URLs to install ssmtp and add the script on my alertscript path
I used this script
#!/bin/sh
export zabbixemailto="$1"
export zabbixsubject="$2"
export zabbixbody="$3"
echo "$zabbixbody" > /tmp/mymailinput
mail --subject="$zabbixsubject" $zabbixemailto < /tmp/mymailinput
rm /tmp/mymailinput
then save it as zabbix-alerts.sh in my alertscript path
then added this script as my media type
then create the user that will receive emails and used this media type then configured the action and the emails send automatically
if you want to receive special email for special error when you create the action , select the condition tab and select trigger value = problem (then add) and select the template (that is the source of trigger) by template = name (then add)
Comment