SMTP issue



  • I configured the SMTP module. The test is working. The e-mail arrives.

    I have a new module with heartbeat. When it is of-line, the error message evoked by the related rule generates a high alert. In the log the the entry is there. SMTP does not react.



  • @user2684

    It is working again. Why I don't know but who cares?



  • @user2684

    The behaviour is unstable. Only every now and than a message is sent. No trend to see.



  • I guess the alert is triggering, you see it under notification but the email does not arrive, correct? If so look at the logs for any error coming from the notification/smtp module. If nothing is showing up, try enabling debug mode for that module and trigger the notification. At least here the smtp notification never failed. Also ensure there are no suppression rules configured. Thanks!



  • @user2684
    Your advice was right. I had a suppression on SMTP messages per hour instead of suppression on individual rules.

    Issue closed



  • @user2684

    I do have a SMTP issue again. I have set the heartbeat signal for a module. The rule is triggering and an alert pops-up. The e-mail message is not sent.

    When I disable the heartbeat sensor of my weather station it is the same. The alert pops up but no e-mail. And this one has been working.

    With debug on for the smtp module, nothing happens. I get the feeling that the trigger is not being passed to the smtp module.



  • @eporocrail said in SMTP issue:

    With debug on for the smtp module, nothing happens. I get the feeling that the trigger is not being passed to the smtp module.

    Theoretically the alert popup and the smtp module use the same way to capture notifications to be sent so I doubt this is the case. Is notification/smtp showing up as running and configured in eGeoffrey/Modules? Is the test notification working fine?
    Thanks



  • @user2684

    I get the following error:

    notification/smtp] unable to notify: Traceback (most recent call last):| File "sdk/python/module/notification.py", line 83, in __notify| self.on_notify(severity, text)| File "notification/smtp.py", line 89, in on_notify| self.send_email(title, template.encode('utf-8'))| File "notification/smtp.py", line 68, in send_email| smtp = smtplib.SMTP(self.config["hostname"], self.config["port"])| File "/usr/local/lib/python2.7/smtplib.py", line 256, in __init__| (code, msg) = self.connect(host, port)| File "/usr/local/lib/python2.7/smtplib.py", line 317, in connect| self.sock = self._get_socket(host, port, self.timeout)| File "/usr/local/lib/python2.7/smtplib.py", line 292, in _get_socket| return socket.create_connection((host, port), timeout)| File "/usr/local/lib/python2.7/socket.py", line 557, in create_connection| for res in getaddrinfo(host, port, 0, SOCK_STREAM):|gaierror: [Errno -2] Name does not resolve|
    


  • @user2684

    What happened I do not know but suddenly e-mail messages about a module being off-line started coming in.

    Issue closed



  • Error message is saying the hostname of the smtp server configured could not be resolved. Internet or DNS down?



  • @user2684

    That could be the reason why it started working later on.


Log in to reply