How to Configure ‘Zabbix Monitoring’ to Send Email Alerts to Gmail Account – Part 2

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.95/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Matei Cezar

I’am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

46 Responses

  1. Mahboob Ali says:

    Hi,

    I’m using Ubuntu and alertscript dir exists in /usr/lib/zabbix/alertscripts/. So I’ve make script file zabbix-sendmail in this location.

    I’ve using my other smtp server instead of Gmail which is working fine.

    I’ve completed step 3 and successfully able to send mail using /usr/lib/zabbix/alertscripts/zabbix-sendmail Mail-id “Subject” “Body” this command.

    Now there is issue in setp 4. I’ve configured media for sending mail and also enable action. But now triggers changed in zabbix GUI but it not able to send mail even no any logs are coming.

    So please suggest me what should I need to check ?

    • Matei Cezar says:

      Consult zabbix docs …the mail script parh has been changed.

      • Mahboob Ali says:

        I’ve check in /etc/zabbix/zabbix_server.conf file and in file alert location mention as below:

        AlertScriptsPath=/usr/lib/zabbix/alertscripts
        

        It means script location is /usr/lib/zabbix/alertscripts and I’ve also create script in on same location but not get success.

  2. lucian says:

    alertscripts folder name and location is in zabbix_server.conf, where zabbix_server.conf is in /etc/zabbix default location for alertscripts in Ubuntu is /etc/zabbix/alert.d everything else worked, thanks

  3. Jose says:

    Hi, I follow the process up to allow access for less secure apps in my gmail account following your indications. However after apply changes and confirme it is turned on. I still receive the error ail: cannot send message: Process exited with a non-zero status.

    Any Idea about what could be the problem?

    thanks in advance.

  4. Ted Miller says:

    I found one thing missing: on Centos 7, ssmtp does not automatically activate itself as default mta when installed. I had to do command:

    # alternatives --config mta
    

    and then choose the number next to ssmtp. Before that postfix was grabbing my emails, so they weren’t being routed through gmail.

  5. nokiamben says:

    Hi, thank you!

    It works perfectly for me ^^

  6. Muli says:

    Hi,

    I followed all the guides regarding sending mail using Gmail,

    I manage to send test mails via script to Gmail accounts, but through zabbix mails are stuck in “in progress, 3 retries left” status.

    Any help would be appreciated.

    Muli

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *