Ad Widget

Collapse

Zabbix email alerts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sgalliani
    Junior Member
    • Oct 2016
    • 16

    #1

    Zabbix email alerts

    Hey guys,
    I've been struggling for the past few days to try to understand why my mails won't send out, i'm not getting any single alerts.
    I've done everything right so far that on the documentation,

    I started by installing ssmtp & mailx,

    Here is my ssmtp.conf

    [email protected]
    mailhub=smtp.gmail.com:587
    rewriteDomain=your_local_domain
    hostname=localhost
    UseTLS=Yes
    UseSTARTTLS=Yes
    [email protected]
    AuthPass=PASSWORD
    FromLineOverride=YES

    I then tested it by CLI and it works great, i even allow access for less secure apps on gmail.
    I then proceded to created an alertscript in /usr/lib/zabbix/alertscripts called "zabbix-alert-smtp.sh"

    I put the content of the script in attached files(I just put USERNAME & PASSWORD) to hide the actual ones,
    I gave permissions to the script and tested it & again it works.
    Then i proceded to configure all this on Zabbix, i added all the

    Media :



    The user i'm using for alerts, that has all the rights permissions :



    The actions :





    I'm sorry for the long post, it's just i've been scratching my head like hell trying to figure out why i'm not receiving any alerts, in the action log it keeps sayings 3 retries left and in progress but i'm getting nothing. If anyone could please help, thank you anyone in advance
    Attached Files
    Last edited by sgalliani; 03-11-2016, 11:07.
  • sgalliani
    Junior Member
    • Oct 2016
    • 16

    #2
    Thanks to a friend i managed to fix the issue.. and if i had to be honest, i can't even explain it properly myself.
    I abandoned the script method and configure gmail directly into a media with media type email.
    I restarted the server & it worked immediatly, i used this page to understand my configuration :
    В большой обзорной статье мы бегло рассказали об основных возможностях Zabbix 3.0. Теперь хотим предложить вашему вниманию серию мини-обзоров новых возможностей Zabbix 3.0, начнем с прогнозирования...

    Comment

    Working...