Skip to content

Commit

Permalink
Merge pull request #706 from nsano-rururu/alerts_and_email_docs_update
Browse files Browse the repository at this point in the history
Document updates for Alerts and email addresses etc
  • Loading branch information
jertel authored Feb 13, 2022
2 parents 883f58b + 3ad489c commit 81e8c80
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- Pytest 6.2.5 to 7.0.0 - [#696](https://github.com/jertel/elastalert2/pull/696) - @nsano-rururu
- python-dateutil version specification change - [#704](https://github.com/jertel/elastalert2/pull/704) - @nsano-rururu
- Update minimum versions for third-party dependencies in requirements.txt and setup.py - [#705](https://github.com/jertel/elastalert2/pull/705) - @nsano-rururu
- [Docs] Document updates for Alerts and email addresses etc - [#706](https://github.com/jertel/elastalert2/pull/706) - @nsano-rururu

# 2.3.0

Expand Down
12 changes: 12 additions & 0 deletions docs/source/elastalert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,18 @@ rule will no longer be run until either ElastAlert 2 restarts or the rule file h
only an uncaught exception will send a notification email. The from address, SMTP host, and reply-to header can be set
using ``from_addr``, ``smtp_host``, and ``email_reply_to`` options, respectively. By default, no emails will be sent.

single address example::

notify_email: "one@domain"

or

multiple address example::

notify_email:
- "one@domain"
- "two@domain"

``from_addr``: The address to use as the from header in email notifications.
This value will be used for email alerts as well, unless overwritten in the rule config. The default value
is "ElastAlert".
Expand Down
109 changes: 106 additions & 3 deletions docs/source/ruletypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1473,8 +1473,39 @@ or
.. code-block:: yaml
alert:
- email
- jira
- alerta
- alertmanager
- chatwork
- command
- datadog
- debug
- dingtalk
- discord
- email
- exotel
- gitter
- googlechat
- hivealerter
- jira
- linenotify
- mattermost
- ms_teams
- opsgenie
- pagerduty
- pagertree
- post
- post2
- rocketchat
- servicenow
- ses
- slack
- sns
- stomp
- telegram
- tencent_sms
- twilio
- victorops
- zabbix
Options for each alerter can either defined at the top level of the YAML file, or nested within the alert name, allowing for different settings
for multiple of the same alerter. For example, consider sending multiple emails, but with different 'To' and 'From' fields:
Expand Down Expand Up @@ -1762,6 +1793,18 @@ AWS SES requires one option:

``ses_email``: An address or list of addresses to sent the alert to.

single address example::

ses_email: "one@domain"

or

multiple address example::

ses_email:
- "one@domain"
- "two@domain"

``ses_from_addr``: This sets the From header in the email.

Optional:
Expand All @@ -1778,8 +1821,32 @@ Optional:

``ses_cc``: This adds the CC emails to the list of recipients. By default, this is left empty.

single address example::

ses_cc: "one@domain"

or

multiple address example::

ses_cc:
- "one@domain"
- "two@domain"

``ses_bcc``: This adds the BCC emails to the list of recipients but does not show up in the email message. By default, this is left empty.

single address example::

ses_bcc: "one@domain"

or

multiple address example::

ses_bcc:
- "one@domain"
- "two@domain"

Example When not using aws_profile usage::

alert:
Expand Down Expand Up @@ -2063,6 +2130,18 @@ This alert requires one additional option:

``email``: An address or list of addresses to sent the alert to.

single address example::

email: "one@domain"

or

multiple address example::

email:
- "one@domain"
- "two@domain"

Optional:

``email_from_field``: Use a field from the document that triggered the alert as the recipient. If the field cannot be found,
Expand Down Expand Up @@ -2100,8 +2179,32 @@ by the smtp server.

``cc``: This adds the CC emails to the list of recipients. By default, this is left empty.

single address example::

cc: "one@domain"

or

multiple address example::

cc:
- "one@domain"
- "two@domain"

``bcc``: This adds the BCC emails to the list of recipients but does not show up in the email message. By default, this is left empty.

single address example::

bcc: "one@domain"

or

multiple address example::

bcc:
- "one@domain"
- "two@domain"

``email_format``: If set to 'html', the email's MIME type will be set to HTML, and HTML content should correctly render. If you use this,
you need to put your own HTML into ``alert_text`` and use ``alert_text_type: alert_text_jinja`` Or ``alert_text_type: alert_text_only``.

Expand Down Expand Up @@ -2798,7 +2901,7 @@ The ServiceNow alerter will create a ne Incident in ServiceNow. The body of the

The alerter requires the following options:

``servicenow_rest_url``: The ServiceNow RestApi url, this will look like https://developer.servicenow.com/dev.do#!/reference/api/orlando/rest/c_TableAPI#r_TableAPI-POST
``servicenow_rest_url``: The ServiceNow RestApi url, this will look like `TableAPI <https://developer.servicenow.com/dev.do#!/reference/api/orlando/rest/c_TableAPI#r_TableAPI-POST>`_.

``username``: The ServiceNow Username to access the api.

Expand Down

0 comments on commit 81e8c80

Please sign in to comment.