Ad Widget

Collapse

Send Email via gmail with authentication

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ruicruz
    Junior Member
    • Jun 2015
    • 23

    #1

    Send Email via gmail with authentication

    Good afternoon,

    I would like to configure zabbix to send me alerts of triggers via email.

    I want to send via gmail which requires authentication.

    I am having difficulties figuring out how to configure alerts via email.

    Can somebody help ?

    Thank you
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello,

    You have to install Postfix as mail relay client on your Zabbix server which authenticates to Gmail. All messages from Zabbix must be first sent to Postfix on localhost then.

    Here is a manual that may help you: https://rtcamp.com/tutorials/linux/u...ix-gmail-smtp/ It is for Ubuntu systems but can be modified to apply on other OS as well.

    Best Regards,
    Ingus

    Comment

    • jan.garaj
      Senior Member
      Zabbix Certified Specialist
      • Jan 2010
      • 506

      #3
      Or use python (alert) script which is able to handle auth:
      Zabbix SMTP Alert script for gmail. GitHub Gist: instantly share code, notes, and snippets.


      BTW: Zabbix 3.0 will provide SMTP auth option by default
      Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
      My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

      Comment

      • ruicruz
        Junior Member
        • Jun 2015
        • 23

        #4
        Thank you both for your answers.

        Think i will try ingus.vilnis solution, i am kinda more confortable with changing configurations on files than programming.

        BTW: I am using zabbix 2.2.2 do you guys know i can upgrade it without losing my database ?

        Best Regards to both

        Comment

        • jan.garaj
          Senior Member
          Zabbix Certified Specialist
          • Jan 2010
          • 506

          #5
          Simple - upgrade server and start server - http://blog.zabbix.com/zabbix-2-2-fe...pgrading/1956/

          But don't forget: backup/backup/backup
          Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
          My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

          Comment

          • ruicruz
            Junior Member
            • Jun 2015
            • 23

            #6
            Hello again,

            I have managed to put postfix to send emails to me via gmail.

            Now my doubt is how to put postfix to work with zabbix.

            Is there a need of a script or the configurations from zabbix are enough ?

            Thank you once again

            Best Regards,

            Comment

            • ingus.vilnis
              Senior Member
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Mar 2014
              • 908

              #7
              Hi,

              It should be enough with the standard configs.

              Go to Administration -> Media Types
              Create a new media type.
              If I remember correct the settings should be as follows:
              SMTP server: localhost
              SMTP helo: localhost
              SMTP email: [email protected]

              Best Regards,
              Ingus

              Comment

              • ruicruz
                Junior Member
                • Jun 2015
                • 23

                #8
                Thank you once again Ingus,

                in the smtp email, it should the email sending, because to configure the receiving email is in the users, am i right ?

                Best regards,

                Comment

                • ingus.vilnis
                  Senior Member
                  Zabbix Certified Trainer
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Mar 2014
                  • 908

                  #9
                  Yes, you are correct, that is the sending email. User emails are configured in their profiles.

                  Best Regards,
                  Ingus

                  Comment

                  • ruicruz
                    Junior Member
                    • Jun 2015
                    • 23

                    #10
                    Just tested, it is working.

                    Thank you very much for your help.

                    Is there anywhere where i can give feedback for you help ?

                    Best Regards

                    Comment

                    • ingus.vilnis
                      Senior Member
                      Zabbix Certified Trainer
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • Mar 2014
                      • 908

                      #11
                      I am happy that you got this working.

                      Regarding feedback I even don't know what to say.
                      Your previous reply said already a lot.

                      Best Regards,
                      Ingus

                      Comment

                      • miguelangel.martin
                        Junior Member
                        • Apr 2016
                        • 7

                        #12
                        Alert Zabbix 3.0

                        Hi! I'm trying to configure Zabbix 3.0 in order to be able of sending alerts to a gmail adress. I've tried anyways but I don“t be able to configure it.

                        I've modified the actions and the media type, trying with port 465 and 587, but nothing.

                        Anybody can help me?

                        Thank you.

                        Comment

                        Working...