Email output plugin v4.0.4
editEmail output plugin v4.0.4
edit- Plugin version: v4.0.4
- Released on: 2017-06-23
- Changelog
For other versions, see the overview list.
To learn more about Logstash, see the Logstash Reference.
Getting help
editFor questions about the plugin, open a topic in the Discuss forums. For bugs or feature requests, open an issue in Github. For the list of Elastic supported plugins, please consult the Elastic Support Matrix.
Description
editSends email when an output is received. Alternatively, you may include or exclude the email output execution using conditionals.
Usage Example
editoutput { if "shouldmail" in [tags] { email { to => 'technical@logstash.net' from => 'monitor@logstash.net' subject => 'Alert - %{title}' body => "Tags: %{tags}\\n\\Content:\\n%{message}" domain => 'mail.logstash.net' port => 25 } } }
Send email when an output is received. Alternatively, you may include or exclude the email output execution using conditionals.
Email Output Configuration Options
editThis plugin supports the following configuration options plus the Common options described later.
Setting | Input type | Required |
---|---|---|
No |
||
No |
||
No |
||
No |
||
No |
||
No |
||
No |
||
No |
||
No |
||
No |
||
No |
||
No |
||
No |
||
No |
||
Yes |
||
No |
||
No |
||
No |
Also see Common options for a list of options supported by all output plugins.
address
edit- Value type is string
-
Default value is
"localhost"
The address used to connect to the mail server
attachments
edit- Value type is array
-
Default value is
[]
Attachments - specify the name(s) and location(s) of the files.
authentication
edit- Value type is string
- There is no default value for this setting.
Authentication method used when identifying with the server
cc
edit- Value type is string
- There is no default value for this setting.
The fully-qualified email address(es) to include as cc: address(es).
This field also accepts a comma-separated string of addresses, for example:
"me@host.com, you@host.com"
contenttype
edit- Value type is string
-
Default value is
"text/html; charset=UTF-8"
contenttype : for multipart messages, set the content-type and/or charset of the HTML part. NOTE: this may not be functional (KH)
from
edit- Value type is string
-
Default value is
"logstash.alert@nowhere.com"
The fully-qualified email address for the From: field in the email.
htmlbody
edit- Value type is string
-
Default value is
""
HTML Body for the email, which may contain HTML markup.
password
edit- Value type is string
- There is no default value for this setting.
Password to authenticate with the server
replyto
edit- Value type is string
- There is no default value for this setting.
The fully qualified email address for the Reply-To: field.
to
edit- This is a required setting.
- Value type is string
- There is no default value for this setting.
The fully-qualified email address to send the email to.
This field also accepts a comma-separated string of addresses, for example:
"me@host.com, you@host.com"
You can also use dynamic fields from the event with the %{fieldname}
syntax.
use_tls
edit- Value type is boolean
-
Default value is
false
Enables TLS when communicating with the server
Common options
editThese configuration options are supported by all output plugins:
codec
edit- Value type is codec
-
Default value is
"plain"
The codec used for output data. Output codecs are a convenient method for encoding your data before it leaves the output without needing a separate filter in your Logstash pipeline.
enable_metric
edit- Value type is boolean
-
Default value is
true
Disable or enable metric logging for this specific plugin instance. By default we record all the metrics we can, but you can disable metrics collection for a specific plugin.
id
edit- Value type is string
- There is no default value for this setting.
Add a unique ID
to the plugin configuration. If no ID is specified, Logstash will generate one.
It is strongly recommended to set this ID in your configuration. This is particularly useful
when you have two or more plugins of the same type. For example, if you have 2 email outputs.
Adding a named ID in this case will help in monitoring Logstash when using the monitoring APIs.
output { email { id => "my_plugin_id" } }