ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Solved Zabbix - email alerts

    IT Discussion
    zabbix linux centos centos 7 postfix email smtp mta
    7
    68
    13.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller @Mike Davis
      last edited by

      @Mike-Davis said in Zabbix - email alerts:

      @scottalanmiller said in Zabbix - email alerts:

      So install ssmpt and mailx and go about it that way? I could try that with a gmail account and see if I get anything that way.

      Are you sure that that is needed?

      Not sure it's needed. I was looking at this guide:
      http://www.tecmint.com/configure-zabbix-to-send-email-alerts-to-gmail/

      Why? It's purpose is expressly to do something different from what we have today: "This tutorial will briefly discuss you on how to setup Zabbix server to send mail reports to a Gmail address by using SSMTP program, without the need to install and configure any local MTA daemon, such as Postfix, Exim etc."

      We already have Postfix installed, running and you said that you tested it and it worked.

      Mike DavisM 1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller
        last edited by

        Let's stick to testing one thing at a time. Don't hit one hiccup and start ripping and replacing the entire email system. Chances are we are dealing with something really simple, like Zabbix isn't trying to send email or isn't trying to use the MTA. If we have to put SMTP details into Zabbix, it seems like it is trying to send directly without Postfix, otherwise it would use the Postfix settings, right?

        Mike DavisM 1 Reply Last reply Reply Quote 1
        • Mike DavisM
          Mike Davis @scottalanmiller
          last edited by

          @scottalanmiller
          This command works:

          sendmail <myemailaddress>@ntg.co < /tmp/email.txt
          

          That was to make sure that no firewalls or anything were getting in the way. That said, when I checked the headers, it didn't seem to connect directly to the o365 connector where I expected it to.

          scottalanmillerS 1 Reply Last reply Reply Quote 0
          • Mike DavisM
            Mike Davis @scottalanmiller
            last edited by

            @scottalanmiller said in Zabbix - email alerts:

            Let's stick to testing one thing at a time. Don't hit one hiccup and start ripping and replacing the entire email system. Chances are we are dealing with something really simple, like Zabbix isn't trying to send email or isn't trying to use the MTA. If we have to put SMTP details into Zabbix, it seems like it is trying to send directly without Postfix, otherwise it would use the Postfix settings, right?

            I agree.

            1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller @Mike Davis
              last edited by

              @Mike-Davis said in Zabbix - email alerts:

              That was to make sure that no firewalls or anything were getting in the way. That said, when I checked the headers, it didn't seem to connect directly to the o365 connector where I expected it to.

              Where did you expect it to? Should be TLS on Port 25.

              Mike DavisM 1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller
                last edited by

                Before we head down any rabbit holes, change the settings in Zabbix to send to port 25 on the local machine.

                Mike DavisM 1 Reply Last reply Reply Quote 0
                • Mike DavisM
                  Mike Davis @scottalanmiller
                  last edited by

                  @scottalanmiller said in Zabbix - email alerts:

                  That was to make sure that no firewalls or anything were getting in the way. That said, when I checked the headers, it didn't seem to connect directly to the o365 connector where I expected it to.

                  Where did you expect it to? Should be TLS on Port 25.

                  scratch that. It did connect to protection.outlook.com

                  I don't think TLS is needed because the connector in o365 is just set to allow the connection by IP address.

                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller @Mike Davis
                    last edited by

                    @Mike-Davis said in Zabbix - email alerts:

                    @scottalanmiller said in Zabbix - email alerts:

                    That was to make sure that no firewalls or anything were getting in the way. That said, when I checked the headers, it didn't seem to connect directly to the o365 connector where I expected it to.

                    Where did you expect it to? Should be TLS on Port 25.

                    scratch that. It did connect to protection.outlook.com

                    I don't think TLS is needed because the connector in o365 is just set to allow the connection by IP address.

                    But Postfix is not configured for that, right? Only Zabbix is?

                    1 Reply Last reply Reply Quote 0
                    • Mike DavisM
                      Mike Davis @scottalanmiller
                      last edited by

                      @scottalanmiller said in Zabbix - email alerts:

                      Before we head down any rabbit holes, change the settings in Zabbix to send to port 25 on the local machine.

                      so just set SMTP server to: localhost ?

                      scottalanmillerS 1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @Mike Davis
                        last edited by

                        @Mike-Davis said in Zabbix - email alerts:

                        @scottalanmiller said in Zabbix - email alerts:

                        Before we head down any rabbit holes, change the settings in Zabbix to send to port 25 on the local machine.

                        so just set SMTP server to: localhost ?

                        Yes, my guess is that it will just work. Right now you have it set to bypass Postfix (which you tested as working) and attempt to connect directly to O365. Which might work, but isn't tested. The MTA (Postfix) should just work and is sitting there waiting for mail to try to deliver. So my guess is that it will just work.

                        1 Reply Last reply Reply Quote 0
                        • Mike DavisM
                          Mike Davis
                          last edited by

                          I made that change this morning and didn't get any emails, but I have to wonder if it's because no new triggers have been tripped or if it's not kicking out emails. I've tried to tweak some of the triggers so it would send a new alert, but nothing so far.

                          1 Reply Last reply Reply Quote 0
                          • scottalanmillerS
                            scottalanmiller
                            last edited by

                            That makes it hard to test. No way to prompt an email test?

                            1 Reply Last reply Reply Quote 0
                            • Mike DavisM
                              Mike Davis
                              last edited by

                              @scottalanmiller said in Zabbix - email alerts:

                              No way to prompt an email test?

                              I can't seem to find one.

                              1 Reply Last reply Reply Quote 0
                              • scottalanmillerS
                                scottalanmiller
                                last edited by

                                Well that sucks. I guess we just wait, now 😞

                                1 Reply Last reply Reply Quote 0
                                • RomoR
                                  Romo
                                  last edited by

                                  Couldn't you create a file on a host and make zabbix monitor that file, so when you manually erase the file and it will trigger an email?

                                  That would be a manual way to test it in my opinion.

                                  Mike DavisM 1 Reply Last reply Reply Quote 1
                                  • RomoR
                                    Romo
                                    last edited by

                                    Using vfs.file.exists maybe?

                                    0_1487043318404_tmp_11965-Screenshot_20170213-2133481664607799.png

                                    1 Reply Last reply Reply Quote 0
                                    • Mike DavisM
                                      Mike Davis @Romo
                                      last edited by

                                      @Romo said in Zabbix - email alerts:

                                      Couldn't you create a file on a host and make zabbix monitor that file, so when you manually erase the file and it will trigger an email?

                                      In one example I saw them spike the CPU on a linux box. During the day I couldn't do it, but now that it's off hours I fired up prime95 on one of the Windows Servers. I'll let the CPU sit pegged for a while and see if anything happens when the alert is triggered.

                                      1 Reply Last reply Reply Quote 0
                                      • Mike DavisM
                                        Mike Davis
                                        last edited by

                                        Well this is embarrassing. CPU has been at 100% for 15 minutes and Zabbix doesn't think it has increased at all. The disk space numbers seem to be accurate and I have a few servers over the 20% trigger for free space, so maybe I'll adjust the trigger and then see if an alert is generated.

                                        1 Reply Last reply Reply Quote 0
                                        • Mike DavisM
                                          Mike Davis
                                          last edited by

                                          Don't know why I didn't think of this earlier, but there is a trigger for "no data received for 5 minutes." Since all my windows boxes are running the Zabbix agent, I just stopped the service on one and waited. Sadly, no email, but I can see the trigger worked on the dashboard.

                                          1 Reply Last reply Reply Quote 2
                                          • Mike DavisM
                                            Mike Davis
                                            last edited by

                                            How do I figure out what email server Zabbix is using? It would make sense that it's postfix since when I run:

                                            service postfix status
                                            

                                            it tells me that the service is active and running. On the other hand is postfix standard with any CentOS install?

                                            I looked over the documentation on:
                                            https://www.zabbix.com/documentation/3.2/manual/config/notifications/media/email

                                            and I don't see anything that tells me what Zabbix is looking for under the hood.

                                            scottalanmillerS 2 Replies Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 2 / 4
                                            • First post
                                              Last post