Git Product home page Git Product logo

sensu-plugins-mailer's Introduction

Sensu-Plugins-mailer

Build Status Gem Version Code Climate Test Coverage Dependency Status

Functionality

Files

  • bin/handler-mailer-mailgun.rb
  • bin/handler-mailer-ses.rb
  • bin/handler-mailer.rb

Usage

The following three configuration variables must be set if you want mailer to use remote SMTP settings:

smtp_address - defaults to "localhost"
smtp_port - defaults to "25"
smtp_domain - defaults to "localhost.localdomain"

There is an optional subscriptions hash which can be added to your mailer.json file. This subscriptions hash allows you to define individual mail_to addresses for a given subscription. When the mailer handler runs it will check the clients subscriptions and build a mail_to string with the default mailer.mail_to address as well as any subscriptions the client subscribes to where a mail_to address is found. There can be N number of hashes inside of subscriptions but the key for a given hash inside of subscriptions must match a subscription name.

Optionally, you can specify your own ERB template file to use for the message body. The order of precedence for templates is: command-line argument (-t), client config called "template", the mailer handler config, default.

Optionally, you can specify your own ERB template file to use for the message subject. The order of precedence for templates is: command-line argument (-T), client config called "subject_template", the mailer handler config, default.

{
  "mailer": {
    "mail_from": "[email protected]",
    "mail_to": "[email protected]",
    "smtp_address": "smtp.example.org",
    "smtp_port": "25",
    "smtp_domain": "example.org",
    "template": "/optional/path/to/template.erb",
    "subject_template": "/optional/path/to/subject_template.erb",
    "subscriptions": {
      "subscription_name": {
        "mail_to": "[email protected]"
      }
    }
  }
}

handler-mailer-mailgun

{
  "mailer-mailgun": {
    "mail_from": "[email protected]",
    "mail_to": "[email protected]",
    "mg_apikey": "mailgunapikeygoeshere",
    "mg_domain": "mailgun.domain.com"
  }
}

handler-mailer-ses

{
  "mailer-ses": {
    "mail_from": "[email protected]",
    "mail_to": "[email protected]",
    "aws_access_key": "myawsaccesskey",
    "aws_secret_key": "myawssecretkey",
    "aws_ses_endpoint": "email.us-east-1.amazonaws.com"
  }
}

handler-mailer

{
  "mailer": {
    "admin_gui": "http://admin.example.com:8080/",
    "mail_from": "[email protected]",
    "mail_to": "[email protected]",
    "smtp_address": "smtp.example.org",
    "smtp_port": "25",
    "smtp_domain": "example.org"
  }
}

By default, the handler will use plain as the SMTP authentication type, but you may also specify "smtp_authentication": "ntlm" for compatible servers, e.g. Microsoft Exchange.

Contact Based Routing

Optionally, this handler can use the same syntax as Sensu Enterprise contact routing for sending e-mails for particular checks or clients, in addition to the previous configuration. This is configured by declaring contacts:

support.json

{
  "contacts": {
    "support": {
      "email": {
        "to": "[email protected]"
      }
    }
  }
} 

Then, in a check definition, you can specify a contact or an array of contacts which should be notified by e-mail:

example_check.json

{
  "checks": {
    "example_check": {
      "command": "do_something.rb",
      "handler": "mailer",
      "contact": "support"
    }
  }
}

Additionally, a client definition can specify a contact or an array of contacts to be notified of any check which alerts to the mailer handler. This is configured by specifying a contact value, or contacts array in the client.json configuration.

Installation

Installation and Setup

Create a handler file in /etc/sensu/conf.d with the following content, replacing with your own configuration:

{
    "mailer" :  {
        "admin_gui" : "http://localhost:3000",
        "mail_from": "[email protected]",
        "mail_to": "[email protected]",
        "delivery_method": "smtp",
        "smtp_address": "localhost",
        "smtp_port": "25",
        "smtp_domain": "localhost.local_domain",
        "smtp_enable_starttls_auto": "true",
        "smtp_username" : "username",
        "smtp_password" : "XXXXXXXX"
    },
    "handlers": {
        "mailer": {
            "type": "pipe",
            "command": "/opt/sensu/embedded/bin/handler-mailer.rb"
        }
    }
}

Notes

sensu-plugins-mailer's People

Contributors

adam820 avatar analytically avatar arthurzenika avatar asachs01 avatar baweaver avatar bgeesaman avatar corro avatar dependabot-preview[bot] avatar dependabot-support avatar eheydrick avatar els-blasterspike avatar ericlakich avatar jk-build avatar joshbeard avatar majormoses avatar mattyjones avatar miguelcnf avatar nathanhruby avatar oba11 avatar sstarcher avatar stevenviola avatar tangresh avatar tas50 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sensu-plugins-mailer's Issues

contact based routing only accepts 1 email address

When routing alerts to specific users, SOMETIMES it uses the address configured in the check. (I got 3 of these in a row!) More often it sends alerts to the email address configured as default in the handler definition.

Contacts:

{
  "contacts": {
    "sensu-alerts": {
      "email": {
        "to": "[email protected]"
      }
    },
    "userA": {
      "email": {
        "to": "[email protected]"
      }
    },
    "userB": {
      "email": {
        "to": "[email protected]"
      }
    }
  }
}

Handler definition:

{
  "mailer": {
      "admin_gui": "http://10.1.0.158:4000/",
      "delivery_method": "smtp",
      "mail_from": "[email protected]",
      "mail_to": "[email protected]",
      "smtp_address": "localhost",
      "smtp_port": "25",
      "smtp_domain": "domain.com"
    },

  "handlers": {
    "mailer": {
      "type": "pipe",
      "command": "handler-mailer.rb",
      "severities": ["critical"]
      }
  }
}

