Email configuration how-to?

115 views
Skip to first unread message

John Knepper

unread,
Sep 1, 2015, 5:00:19 AM9/1/15
to flapjack
Hey, Guys / Girls -

     I would hate to be redundant as I know this is a topic that was posted before, and I found related issues on the webs.  I am having trouble getting Email alerts working in Flapjack.  The notifications log (notifications.log) show emails being sent:

2015-08-31 16:43:32 +0000 | sensu-devops-qa-test:check-albatross-api | problem | 21 | sms | <redacted phone number>

2015-08-31 16:43:32 +0000 | sensu-devops-qa-test:check-albatross-api | problem | 21 | email | <redacted>@redacted.com


     Flapjack log (flapjack.log) shows:


3035/perfstat is not up!!, 2015-08-31 17:04:29 +0000

2015-08-31T17:07:32.934181+00:00 [INFO] :: flapjack-processor :: Generating notification for event sensu-devops-qa-test:check-albatross-api, service, critical, CRITICAL - http://<redacted>.com:3035/perfstat is not up!!, 2015-08-31 17:06:29 +0000

2015-08-31T17:07:32.946646+00:00 [INFO] :: flapjack-notifier :: Enqueueing sms alert for sensu-devops-qa-test:check-albatross-api to <redacted phone number> type: problem rollup: -

2015-08-31T17:07:32.947299+00:00 [INFO] :: flapjack-notifier :: Enqueueing email alert for sensu-devops-qa-test:check-albatross-api to reda...@redacted.com type: problem rollup: -


      Here is my 'flapjack_config.yaml' email snippet:


  gateways:

    # Generates email notifications

    email:

      enabled: yes

      # the redis queue this pikelet will look for notifications on

      queue: email_notifications

      logger:

        level: DEBUG

        syslog_errors: yes

      # these values are passed directly through to EventMachine::Protocols::SmtpClient configuration,

      # and can be omitted if the defaults are acceptable

      smtp_config:

        from: "non-criti...@noreply.com"

        # reply_to: "flap...@support.example"

        host: tls://smtp.gmail.com

        # 1025 is the default port for http://mailcatcher.me

        port: 465

        starttls: true

        auth:

          type: 'plain'

          username: 'redacted'

          password: redacted

      # location of custom alert templates

      #templates:

      #  rollup_subject.text: '/etc/flapjack/templates/email/rollup_subject.text.erb'

      #  alert_subject.text: '/etc/flapjack/templates/email/alert_subject.text.erb'

      #  rollup.text: '/etc/flapjack/templates/email/rollup.text.erb'

      #  alert.text: '/etc/flapjack/templates/email/alert.text.erb'

      #  rollup.html: '/etc/flapjack/templates/email/rollup.html.erb'

      #  alert.html: '/etc/flapjack/templates/email/alert.html.erb'

      # Generates sms notifications


     Looking in Redis, it shows that there are notifications reaching the email_notifications queue.


     I am a newb to this, and was wondering do I need to setup / configure an SMTP server on top of Flapjack to get the notifications working?  Any help is appreciated, and thanks to all!


     Also, is there any how-to on setting up email with Flapjack?  So far I have a failing alert, and no emails in spite of it attempting to route it through to the proper gateway...  Thanks!

John Knepper

unread,
Sep 1, 2015, 4:52:46 PM9/1/15
to flapjack
Another additional note to this topic... I am adding AWS SES as a portal, but not sure if this configuration is correct.  I followed the directions in the configuration section for AWS-SES.

Here is what I have, but still the alerts just give me the "rollup -" message in flapjack.log.

...

  gateways:

    # Generates email notifications

    email:

      enabled: yes

      # the redis queue this pikelet will look for notifications on

      queue: email_notifications

      logger:

        level: DEBUG

        syslog_errors: yes

      # these values are passed directly through to EventMachine::Protocols::SmtpClient configuration,

      # and can be omitted if the defaults are acceptable

      smtp_config:

        from: "non-criti...@noreply.com"

        reply_to: "flap...@support.example"

        host: "email-smtp.us-<redacted region>.amazonaws.com"

        # 1025 is the default port for http://mailcatcher.me

        port: 587

        starttls: true

        auth:

          type: 'plain'

          username: "<SES public redacted key>"

          password: "<SES password redacted key>"

      # location of custom alert templates

      #templates:

      #  rollup_subject.text: '/etc/flapjack/templates/email/rollup_subject.text.erb'

      #  alert_subject.text: '/etc/flapjack/templates/email/alert_subject.text.erb'

      #  rollup.text: '/etc/flapjack/templates/email/rollup.text.erb'

      #  alert.text: '/etc/flapjack/templates/email/alert.text.erb'

      #  rollup.html: '/etc/flapjack/templates/email/rollup.html.erb'

      #  alert.html: '/etc/flapjack/templates/email/alert.html.erb'


On Tuesday, September 1, 2015 at 2:00:19 AM UTC-7, John Knepper wrote:
Hey, Guys / Girls -

     I would hate to be redundant as I know this is a topic that was posted before, and I found related issues on the webs.  I am having trouble getting Email alerts working in Flapjack.  The notifications log (notifications.log) show emails being sent:

2015-08-31 16:43:32 +0000 | sensu-devops-qa-test:check-albatross-api | problem | 21 | sms | <redacted phone number>

2015-08-31 16:43:32 +0000 | sensu-devops-qa-test:check-albatross-api | problem | 21 | email | <redacted>@redacted.com


     Flapjack log (flapjack.log) shows:


3035/perfstat is not up!!, 2015-08-31 17:04:29 +0000

2015-08-31T17:07:32.934181+00:00 [INFO] :: flapjack-processor :: Generating notification for event sensu-devops-qa-test:check-albatross-api, service, critical, CRITICAL - http://<redacted>.com:3035/perfstat is not up!!, 2015-08-31 17:06:29 +0000

2015-08-31T17:07:32.946646+00:00 [INFO] :: flapjack-notifier :: Enqueueing sms alert for sensu-devops-qa-test:check-albatross-api to <redacted phone number> type: problem rollup: -

2015-08-31T17:07:32.947299+00:00 [INFO] :: flapjack-notifier :: Enqueueing email alert for sensu-devops-qa-test:check-albatross-api to reda...@redacted.com type: problem rollup: -


      Here is my 'flapjack_config.yaml' email snippet:


  gateways:

    # Generates email notifications

    email:

      enabled: yes

      # the redis queue this pikelet will look for notifications on

      queue: email_notifications

      logger:

        level: DEBUG

        syslog_errors: yes

      # these values are passed directly through to EventMachine::Protocols::SmtpClient configuration,

      # and can be omitted if the defaults are acceptable

      smtp_config:

        from: "non-critical-alert@noreply.com"

Reply all
Reply to author
Forward
0 new messages