notification-settings.asciidoc 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. [role="xpack"]
  2. [[notification-settings]]
  3. === {watcher} Settings in Elasticsearch
  4. ++++
  5. <titleabbrev>{watcher} Settings</titleabbrev>
  6. ++++
  7. You configure {watcher} settings to set up {watcher} and send notifications via
  8. <<email-notification-settings,email>>,
  9. <<hipchat-notification-settings,HipChat>>,
  10. <<slack-notification-settings,Slack>>, and
  11. <<pagerduty-notification-settings, PagerDuty>>.
  12. All of these settings can be added to the `elasticsearch.yml` configuration file,
  13. with the exception of the secure settings, which you add to the {es} keystore.
  14. For more information about creating and updating the {es} keystore, see
  15. <<secure-settings>>. Dynamic settings can also be updated across a cluster with the
  16. <<cluster-update-settings,cluster update settings API>>.
  17. [float]
  18. [[general-notification-settings]]
  19. ==== General Watcher Settings
  20. `xpack.watcher.enabled`::
  21. Set to `false` to disable {watcher} on the node.
  22. `xpack.watcher.encrypt_sensitive_data`::
  23. Set to `true` to encrypt sensitive data. If this setting is enabled, you
  24. must also specify the `xpack.watcher.encryption_key` setting. For more
  25. information, see
  26. {xpack-ref}/encrypting-data.html[Encrypting sensitive data in {watcher}].
  27. `xpack.watcher.encryption_key` (<<secure-settings,Secure>>)::
  28. Specifies the path to a file that contains a key for encrypting sensitive data.
  29. If `xpack.watcher.encrypt_sensitive_data` is set to `true`, this setting is
  30. required. For more information, see
  31. {xpack-ref}/encrypting-data.html[Encrypting sensitive data in {watcher}].
  32. `xpack.watcher.history.cleaner_service.enabled`::
  33. added[6.3.0,Default changed to `true`.]
  34. deprecated[7.0.0,Watcher history indices are now managed by the `watch-history-ilm-policy` ILM policy]
  35. +
  36. Set to `true` (default) to enable the cleaner service. If this setting is
  37. `true`, the `xpack.monitoring.enabled` setting must also be set to `true` with
  38. a local exporter enabled. The cleaner service removes previous versions of
  39. {watcher} indices (for example, `.watcher-history*`) when it determines that
  40. they are old. The duration of {watcher} indices is determined by the
  41. `xpack.monitoring.history.duration` setting, which defaults to 7 days. For
  42. more information about that setting, see <<monitoring-settings>>.
  43. `xpack.http.proxy.host`::
  44. Specifies the address of the proxy server to use to connect to HTTP services.
  45. `xpack.http.proxy.port`::
  46. Specifies the port number to use to connect to the proxy server.
  47. `xpack.http.default_connection_timeout`::
  48. The maximum period to wait until abortion of the request, when a
  49. connection is being initiated.
  50. `xpack.http.default_read_timeout`::
  51. The maximum period of inactivity between two data packets, before the
  52. request is aborted.
  53. `xpack.http.max_response_size`::
  54. Specifies the maximum size an HTTP response is allowed to have, defaults to
  55. `10mb`, the maximum configurable value is `50mb`.
  56. `xpack.http.whitelist`::
  57. A list of URLs, that the internal HTTP client is allowed to connect to. This
  58. client is used in the HTTP input, the webhook, the slack, pagerduty, hipchat
  59. and jira actions. This setting can be updated dynamically. It defaults to `*`
  60. allowing everything. Note: If you configure this setting and you are using one
  61. of the slack/pagerduty/hipchat actions, you have to ensure that the
  62. corresponding endpoints are whitelisted as well.
  63. [[ssl-notification-settings]]
  64. :ssl-prefix: xpack.http
  65. :component: {watcher}
  66. :verifies:
  67. :server!:
  68. include::ssl-settings.asciidoc[]
  69. [float]
  70. [[email-notification-settings]]
  71. ==== Email Notification Settings
  72. You can configure the following email notification settings in
  73. `elasticsearch.yml`. For more information about sending notifications
  74. via email, see {xpack-ref}/actions-email.html#configuring-email-actions[Configuring Email].
  75. `xpack.notification.email.account`::
  76. Specifies account information for sending notifications via email. You
  77. can specify the following email account attributes:
  78. [[email-account-attributes]]
  79. `profile` (<<cluster-update-settings,Dynamic>>);;
  80. The {xpack-ref}/actions-email.html#configuring-email[email profile] to use to build the MIME
  81. messages that are sent from the account. Valid values: `standard`, `gmail` and
  82. `outlook`. Defaults to `standard`.
  83. `email_defaults.*` (<<cluster-update-settings,Dynamic>>);;
  84. An optional set of email attributes to use as defaults
  85. for the emails sent from the account. See {xpack-ref}/actions-email.html#email-action-attributes[
  86. Email Action Attributes] for the supported attributes.
  87. `smtp.auth` (<<cluster-update-settings,Dynamic>>);;
  88. Set to `true` to attempt to authenticate the user using the
  89. AUTH command. Defaults to `false`.
  90. `smtp.host` (<<cluster-update-settings,Dynamic>>);;
  91. The SMTP server to connect to. Required.
  92. `smtp.port` (<<cluster-update-settings,Dynamic>>);;
  93. The SMTP server port to connect to. Defaults to 25.
  94. `smtp.user` (<<cluster-update-settings,Dynamic>>);;
  95. The user name for SMTP. Required.
  96. `smtp.secure_password` (<<secure-settings,Secure>>);;
  97. The password for the specified SMTP user.
  98. `smtp.starttls.enable` (<<cluster-update-settings,Dynamic>>);;
  99. Set to `true` to enable the use of the `STARTTLS`
  100. command (if supported by the server) to switch the connection to a
  101. TLS-protected connection before issuing any login commands. Note that
  102. an appropriate trust store must configured so that the client will
  103. trust the server's certificate. Defaults to `false`.
  104. `smtp.starttls.required` (<<cluster-update-settings,Dynamic>>);;
  105. If `true`, then `STARTTLS` will be required. If that command fails, the
  106. connection will fail. Defaults to `false`.
  107. `smtp.ssl.trust` (<<cluster-update-settings,Dynamic>>);;
  108. A list of SMTP server hosts that are assumed trusted and for which
  109. certificate verification is disabled. If set to "*", all hosts are
  110. trusted. If set to a whitespace separated list of hosts, those hosts
  111. are trusted. Otherwise, trust depends on the certificate the server
  112. presents.
  113. `smtp.timeout` (<<cluster-update-settings,Dynamic>>);;
  114. The socket read timeout. Default is two minutes.
  115. `smtp.connection_timeout` (<<cluster-update-settings,Dynamic>>);;
  116. The socket connection timeout. Default is two minutes.
  117. `smtp.write_timeout` (<<cluster-update-settings,Dynamic>>);;
  118. The socket write timeout. Default is two minutes.
  119. `smtp.local_address` (<<cluster-update-settings,Dynamic>>);;
  120. A configurable local address when sending emails. Not configured by default.
  121. `smtp.local_port` (<<cluster-update-settings,Dynamic>>);;
  122. A configurable local port when sending emails. Not configured by default.
  123. `smtp.send_partial` (<<cluster-update-settings,Dynamic>>);;
  124. Send an email, despite one of the receiver addresses being invalid.
  125. `smtp.wait_on_quit` (<<cluster-update-settings,Dynamic>>);;
  126. If set to false the QUIT command is sent and the connection closed. If set to
  127. true, the QUIT command is sent and a reply is waited for. True by default.
  128. `xpack.notification.email.html.sanitization.allow`::
  129. Specifies the HTML elements that are allowed in email notifications. For
  130. more information, see {xpack-ref}/actions-email.html#email-html-sanitization[Configuring HTML
  131. Sanitization Options]. You can specify individual HTML elements
  132. and the following HTML feature groups:
  133. [[html-feature-groups]]
  134. `_tables`;;
  135. All table related elements: `<table>`, `<th>`, `<tr>`
  136. and `<td>`.
  137. `_blocks`;;
  138. The following block elements: `<p>`, `<div>`, `<h1>`,
  139. `<h2>`, `<h3>`, `<h4>`, `<h5>`, `<h6>`, `<ul>`, `<ol>`,
  140. `<li>`, and `<blockquote>`.
  141. `_formatting`;;
  142. The following inline formatting elements: `<b>`, `<i>`,
  143. `<s>`, `<u>`, `<o>`, `<sup>`, `<sub>`, `<ins>`, `<del>`,
  144. `<strong>`, `<strike>`, `<tt>`, `<code>`, `<big>`,
  145. `<small>`, `<br>`, `<span>`, and `<em>`.
  146. `_links`;;
  147. The `<a>` element with an `href` attribute that points
  148. to a URL using the following protocols: `http`, `https`
  149. and `mailto`.
  150. `_styles`;;
  151. The `style` attribute on all elements. Note that CSS
  152. attributes are also sanitized to prevent XSS attacks.
  153. `img`;;
  154. `img:all`;;
  155. All images (external and embedded).
  156. `img:embedded`;;
  157. Only embedded images. Embedded images can only use the
  158. `cid:` URL protocol in their `src` attribute.
  159. `xpack.notification.email.html.sanitization.disallow`::
  160. Specifies the HTML elements that are NOT allowed in email notifications.
  161. You can specify individual HTML elements and <<html-feature-groups,
  162. HTML feature groups>>.
  163. `xpack.notification.email.html.sanitization.enabled` ::
  164. Set to `false` to completely disable HTML sanitation. Not recommended.
  165. Defaults to `true`.
  166. [float]
  167. [[hipchat-notification-settings]]
  168. ==== HipChat Notification Settings
  169. You can configure the following HipChat notification settings in
  170. `elasticsearch.yml`. For more information about sending notifications
  171. via HipChat, see {xpack-ref}/actions-hipchat.html#configuring-hipchat-actions[Configuring HipChat].
  172. `xpack.notification.hipchat` ::
  173. Specifies account information for sending notifications
  174. via HipChat. You can specify the following HipChat account attributes:
  175. [[hipchat-account-attributes]]
  176. `profile`;;
  177. The HipChat account profile to use: `integration`,
  178. `user`, or `v1`. Required.
  179. `secure_auth_token` (<<secure-settings,Secure>>);;
  180. The authentication token to use to access the HipChat API. Required.
  181. `host`;;
  182. The HipChat server hostname. Defaults to `api.hipchat.com`.
  183. `port`;;
  184. The HipChat server port number. Defaults to 443.
  185. `room`;;
  186. The room you want to send messages to. Must be specified
  187. if the `profile` is set to `integration`. Not valid for
  188. the `user` or `vi` profiles.
  189. `user`;;
  190. The HipChat user account to use to send messages.
  191. Specified as an email address. Must be specified if the
  192. `profile` is set to `user`. Not valid for the `integration`
  193. or `v1` profiles.
  194. `message.format`;;
  195. The format of the message: `text` or `html`.
  196. Defaults to `html`.
  197. `message.color`;;
  198. The background color of the notification in the room.
  199. Defaults to `yellow`.
  200. `message.notify`;;
  201. Indicates whether people in the room should be
  202. actively notified. Defaults to `false`.
  203. [float]
  204. [[slack-notification-settings]]
  205. ==== Slack Notification Settings
  206. You can configure the following Slack notification settings in
  207. `elasticsearch.yml`. For more information about sending notifications
  208. via Slack, see {xpack-ref}/actions-slack.html#configuring-slack-actions[Configuring Slack].
  209. `xpack.notification.slack` ::
  210. Specifies account information for sending notifications
  211. via Slack. You can specify the following Slack account attributes:
  212. [[slack-account-attributes]]
  213. `secure_url` (<<secure-settings,Secure>>);;
  214. The Incoming Webhook URL to use to post messages to Slack. Required.
  215. `message_defaults.from`;;
  216. The sender name to display in the
  217. Slack message. Defaults to the watch ID.
  218. `message_defaults.to`;;
  219. The default Slack channels or groups you
  220. want to send messages to.
  221. `message_defaults.icon`;;
  222. The icon to display in the Slack messages.
  223. Overrides the incoming webhook's configured
  224. icon. Accepts a public URL to an image.
  225. `message_defaults.text`;;
  226. The default message content.
  227. `message_defaults.attachment`;;
  228. Default message attachments. Slack message attachments
  229. enable you to create more richly-formatted messages.
  230. Specified as an array as defined in the
  231. https://api.slack.com/docs/attachments[
  232. Slack attachments documentation].
  233. [float]
  234. [[jira-notification-settings]]
  235. ==== Jira Notification Settings
  236. You can configure the following Jira notification settings in
  237. `elasticsearch.yml`. For more information about using notifications
  238. to create issues in Jira, see {xpack-ref}/actions-jira.html#configuring-jira-actions[Configuring Jira].
  239. `xpack.notification.jira` ::
  240. Specifies account information for using notifications to create
  241. issues in Jira. You can specify the following Jira account attributes:
  242. [[jira-account-attributes]]
  243. `secure_url` (<<secure-settings,Secure>>);;
  244. The URL of the Jira Software server. Required.
  245. `secure_user` (<<secure-settings,Secure>>);;
  246. The name of the user to connect to the Jira Software server. Required.
  247. `secure_password` (<<secure-settings,Secure>>);;
  248. The password of the user to connect to the Jira Software server. Required.
  249. `issue_defaults`;;
  250. Default fields values for the issue created in Jira. See
  251. {xpack-ref}/actions-jira.html#jira-action-attributes[Jira Action Attributes] for more information.
  252. Optional.
  253. [float]
  254. [[pagerduty-notification-settings]]
  255. ==== PagerDuty Notification Settings
  256. You can configure the following PagerDuty notification settings in
  257. `elasticsearch.yml`. For more information about sending notifications
  258. via PagerDuty, see {xpack-ref}/actions-pagerduty.html#configuring-pagerduty-actions[Configuring PagerDuty].
  259. [[pagerduty-account-attributes]]
  260. `xpack.notification.pagerduty`::
  261. Specifies account information for sending notifications
  262. via PagerDuty. You can specify the following PagerDuty account attributes:
  263. `name`;;
  264. A name for the PagerDuty account associated with the API key you
  265. are using to access PagerDuty. Required.
  266. `secure_service_api_key` (<<secure-settings,Secure>>);;
  267. The https://developer.pagerduty.com/documentation/rest/authentication[
  268. PagerDuty API key] to use to access PagerDuty. Required.
  269. `event_defaults`;;
  270. Default values for {xpack-ref}/actions-pagerduty.html#pagerduty-event-trigger-incident-attributes[
  271. PagerDuty event attributes]. Optional.
  272. `description`::
  273. A string that contains the default description for PagerDuty events.
  274. If no default is configured, each PagerDuty action must specify a
  275. `description`.
  276. `incident_key`::
  277. A string that contains the default incident key to use when sending
  278. PagerDuty events.
  279. `client`::
  280. A string that specifies the default monitoring client.
  281. `client_url`::
  282. The URL of the default monitoring client.
  283. `event_type`::
  284. The default event type. Valid values: `trigger`,`resolve`, `acknowledge`.
  285. `attach_payload`::
  286. Whether or not to provide the watch payload as context for
  287. the event by default. Valid values: `true`, `false`.