Check definition:

{
  "checks": {
    "swapinout": {
      "command": "check-swapins 400",
      "subscribers": [
        "memory"
      ],
      "interval": 10,
      "occurrences": 6,
      "refresh": 300,
      "handlers": [ "default", "mailer" ],
      "contact": [ "userB", "userA" ]
    }
  }
}

Note that the check definition specifies contacts userA and userB, but email is still sent to the default address specified in handler definition. ...most of the time. 3 times it was sent to the appropriate address for userA.

HOWEVER in a different check configured identically, it is consistently sending to userA.

    "disk-cs1": {
      "command": "check-disk-usage.rb -i /tmp,/mnt/2000a,/mnt/2000b,/mnt/2000c,/mnt/2000d,/run,/gfs -c 85 -x tmpfs,debugfs,tracefs",
      "subscribers": [
        "disk-cs1"
      ],
      "interval": 60,
      "occurrences": 3,
      "refresh": 300,
      "handlers": [ "default", "mailer" ],
      "contact": [ "userA" ]
    }
  }
}

UPDATE: The difference is whether 1 contact or multiple contacts are specified. From the documentation: "in a check definition, you can specify a contact or an array of contacts which should be notified by e-mail"

When an array of contacts is specified, it sends to the default address ONLY. Neither/none of the specified contacts.

When only 1 contact is specified, it sends to that 1 contact.

UPDATE 2: No that's not it either.

contact based routing only accepts 1 email address - same as #55

Hi,

I have the same problem as reported in ..
contact based routing only accepts 1 email address #55

The email contacts are configured in the check. Emails only get sent to the default address configured in the mymail_handler.json file and not to the contacts configured in the support.json file.

If i only put one address in "contact" field in the check it will send to that address, adding an array of addresses doesn't work.

mymail_handler.json

{
    "mailer" :  {
        "mail_from": "sensu@ieatoskca-sensu3",
        "mail_to": ["[email protected]"],
        "delivery_method": "smtp",
        "smtp_address": "smtp.internal.company.com",
        "smtp_port": "25",
        "smtp_domain": "company.com"
    },
    "handlers": {
        "mailer": {
            "type": "pipe",
            "command": "/opt/sensu/embedded/bin/handler-mailer.rb -t /etc/sensu/conf.d/html_template.erb -s 'Openstack Cloud 3A ' -c html",
         "filter": "state_change_only",
	          "severities": ["ok","warning","critical","unknown"],
            "handle_silenced": true,
            "handle_flapping": true
	    
        }
    }
}

support.json

{
  "contacts": {
    "support": {
      "email": {
        "to": "[email protected]"
      }
    },
    "team1": {
      "email": {
        "to": "[email protected]"
      }
    },
    "team2": {
      "email": {
        "to": "[email protected]"
      }
    }
  }
}

check_test.json

{
    "checks": {
        "test_ignore": {
            "command": "exit 2",
            "standalone": true,
            "interval": 30,
            "handlers": ["mailer"],
            "contact": [
		"support",
		"team2"
	    ]
         }
     }
}

I turned on debug and attached the output of:

