Ad Widget

Collapse

zabbix did not send email alert

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • FilipHajek
    Junior Member
    • Sep 2023
    • 17

    #1

    zabbix did not send email alert

    Hello,
    I have started testing zabbix for implementation and my email sending from zabbix is not working.
    I have everything configured and the email still doesn't arrive.
    The user to whom the email is sent exists and has a completed email.
    trigger set and working
    the email is sent 7x24
    email service configured to smtp over port 25

    is there a log somewhere in the OS that shows zabbix attempting to send an email?
    I'm using appliance 6.4.6

    for now I use smtp.volny.cz (free webmail with smtp access) because I don't have access to the company smtp
    I also tried google mail and nothing come.

    so I would like to see some log if zabbix is even trying to send email.
    there is some log in zabbix where should be visible attempt of sending email?

    Thank you. Filip​
  • mackane
    Junior Member
    • Sep 2023
    • 12

    #2
    Hello,
    you need to make sure that port 25 is open,
    This is not the case by default on the zabbix appliance.
    Below are the ports that are open by default:
    Firewall configuration
    The appliance uses iptables firewall with predefined rules:

    Opened SSH port (22 TCP);
    Opened Zabbix agent (10050 TCP) and Zabbix trapper (10051 TCP) ports;
    Opened HTTP (80 TCP) and HTTPS (443 TCP) ports;
    Opened SNMP trap port (162 UDP);
    Opened outgoing connections to NTP port (53 UDP);
    ICMP packets limited to 5 packets per second;
    All other incoming connections are dropped.​

    Comment

    • FilipHajek
      Junior Member
      • Sep 2023
      • 17

      #3
      Hello,
      thank you for information,
      i was test is by telnet smtp.volny.cz 25 and its connected and works well,
      i know that incoming (to zabbix) port 25 is closed , but i am outgoing from zabbix to smtp.volny.cz and gvia telnet works well,
      this is reason why i am looking for log file on zabbix machine where will be visible some traffic or attempt to send email.
      if there is no log file i wil use tcpdump to see packets.

      maybe some debug log mode on zabbix server will help, it is possible to turn it on?

      Thank you Filip

      Comment

      • vijayk
        Senior Member
        • May 2023
        • 305

        #4
        You can enable it from server config file.

        Comment

        • FilipHajek
          Junior Member
          • Sep 2023
          • 17

          #5
          even if i change to level 4 there is no mention about email send....

          Comment

          • vijayk
            Senior Member
            • May 2023
            • 305

            #6
            Originally posted by FilipHajek
            even if i change to level 4 there is no mention about email send....
            You can check the trigger email status at Monitoring-->Problems. It will show you if mail is sent or not.
            Click image for larger version

Name:	image.png
Views:	4496
Size:	23.0 KB
ID:	470858

            Comment

            • FilipHajek
              Junior Member
              • Sep 2023
              • 17

              #7
              no, i dont have any icon here or any information in report/actions

              Comment

              • FilipHajek
                Junior Member
                • Sep 2023
                • 17

                #8
                here is problem visible at dashboard
                Click image for larger version

Name:	image.png
Views:	4448
Size:	8.9 KB
ID:	470870

                Comment

                • mackane
                  Junior Member
                  • Sep 2023
                  • 12

                  #9
                  Sorry for my late replies,
                  thanks @vijayk
                  as well as this control,
                  the zabbix user that you use to send mail must have read rights on the host groups​
                  Click image for larger version

Name:	image.png
Views:	4443
Size:	13.9 KB
ID:	470875

                  Comment


                  • FilipHajek
                    FilipHajek commented
                    Editing a comment
                    i have selected administrator rights for the user, but i will chek it, thank you Filip
                • FilipHajek
                  Junior Member
                  • Sep 2023
                  • 17

                  #10
                  this is definition of item
                  Click image for larger version

Name:	image.png
Views:	4447
Size:	43.3 KB
ID:	470878

                  this is definition of trigger
                  Click image for larger version

Name:	image.png
Views:	4466
Size:	35.8 KB
ID:	470879

                  user definition and his email addresses
                  Click image for larger version

Name:	image.png
Views:	4484
Size:	23.8 KB
ID:	470880

                  Click image for larger version

Name:	image.png
Views:	4493
Size:	11.4 KB
ID:	470881



                  definition of email
                  Click image for larger version

Name:	image.png
Views:	4494
Size:	26.9 KB
ID:	470882



                  Comment

                  • FilipHajek
                    Junior Member
                    • Sep 2023
                    • 17

                    #11
                    definition of alert action (item ping 8.8.8.8 created on zabbix host)


                    Click image for larger version

Name:	image.png
Views:	4481
Size:	19.1 KB
ID:	470884

                    detail of action/operation
                    Click image for larger version

Name:	image.png
Views:	4437
Size:	43.3 KB
ID:	470885

                    maybe there is some error in action, because trigger looks ok and problem is visible on dashboard,
                    but i did not see the error in my settings

                    thank you Filip

                    Comment

                    • vijayk
                      Senior Member
                      • May 2023
                      • 305

                      #12
                      Your condition is wrong. You have to select trigger instead of Host in Action.

                      Comment

                      • cyber
                        Senior Member
                        Zabbix Certified SpecialistZabbix Certified Professional
                        • Dec 2006
                        • 4807

                        #13
                        Originally posted by vijayk
                        Your condition is wrong. You have to select trigger instead of Host in Action.
                        No you don't... Why do you think there is an option to choose host, if it is wrong?

                        Comment

                        • vijayk
                          Senior Member
                          • May 2023
                          • 305

                          #14
                          Originally posted by cyber

                          No you don't... Why do you think there is an option to choose host, if it is wrong?
                          https://www.zabbix.com/documentation...ion/conditions
                          May be you are right. But he need only one trigger alert.

                          Comment

                          • cyber
                            Senior Member
                            Zabbix Certified SpecialistZabbix Certified Professional
                            • Dec 2006
                            • 4807

                            #15
                            Originally posted by vijayk

                            May be you are right. But he need only one trigger alert.
                            he may need an email for one trigger, but how to define an action here is irrelevant, is it based on trigger or based on host. Result is the same - email gets sent.
                            But I am pretty sure it is a testing scenario here, and OP will change things around when something real needs to be done.

                            I still have a feeling, there is something with user permissions here... Something too obvious, that I cannot put a finger on it..

                            Comment

                            Working...