Not the answer you need?
Register and ask your own question!

configure SMTP

ivishnu7ivishnu7 ContributorCurrent User Role Beginner
And additional to this, how to configure SMTP options to set mail notification alerts. I am using followed options and unable to get notifications. Please let me know where I need to modify below SMTP configuration.

#################################### SMTP / Emailing ##########################
[smtp]
;enabled = true
;host = localhost:25
;user = [email protected]
;password =
;cert_file =
;key_file =
;skip_verify = false
;from_address = [email protected]

Comments

  • MykolaMykola Percona Percona Staff Role
    Barrett prepared good article about alerting configuration:

    https://www.percona.com/blog/2017/01/23/mysql-and-mongodb-alerting-with-pmm-and-grafana/
  • ivishnu7ivishnu7 Contributor Current User Role Beginner
    I followed the same document and getting connection refused errors. Is it related to network/firewall issue or something else?

    I am using default SMTP configuration.

    [smtp]
    enabled = true
    host = localhost:25
    user =
    password =


    Error message from /var/log/grafana.log.

    t=2017-03-31T19:18:30+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[[email protected]om]
    t=2017-03-31T19:18:30+0000 lvl=eror msg="Failed to send alert notification email" logger=alerting.notifier.email error="dial tcp [::1]:25: getsockopt: connection refused"
    t=2017-03-31T19:18:30+0000 lvl=eror msg="Failed to send alert notifications" logger=context userId=1 orgId=1 uname=pmm-admin error="dial tcp [::1]:25: getsockopt: connection refused"
    t=2017-03-31T19:18:30+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=pmm-admin method=POST path=/api/alert-notifications/test status=500 remote_addr=127.0.0.1 time_ms=3ns size=48
  • ivishnu7ivishnu7 Contributor Current User Role Beginner
    Later I have modified SMTP settings, then I am getting handshake errors. Do I need to install any additional tools in docker?

    t=2017-04-01T00:55:16+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[[email protected]]
    t=2017-04-01T00:55:16+0000 lvl=eror msg="Failed to send alert notification email" logger=alerting.notifier.email error="remote error: tls: handshake failure"
    t=2017-04-01T00:55:16+0000 lvl=eror msg="Failed to send alert notifications" logger=context userId=1 orgId=1 uname=pmm-admin error="remote error: tls: handshake failure"
    t=2017-04-01T00:55:16+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=pmm-admin method=POST path=/api/alert-notifications/test status=500 remote_addr=127.0.0.1 time_ms=107ns size=48
  • MykolaMykola Percona Percona Staff Role
    It is needed to configure external SMTP server,
    docker container doesn't have configured mail server inside
  • ivishnu7ivishnu7 Contributor Current User Role Beginner
    The pmm-server already configured with external smtp server. I am able to send mails from pmm-server with this command(echo "testing"| mail -s "test" [email protected]) and I am able to do telnet to smtp server also. I am not sure why handshake failure errors getting. Share documents any related to this error.

    t=2017-04-01T20:52:55+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[[email protected]]
    t=2017-04-01T20:52:55+0000 lvl=eror msg="Failed to send alert notification email" logger=alerting.notifier.email error="remote error: tls: handshake failure"
    t=2017-04-01T20:52:55+0000 lvl=eror msg="Failed to send alert notifications" logger=context userId=1 orgId=1 uname=pmm-admin error="remote error: tls: handshake failure"
    t=2017-04-01T20:52:55+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=pmm-admin method=POST path=/api/alert-notifications/test status=500 remote_addr=127.0.0.1 time_ms=57ns size=48
  • MykolaMykola Percona Percona Staff Role
    when you try to connect 127.0.0.1 from docker container it is actually tries to connect to something inside docker container, not to docker host system.

    SMTP server is not configured inside docker container, so grafana cannot send anything because it cannot connect to SMTP sever inside container.
    you need to configure external SMTP for grafana.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.