grep -i test_ignore /var/log/sensu/sensu-server.log
[debug.txt](https://github.com/sensu-plugins/sensu-plugins-mailer/files/1291942/debug.txt)

Sensu was running on version 0.29. I updated to latest as below with same result...

[root@ieatoskca-sensu3 tmp]# gem list | grep sensu
sensu (1.0.3)
sensu-cli (0.8.0)
sensu-extension (1.5.1)
sensu-extensions (1.9.0)
sensu-extensions-check-dependencies (1.0.1)
sensu-extensions-debug (1.0.0)
sensu-extensions-json (1.0.0)
sensu-extensions-occurrences (1.2.0)
sensu-extensions-only-check-output (1.0.0)
sensu-extensions-ruby-hash (1.0.0)
sensu-json (2.1.0)
sensu-logger (1.2.1)
sensu-plugin (2.3.0, 1.4.5)
sensu-plugins-cpu-checks (1.1.2)
sensu-plugins-disk-checks (2.5.0)
sensu-plugins-logstash (1.1.1)
sensu-plugins-mailer (1.2.0)
sensu-plugins-memory-checks (3.0.2)
sensu-plugins-network-checks (2.0.1)
sensu-plugins-ntp (1.0.1)
sensu-redis (2.2.0)
sensu-settings (10.3.0)
sensu-spawn (2.2.1)
sensu-transport (7.0.2)

Regards,

Noel

Handler is not being executed

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": "[email protected]",
                "mail_to": "[email protected]",
		"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

Subscriptions recipients not honored

I'm running an instance of mailer, and I'm having trouble specifying extra recipients for my alerts. I've got a user specified in "mail_to" and further users specified in the subscriptions, but only the "mail_to" user is getting emails. My mailer.json looks like this:

{
"mailer" : {
"admin_gui" : "https://example.com/uchiwa/",
"mail_from": "[email protected]",
"mail_to": ["[email protected]"],
"delivery_method": "smtp",
"smtp_address": "localhost",
"smtp_port": "25",
"smtp_domain": "localhost.local_domain",
"subscriptions" : {
"subscription1": {
"mail_to": ["[email protected]",
"[email protected]"]
},
"subscription2": {
"mail_to": ["[email protected]"]
}
# further subscriptions omitted
}
},
"handlers": {
"mailer": {
"type": "pipe",
"command": "/opt/sensu/embedded/bin/handler-mailer.rb",
"severities": ["warning", "critical", "unknown"]
},
"mailer-crit": {
"type": "pipe",
"command": "/opt/sensu/embedded/bin/handler-mailer.rb",
"severities": ["critical", "unknown"]
}

}

}

Handler still does internal filtering

{
    "timestamp": "2018-11-19T16:22:34.639264-0600",
    "level": "info",
    "message": "handler output",
    "handler": {
        "type": "pipe",
        "command": "/opt/sensu/embedded/bin/handler-mailer.rb",
        "name": "mailer"
    },
    "event": {
        "id": "ae98f83c-976f-494d-9dea-823cd20b9d18"
    },
    "output": [
        "warning: event filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin warning: occurrence filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin only handling every 60 occurrences: sensu.sachshaus.local/testing_error"
    ]
}

^ seems to indicate that this plugin still does internal filtering a la the "handling every 60 occurrences". Ideally, this would use the newer version of the sensu-plugin gem (iirc, it's at 2.7.0). I know the current way to do things is to use refresh, but this seems to be an unnecessary step when bumping up the version fixes the issue. I see there's already been #45 and #26 discussing the issue, but not the fact that there does appear to be filtering behavior present and active inside the plugin. I'll submit a PR shortly to remedy the issue.

default mailer handler fails in embedded ruby

This is a cross post for the issue below since this is the right project. After following the install instructions, we're seeing that the default mailer plugin is throwing ruby errors from within the embedded ruby install. Note, installation is ubuntu 16.04 LTS.

Linux sensu-server-01 4.4.0-1016-aws #25-Ubuntu SMP Thu Apr 20 11:34:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

There is a similar comment on mysql below.

http://stackoverflow.com/questions/41520996/mysql-gem-install-error-on-ruby-2-4

{"timestamp":"2017-05-01T04:33:52.745000+0000","level":"error","message":"handler output","handler":{"command":"/opt/sensu/embedded/bin/handler-mailer.rb","type":"pipe","name":"default"},"event":{"id":"42aa4101-71fc-461a-a51b-501230ba1e9a"},"output":["/opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:270:in find_spec_for_exe': can't find gem sensu-plugins-mailer (>= 0.a) (Gem::GemNotFoundException)\n\tfrom /opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:298:in activate_bin_path'\n\tfrom /opt/sensu/embedded/bin/handler-mailer.rb:22:in `

'\n"]}

root@sensu-server-01:~# dpkg --list | grep sensu
ii sensu 0.29.0-7 amd64 A monitoring framework that aims to be simple, malleable, and scalable.
ii sensu-enterprise 2.5.4-1 all With Sensu Enterprise you can have all of the power of the best open-source monitoring framework (and community) in the world, plus third-party integrations designed to get Sensu up and running with the tools you are already using, and Enterprise-Class Support for when you need help.
ii sensu-enterprise-dashboard 1:2.7.0-2 amd64 With Sensu Enterprise you can have all of the power of the best open-source monitoring framework (and community) in the world, plus third-party integrations designed to get Sensu up and running with the tools you are already using, and Enterprise-Class Support for when you need help.

handler-mailer.rb with Office365 - 504 5.7.4 Unrecognized authentication type

handler-mailer.rb with Office365 - 504 5.7.4 Unrecognized authentication type

Hello everybody

I'm trying to connect the handler-mailer plugin with Office365. Unfortunately, the following error message always appears:

{"timestamp":"2018-02-18T18:19:01.319729+0100","level":"error","message":"handler output","handler":{"type":"pipe","command":"/opt/sensu/embedded/bin/handler-mailer.rb","name":"mailer"},"event":{"id":"7698933b-981e-4793-80f8-7a1a091d4df8"},"output":["/opt/sensu/embedded/lib/ruby/2.4.0/net/smtp.rb:981:in check_auth_response': 504 5.7.4 Unrecognized authentication type [VI1P195CA0020.EURP195.PROD.OUTLOOK.COM] (Net::SMTPAuthenticationError)\n\tfrom /opt/sensu/embedded/lib/ruby/2.4.0/net/smtp.rb:736:in auth_plain'\n\tfrom /opt/sensu/embedded/lib/ruby/2.4.0/net/smtp.rb:728:in authenticate'\n\tfrom /opt/sensu/embedded/lib/ruby/2.4.0/net/smtp.rb:565:in do_start'\n\tfrom /opt/sensu/embedded/lib/ruby/2.4.0/net/smtp.rb:518:in start'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:112:in deliver!'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/mail-2.6.3/lib/mail/message.rb:2141:in do_delivery'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/mail-2.6.3/lib/mail/message.rb:238:in deliver'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/mail-2.6.3/lib/mail/mail.rb:140:in deliver'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-mailer-2.0.1/bin/handler-mailer.rb:272:in block in handle'\n\tfrom /opt/sensu/embedded/lib/ruby/2.4.0/timeout.rb:93:in block in timeout'\n\tfrom /opt/sensu/embedded/lib/ruby/2.4.0/timeout.rb:33:in block in catch'\n\tfrom /opt/sensu/embedded/lib/ruby/2.4.0/timeout.rb:33:in catch'\n\tfrom /opt/sensu/embedded/lib/ruby/2.4.0/timeout.rb:33:in catch'\n\tfrom /opt/sensu/embedded/lib/ruby/2.4.0/timeout.rb:108:in timeout'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-mailer-2.0.1/bin/handler-mailer.rb:271:in handle'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-1.4.5/lib/sensu-handler.rb:99:in block in class:Handler'\nwarning: event filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin\nwarning: occurrence filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin\n"]}`

This is my handler.json config file

{
	"mailer" :  {
		"admin_gui" : "https://monitoring.xyz.com:8080",
		"mail_from": "[email protected]",
		"mail_to": [
			"[email protected]",
			"[email protected]"
		],
		"delivery_method": "smtp",
		"authentication": "login",
		"smtp_enable_starttls_auto": "true",
		"smtp_address": "smtp.office365.com",
		"smtp_port": "587",
		"smtp_domain": "office365.com",
		"smtp_username" : "[email protected]",
		"smtp_password" : "XXXXXXXXX"
	},
	"handlers": {
		"mailer": {
			"type": "pipe",
			"command": "/opt/sensu/embedded/bin/handler-mailer.rb"
			}
	}
}

Can anybody help me further?

Thank you and best regards

Lars

High CPU consumption by mailer handler

Hi, I am using sensu-plugins-mailer for alerts and notifications. I noticed that handler-mailer.rb is consuming 10 to 14% of CPU. I always see that sensu server CPU consumption is 100% as there are too many alert notifications. Can you please let me know if this is normal and what could be other alternatives? Following is the content in my handler.json

"infra_alert": {
"type": "set",
"handlers": [
"debug",
"slack_infra_alerts",
"mail_alert"
]
},
"mail_alert": {
"type": "set",
"filters": [
"not_wip"
],
"handlers": [
"mail_admin",
"mail_at_team_api"
]
},
"mail_admin": {
"type": "pipe",
"command": "handler-mailer.rb -j mailer_admin_team",
"filters": [
"status_not_ok"
]
},

new release

Can you release a new version of this plugin please?

There is nasty bug on email content-type.

Thanks

-j, --json_config help text and documentation are misleading

The help text for -j, --json_config is misleading. The text is not completely clear that it means a global sensu configuration json key which stores the configuration. I initially thought that the param points to a file containing the config. The comments in the handler do not help either:

# Note: The default mailer config is fetched from the predefined json config file which is "mailer.json" or any other
#       file defiend using the "json_config" command line option.

Changing

-j, --json_config JsonConfig     Config Name

to

-j, --json_config JsonKey     Sensu config key containing mailer settings

or something similar might help a bit.

Alternatively changing the logic to match the documentation would be acceptable.

receiving the alerts before the refresh interval

Hi I am using sensu-plugins-mailer for the mail notification. I have set below configuration for my check
"interval": 60,
"refresh": 43200,
"timeout": 30,
"handlers": ["ose-email"],
my handler configuration is like below
"handlers": {
"ose-email": {
"type": "pipe",
"filters": ["state_change_only"],
filter configurations is like below
"filters": {
"state_change_only": {
"negate": false,
"attributes": {
"occurrences": "eval: value == 1 || ':::action:::' == 'resolve'"
}
}
}

I am receiving alert as ["warning: event filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin\nwarning: occurrence filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin\nmail -- sent alert for $hostname/$check-name to $mail-id

I have set half day refresh time (12 hours) but I am receiving the alert before that time
what to do for this?

Password ommited oddities

I have a check with a command of something like foo -password foobar -other stuff, however the alert emails show up as Command: foo -p <password omitted> foobar -other stuff which is not a very useful omission.

Mailer breaks when you specify an ERB template

My email template was working until recently when I upgraded my plugins to the latest versions:

mail (2.7.0, 2.6.3)
mailgun-ruby (1.1.8, 1.0.3)
sensu-plugins-mailer (2.0.0)

Now if I try to specify an ERB file I see these errors in the log and get no mail:

cat /etc/sensu/conf.d/handlers/mailer.json | /opt/sensu/embedded/bin/handler-mailer.rb
warning: event filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin
/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-1.4.5/lib/sensu-handler.rb:202:in +': no implicit conversion of nil into String (TypeError) from /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-1.4.5/lib/sensu-handler.rb:202:in filter_silenced'
from /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-1.4.5/lib/sensu-handler.rb:36:in filter' from /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-1.4.5/lib/sensu-handler.rb:98:in block in class:Handler'

Just upgraded to latest version of mailer and am now getting an error while running

Running on CentOS 7.1
Sensu v0.22.1

I was use a previous version of mailer on my sensu server without issue. I just upgraded to the latest version on Github and am now running into an issue which has something to do with the erubis gem.

I see the following error anytime sensu tries to send an email using the latest mailer handler:

"/usr/local/share/gems/gems/mixlib-cli-1.5.0/lib/mixlib/cli.rb:191:in `parse_options': invalid option: --json_config (OptionParser::InvalidOption)
from /usr/local/share/gems/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:16:in `initialize'
from /usr/local/share/gems/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:52:in `new'
from /usr/local/share/gems/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:52:in `block in <class:Handler>'
/usr/share/gems/gems/abrt-0.0.6/lib/abrt/handler.rb:63:in `initialize': No such file or directory - \"/var/run/abrt/abrt.socket\" (Errno::ENOENT)
from /usr/share/gems/gems/abrt-0.0.6/lib/abrt/handler.rb:63:in `new'\n\tfrom /usr/share/gems/gems/abrt-0.0.6/lib/abrt/handler.rb:63:in `abrt_socket'
from /usr/share/gems/gems/abrt-0.0.6/lib/abrt/handler.rb:22:in `report'\n\tfrom /usr/share/gems/gems/abrt-0.0.6/lib/abrt/handler.rb:41:in `write_dump'
from /usr/share/gems/gems/abrt-0.0.6/lib/abrt/handler.rb:13:in `handle_exception'
from /usr/share/gems/gems/abrt-0.0.6/lib/abrt.rb:7:in `block in <top (required)>'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- erubis (LoadError)
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /etc/sensu/handlers/mailer.rb:20:in `<main>'"

Like I said, this was working fine on a previous version. But for the curious, this is how the handler is getting called:

"command": "/usr/local/bin/handler-mailer.rb --json_config jbehrends",

So to try and track down what was causing the issue, I tried commenting out all references to the "erubis" gem, and once I did that the handler actually ran. Although it no longer did anything, it at least ran.

These are the gems I have installed on my system:

$ gem list

*** LOCAL GEMS ***

abrt (0.1.1, 0.0.6)
activesupport (4.2.3)
aws (2.10.2)
bigdecimal (1.2.0)
chronic (0.10.2)
domain_name (0.5.20160310)
erubis (2.7.0)
hipchat (0.13.0)
http-cookie (1.0.2)
http_connection (1.4.4)
httparty (0.11.0)
i18n (0.7.0)
io-console (0.4.2)
jira-ruby (0.1.16)
json (1.8.3, 1.7.7)
mail (2.6.3)
mailgun-ruby (1.0.3)
mime-types (2.6.1)
minitest (5.8.2)
mixlib-cli (1.5.0)
multi_json (1.11.2)
multi_xml (0.5.5)
netrc (0.11.0)
oauth (0.4.7)
psych (2.0.0)
rdoc (4.0.0)
redis (3.2.1)
redphone (0.0.63)
rest-client (1.8.0)
ruby-puppetdb (1.5.0)
sensu-plugin (1.2.0)
sensu-plugins-mailer (0.2.0)
thread_safe (0.3.5)
tzinfo (1.2.2)
unf (0.1.4)
unf_ext (0.0.7.2)
uuidtools (2.1.5)
xml-simple (1.1.5)

So at this point I'm stumped and looking for any help.

warning: event filtering in sensu-plugin is deprecated

Using sensu v.0.26.5 and sensu-plugins-mailer v.1.0.0. My mailer config is located in /etc/sensu/config.json (sensitive info changed):

{
  "handlers": {
  ...
    "mail": {
      "type": "pipe",
      "command": "handler-mailer.rb -j mail"
    },
  ...
  "mail": {
    "admin_gui": "http://127.0.0.1:3000/",
    "mail_from": "[email protected]",
    "mail_to": "[email protected]",
    "smtp_address": "localhost",
    "smtp_port": "25",
    "smtp_domain": "mydomain.com"
  }
}

I'm receiving emails, but the logs are getting flooded with the following:

sensu-server.log:

{"timestamp":"2016-11-02T15:21:55.183214+0000","level":"info","message":"handler output","handler":{"type":"pipe","command":"handler-mailer.rb -j mail","name":"mail"},"output":["warning: event filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin\nwarning: occurrence filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin\nonly handling every 60 occurrences: bw-sensu-server_i-d1954ae1/test-mail-handler\n"]}

sensu-client.log:

{"timestamp":"2016-11-02T15:21:54.677492+0000","level":"info","message":"publishing check result","payload":{"client":"bw-sensu-server_i-d1954ae1","check":{"type":"metric","command":"return 2","handlers":["mail"],"standalone":true,"interval":30,"name":"test-mail-handler","issued":1478100114,"executed":1478100114,"duration":0.001,"output":"","status":2}}}

The workaround is to add "enable_deprecated_filtering": false to the check that uses the handler. In a small sensu implementation, this is inconvenient. In a large implementation w/lots of distributed hosts not under your control, and dozens of checks per host, this is a significant burden.

Is there a timeframe for a fix?

email without new lines

How can i fix it:
Admin GUI: http://sensu.atmo.budapest/ Host: sensu-server Timestamp: 2016-02-18 00:15:16 +0300 Address: localhost Check Name: crond_process Command: /opt/sensu/embedded/bin/ruby /etc/sensu/plugins/check-procs.rb -p -C 2 Status: CRITICAL Occurrences: 108

Whole message in one line.

Multipart email template

Current code does not allow to send multipart email (typically html/plain text) because it would require a configuration switch for template or reading some headers from the template itself.

Please consider implementing something to support this.

Email going to wrong addresses

Noticed that email started going to wrong subscriber which was a result of the addition here https://github.com/sensu-plugins/sensu-plugins-mailer/blob/master/bin/handler-mailer.rb#L121-L128.

Now email goes to event and client mail_to which is not an expected behaviour e.g

I have client with

{
  "client": {
    "name": "mon01",
    "address": "1.2.3.4",
    "subscriptions": [
      "graphite","all"
    ]
}

check json

{
  "mailer": {
    "mail_to": "[email protected]",
    "smtp_address": "127.0.0.1",
    "smtp_port": "25",
    "subscriptions": {
      "graphite": {
        "mail_to": "[email protected]"
      }
    }
  }
}

with a check of

"memory": {
      "command": "check-ram.rb",
      "subscribers": [ "all" ],
      "interval": 120,
      "handlers": [ "default", "mailer" ]
    },

Email now goes to both [email protected] and [email protected] which is wrong because email was supposed to go to only email1 and not both of them

Object#timeout is deprecated, use Timeout.timeout

{"timestamp":"2016-04-14T08:41:34.612166+0200","level":"info","message":"handler output","handler":{"type":"pipe","command":"handler-mailer.rb","json_config":"mailer.json","name":"mailer"},"output":["/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:134:in block in filter_silenced': Object#timeout is deprecated, use Timeout.timeout instead.\n/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:134:inblock in filter_silenced': Object#timeout is deprecated, use Timeout.timeout instead.\n/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:134:in block in filter_silenced': Object#timeout is deprecated, use Timeout.timeout instead.\n/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-0.2.0/bin/handler-mailer.rb:215:inhandle': Object#timeout is deprecated, use Timeout.timeout instead.\nmail -- timed out while attempting to create an incident -- nemec.eu/mem-percent\n"]}

`build_body': undefined method `[]' for nil:NilClass

Using sensu version 0.25.6 and sensu-plugins-mailer version 1.0.0. My mailer config is located in /etc/sensu/conf.d and reads as follows (sensitive information changed):

{
    "rubymailer": {
      "admin_gui": "http://127.0.0.1:3001/",
      "mail_from": "[email protected]",
      "mail_to": "[email protected]",
      "smtp_address": "127.0.0.1",
      "smtp_port": "25",
      "smtp_domain": "mydomain.com",
      "delivery_method": "smtp"
    },
    "handlers": {
      "rubymailer": {
        "type": "pipe",
        "command": "/opt/sensu/embedded/bin/ruby /opt/sensu/embedded/bin/handler-mailer.rb"
      }
    }
}

I don't receive any emails, but I do see this in the logs:

{"timestamp":"2016-08-01T09:10:07.567878-0500","level":"info","message":"handler output","handler":{"type":"pipe","command":"/opt/sensu/embedded/bin/ruby /opt/sensu/embedded/bin/handler-mailer.rb","name":"rubymailer"},"output":["/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-1.0.0/bin/handler-mailer.rb:141:in build_body': undefined method[]' for nil:NilClass (NoMethodError)\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-1.0.0/bin/handler-mailer.rb:169:in handle'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.4.0/lib/sensu-handler.rb:81:inblock in class:Handler'\nwarning: event filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin\nwarning: occurrence filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin\n"]}

client alerts silenced for sensu mailer handler

I have recently been working with Sensu, specifically the sensu-plugins-mailer
https://github.com/sensu-plugins/sensu-plugins-mailer
i have a question about the handler-mailer.rb integration.

i installed it as such
(DEV) dsensu0 handlers # cat mailer_handler.json
{
"handlers": {
"mailer": {
"mail_from": "[email protected]",
"mail_to": "[email protected]",
"smtp_address": "mail.dev.hq.meetup.com",
"smtp_port": "25",
"smtp_domain": "dev.hq.meetup.com",
"type": "pipe",
"command": "/usr/local/sensu-server/etc/sensu/handlers/handler-mailer.rb",
"subscriptions": {
"sensu_server": {
"mail_to": "[email protected]"
}
}
}
}
}

and i have these check definitions

(DEV) dsensu0 check_definitions # cat check_sensu_server.json
{
"checks": {
"ghe_primary_freespace_on_datadisk_stats_check": {
"type": "metric",
"command": "/usr/local/sensu-client/etc/sensu/plugins/graphite/check-data.rb --server sensu.int.meetup.com:80 -t collectd192_168_0_31collectd.df-data-user.df_complex-free --below --warn 50252338619 --crit 50252338619 --from -1mins",
"interval": 10,
"subscribers": ["sensu_server"],
"handlers": ["mailer"],
"occurences": 1,
"refresh": 1
},
"ghe_primary_cpu_percent_sysusage_stats_check": {
"type": "metric",
"command": "/usr/local/sensu-client/etc/sensu/plugins/graphite/check-data.rb --server sensu.int.meetup.com:80 -t collectd192_168_0_31collectd.cpu.percent-system --warn 90.0 --crit 95.0 --from -5mins",
"interval": 10,
"subscribers": ["sensu_server"],
"handlers": ["mailer"]
"occurences": 1,
"refresh": 1
}
}
}

But then i get these errors(client alerts silenced) in the logs - although one of the checks is returning CRITICAL - hence i am not getting any emails; not sure what i am missing here. What does this error mean and how could i get around that?

{"timestamp":"2016-06-28T16:18:56.838459-0400","level":"info","message":"handler output","handler":{"mail_from":"[email protected]","mail_to":"[email protected]","smtp_address":"mail.dev.hq.meetup.com","smtp_port":"25","smtp_domain":"dev.hq.meetup.com","type":"pipe","command":"/usr/local/sensu-server/etc/sensu/handlers/handler-mailer.rb","subscriptions":{"sensu_server":{"mail_to":"[email protected]"}},"name":"mailer"},"output":["client alerts silenced: dsensu0/ghe_primary_cpu_percent_sysusage_stats_check\n"]}

{"timestamp":"2016-06-28T16:25:29.603794-0400","level":"info","message":"handler output","handler":{"mail_from":"[email protected]","mail_to":"[email protected]","smtp_address":"mail.dev.hq.meetup.com","smtp_port":"25","smtp_domain":"dev.hq.meetup.com","type":"pipe","command":"/usr/local/sensu-server/etc/sensu/handlers/handler-mailer.rb","subscriptions":{"sensu_server":{"mail_to":"[email protected]"}},"name":"mailer"},"output":["client alerts silenced: dsensu0/ghe_primary_freespace_on_datadisk_stats_check\n"]}

i looked at the api and noticed that no clients or checks were silenced

(DEV) dsensu0 ~ # sensu-cli stash list
no values for this request
0 total items
(DEV) dsensu0 ~ #

I also used the API to silence this node/client then unsilenced but still the errors persist. I wonder if there is something else overriding the silencing mechanism....? Any help would be greatly appreciated. Thanks.

Where to place configuration?

I'm having trouble working out where to put the configuration. So far I've tried putting a mailer.json with a "mailer-mailgun" section in /etc/sensu/, /etc/sensu/conf.d and also placing the "mailer-mailgun" section directly into the handler definition like so:

{ "handlers": { "mailer-mailgun": { "type": "pipe", "command": "/etc/sensu/plugins/sensu-plugins-mailer/bin/handler-mailer-mailgun.rb" } }, "mailer-mailgun": { "mail_from": "[email protected]", "mail_to": "[email protected]", "mg_apikey": "bla", "mg_domain": "mg.bla.com", "subscriptions": { "blabla": { "mail_to": "[email protected]" } } }

I keep receiving the following error:

{"timestamp":"2016-03-03T05:50:14.375408-0500","level":"info","message":"handler output","handler":{"type":"pipe","command":"/etc/sensu/plugins/sensu-plugins-mailer/bin/handler-mailer-mailgun.rb","name":"mailer-mailgun"},"output":["/etc/sensu/plugins/sensu-plugins-mailer/bin/handler-mailer-mailgun.rb:46:in handle': undefined method[]' for nil:NilClass (NoMethodError)\n","\tfrom /var/lib/gems/1.9.1/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:55:in `block in class:Handler'\n"]}

Which makes me think it can't find the configuration. Where does it need to be placed so that the plugin can find it?

Code explanation

Am sorry, but I have failed to wrap my mind around this piece of code. Am a ruby newbie.

option :json_config,
       description: 'Config Name',
       short: '-j JsonConfig',
       long: '--json_config JsonConfig',
       required: false,
       default: 'mailer-mailgun'

def json_config
  @json_config ||= config[:json_config]
end

I don't understand the first part. Is this a dictionary or a hash? and then what does this @json_config ||= config[:json_config] do? I know it has something to do with getting the mailgun json configurations from the .json file. But where is the config hash coming from?

I am using this handler to send emails for events, but am also trying to learn the code so as to write my own custom handler based on this example. Thanks.

handler-mailer-mailgun Gem dependency error

Hello,
If I use handler-mailer then everything works fine,

{"timestamp":"2015-12-30T21:33:20.861799+0100","level":"info","message":"handler output","handler":{"type":"pipe","command":"ruby /opt/sensu/embedded/bin/handler-mailer.rb","name":"default"},"output":["only handling every 180 occurrences: nanoweb.be/disk\n"]}
{"timestamp":"2015-12-30T21:33:23.124780+0100","level":"info","message":"handler output","handler":{"type":"pipe","command":"ruby /opt/sensu/embedded/bin/handler-mailer.rb","name":"default"},"output":["mail -- sent alert for mona.nanocloud.be/disk to [email protected]\n"]}
{"timestamp":"2015-12-30T21:33:29.288313+0100","level":"info","message":"publishing check request","payload":{"name":"disk","issued":1451507609,"command":"exit 2"},"subscribers":["test"]}

but when i switch to handler-mailer-mailgun I get following error:

{"timestamp":"2015-12-30T18:33:20.018312+0100","level":"info","message":"handler output","handler":{"type":"pipe","command":"/opt/sensu/embedded/bin/handler-mailer-mailgun.rb","name":"default"},"output":["/opt/sensu/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- mailgun-ruby (LoadError)\n\tfrom /opt/sensu/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:inrequire'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.2.0/gems/sensu-plugins-mailer-0.1.1/bin/handler-mailer-mailgun.rb:32:in <top (required)>'\n\tfrom /opt/sensu/embedded/bin/handler-mailer-mailgun.rb:23:inload'\n\tfrom /opt/sensu/embedded/bin/handler-mailer-mailgun.rb:23:in `

'\nonly handling every 180 occurrences: nanoweb.be/disk\n"]}

Custom attributes in email?

Hi, It does not seem like any other attributes other than host, timestamp, address, check-name, status, output and occurences are sent with the email. I would be great if all other attributes of the check also would be emailed. I would suggest that all other attributes that are not any of the above mentioned are still included, maybe at the at bottom of the email.

My suggestion is to list all attributes of the check bellow the most important ones (those that are already in the email)

New issues comes yesterday for handler-mailer.rb

I'm building the sensu go email handler, with the ruby 2.3.1, sensu-plugin(3.0.0) and sensu-plugins-mailer(3.0.0).

this handler-mailer.rb script working the day before yesterday, and without any change when yesterday I login to the server and trying the same command (event.json is an event in sensu go schema), it returns the error:

$ cat event.json | /usr/local/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-3.0.0/bin/handler-mailer.rb -j mailer -c html -s '[Sensu]' --map-go-event-into-ruby

/usr/local/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-3.0.0/bin/handler-mailer.rb:213:in `build_body': undefined method `[]' for nil:NilClass (NoMethodError)
	from /usr/local/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-3.0.0/bin/handler-mailer.rb:240:in `handle'
	from /usr/local/lib/ruby/gems/2.3.0/gems/sensu-plugin-3.0.0/lib/sensu-handler.rb:89:in `block in <class:Handler>'

admin_gui = json_config_settings['admin_gui'] || 'http://localhost:8080/'

I've checked with couple files:
The mailer config json file exists here defining the smtp_domain and mail_from, mail_to, admin_gui. etc: /etc/sensu/conf.d/sensu-plugins-mailer.json
{
"mailer": {
"smtp_domain": "xxx.com",
"mail_from": "[email protected]",
"mail_to": "[email protected]",
"admin_gui": "http://sensu.xxx.com:3000",
"template": “/etc/sensu/plugins/mail-template.erb",
"smtp_address": "xxxx",
"smtp_port": 2525
}
}

mail templates exists here: /etc/sensu/plugins/mail-template.erb

Does anyone meet with this issue? What changes make this issue happen suddenly and how can I solve it

Errors when run again Sensu 0.24.1

I'm getting a lot of errors logged that look like this:

/bin/handler-mailer.rb:141:in `build_body': undefined method `[]' for nil:NilClass (NoMethodError)
    from sensu-plugins-mailer-0.3.1/bin/handler-mailer.rb:169:in `handle'
    from sensu-handler.rb:55:in `block in <class:Handler>'

and also

sensu-handler.rb:134:in `block in filter_silenced': Object#timeout is deprecated, use Timeout.timeout instead.

Use SMTP authentication with mailer?

HI,

I'd like to know if it's possible (and if not, request that feature) to implement SMTP authentication when sending email with mailer.

Currently, we use Google Apps and unfortunately, when using unauthenticated SMTP, we can only send to gmail and google apps users and not groups.

Ideally it'd be something along the lines of:

{
  "mailer": {
    "mail_from": "[email protected]",
    "mail_to": "[email protected]",
    "smtp_address": "smtp.example.org",
    "smtp_password":"superstrongpassword",
    "smtp_port": "465",
    "smtp_domain": "example.org",
    "template": "/optional/path/to/template.erb",
    "subscriptions": {
      "subscription_name": {
        "mail_to": "[email protected]"
      }
    }
  }
}

`require': cannot load such file -- mail

here is the server log file

"version":"0.26.5","timestamp":1515181908},"check":{"command":"/etc/sensu/plugins/sensu-plugins-memory-checks-master/bin/check-memory-percent.rb","handler":"mailer","contact":"support","subscribers":["Infrastructure"],"interval":5,"name":"check-memory-percent","issued":1515181910,"executed":1515181910,"duration":0.082,"output":"MEM CRITICAL - system memory usage: 96%\n","status":2,"type":"standard","history":["2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2"],"total_state_change":0},"occurrences":259317,"occurrences_watermark":259317,"action":"create","timestamp":1515181910,"id":"9ea995ea-aa4c-44c2-af66-bb43b4f4dac6","last_state_change":1513884914,"last_ok":1513884914,"silenced":false,"silenced_by":[]}} {"timestamp":"2018-01-05T14:51:50.901343-0500","level":"error","message":"handler output","handler":{"type":"pipe","command":"/etc/sensu/plugins/sensu-plugins-mailer-master/bin/handler-mailer.rb","name":"mailer"},"event":{"id":"9ea995ea-aa4c-44c2-af66-bb43b4f4dac6"},"output":["/opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- mail (LoadError)\n\tfrom /opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require'\n\tfrom /etc/sensu/plugins/sensu-plugins-mailer-master/bin/handler-mailer.rb:18:in

'\nignoring event -- no handler defined\n"]}`

mailer-ses: handle': undefined method `[]' for nil:NilClass (NoMethodError)

When I resolve an event through Uchiwa, I get the following error from the SES mailer:

/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-1.0.0/bin/handler-mailer-ses.rb:29:in `handle': undefined method `[]' for nil:NilClass (NoMethodError)
    from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.3.0/lib/sensu-handler.rb:57:in `block in <class:Handler>'

I'm running sensu 0.25.3-1 and uchiwa 0.14.2-1.

Error when sendig via SES undefined local variable or method `params'

/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-0.3.0/bin/handler-mailer-ses.rb:28:in `prefix_subject': undefined local variable or method `params' for #<Mailer:0x0000000278bbb0> (NameError)
from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-0.3.0/bin/handler-mailer-ses.rb:55:in `handle'
from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:55:in `block in <class:Handler>'"

UTF-8 handling error.

I have a chinese windows server which send error message in chinese by the OS.

input:
'check_winping' 不是内部或外部指令,也不是可运行的程序或批处理文件

error on handle:
{ handle: { "type": "pipe", "command": "handler-mailer.rb", "name": "email_handler" }, "output": ["/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-0.3.1/bin/handler-mailer.rb:143:in gsub': invalid byte sequence in UTF-8 (ArgumentError)\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-0.3.1/bin/handler-mailer.rb:143:in build_body'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-0.3.1/bin/handler-mailer.rb:169:in handle'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.3.0/lib/sensu-handler.rb:57:in block in <class:Handler>'\n"] }

Error sensu-handler.rb

Get the next error:

cat /etc/sensu/conf.d/mailer.json | /opt/sensu/embedded/bin/ruby /etc/sensu/handlers/handler-mailer.rb

/opt/sensu/embedded/lib/ruby/gems/2.2.0/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:128:in +': no implicit conversion of nil into String (TypeError) from /opt/sensu/embedded/lib/ruby/gems/2.2.0/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:128:infilter_silenced'
from /opt/sensu/embedded/lib/ruby/gems/2.2.0/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:31:in filter' from /opt/sensu/embedded/lib/ruby/gems/2.2.0/gems/sensu-plugin-1.2.0/lib/sensu-handler.rb:54:inblock in class:Handler'

Can you help?

Thanks!

subscriptions do not seem to work

type":"pipe","command":"handler-mailer.rb","name":"mailer"},"output":["mail -- sent alert only sends to the mail_to but not to the mail_to that resides in the subscriptions part

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.