sensu-plugins / sensu-plugins-mailer

This plugin is an email handler for Sensu.
http://sensu-plugins.io
MIT License
17 stars 37 forks source link

Handler is not being executed #65

Closed pablogmorales closed 6 years ago

pablogmorales commented 6 years ago

sensu-1.1.2-1.el7.x86_64 CentOS Linux release 7.4.1708 (Core) sensu-plugins-mailer (2.0.0)

{
  "checks": {
    "Test-Check-Ping": {
      "command": "/opt/sensu/embedded/bin/check-ping.rb -h 10.87.54.10  -c 4",
      "subscribers": [
        "mdotest"
      ],
      "interval": 60,
      "auto_resolve": true,
      "occurrences": 3,
      "refresh": 60,
      "handlers": ["email-me"]
    }
  }
}
{
        "mailme": {
            "admin_gui": "--- Removed ---",
                "mail_from": "sensu@mrktmonitoring.domain.com",
                "mail_to": "myuser@domain.com",
        "smtp_port": "25",
            "smtp_address": "mail.domain.com",
            "smtp_domain": "domain.com"
        }
}
{
  "handlers": {
    "email-me": {
      "type": "pipe",
         "severities": [
              "warning",
              "critical",
              "unknown",
          "ok"
         ],
      "command": "handler-mailer.rb -j mailme"
    }
  }
}

Im able to send mails from the server from command line, mailx, and also telneting to the smtp.

I do not even see the handler being executed Thanks Regards

majormoses commented 6 years ago

We discovered the issue was that in sensu-1.1.2-1.el7.x86_64 there was a regression causing EMBEDDED_RUBY to be false. This default was changed in 0.21 so we should file a bug against omnibus for the sensu folks to investigate.