notification-settings.asciidoc 13 KB

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