notification-settings.asciidoc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  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.ssl.trust`;;
  99. A list of SMTP server hosts that are assumed trusted and for which
  100. certificate verification is disabled. If set to "*", all hosts are
  101. trusted. If set to a whitespace separated list of hosts, those hosts
  102. are trusted. Otherwise, trust depends on the certificate the server
  103. presents.
  104. `smtp.timeout`;;
  105. The socket read timeout. Default is two minutes.
  106. `smtp.connection_timeout`;;
  107. The socket connection timeout. Default is two minutes.
  108. `smtp.write_timeout`;;
  109. The socket write timeout. Default is two minutes.
  110. `smtp.local_address`;;
  111. A configurable local address when sending emails. Not configured by default.
  112. `smtp.local_port`;;
  113. A configurable local port when sending emails. Not configured by default.
  114. `smtp.send_partial`;;
  115. Send an email, despite one of the receiver addresses being invalid.
  116. `smtp.wait_on_quit`;;
  117. If set to false the QUIT command is sent and the connection closed. If set to
  118. true, the QUIT command is sent and a reply is waited for. True by default.
  119. `xpack.notification.email.html.sanitization.allow`::
  120. Specifies the HTML elements that are allowed in email notifications. For
  121. more information, see {xpack-ref}/actions-email.html#email-html-sanitization[Configuring HTML
  122. Sanitization Options]. You can specify individual HTML elements
  123. and the following HTML feature groups:
  124. [[html-feature-groups]]
  125. `_tables`;;
  126. All table related elements: `<table>`, `<th>`, `<tr>`
  127. and `<td>`.
  128. `_blocks`;;
  129. The following block elements: `<p>`, `<div>`, `<h1>`,
  130. `<h2>`, `<h3>`, `<h4>`, `<h5>`, `<h6>`, `<ul>`, `<ol>`,
  131. `<li>`, and `<blockquote>`.
  132. `_formatting`;;
  133. The following inline formatting elements: `<b>`, `<i>`,
  134. `<s>`, `<u>`, `<o>`, `<sup>`, `<sub>`, `<ins>`, `<del>`,
  135. `<strong>`, `<strike>`, `<tt>`, `<code>`, `<big>`,
  136. `<small>`, `<br>`, `<span>`, and `<em>`.
  137. `_links`;;
  138. The `<a>` element with an `href` attribute that points
  139. to a URL using the following protocols: `http`, `https`
  140. and `mailto`.
  141. `_styles`;;
  142. The `style` attribute on all elements. Note that CSS
  143. attributes are also sanitized to prevent XSS attacks.
  144. `img`;;
  145. `img:all`;;
  146. All images (external and embedded).
  147. `img:embedded`;;
  148. Only embedded images. Embedded images can only use the
  149. `cid:` URL protocol in their `src` attribute.
  150. `xpack.notification.email.html.sanitization.disallow`::
  151. Specifies the HTML elements that are NOT allowed in email notifications.
  152. You can specify individual HTML elements and <<html-feature-groups,
  153. HTML feature groups>>.
  154. `xpack.notification.email.html.sanitization.enabled` ::
  155. Set to `false` to completely disable HTML sanitation. Not recommended.
  156. Defaults to `true`.
  157. [float]
  158. [[hipchat-notification-settings]]
  159. ==== HipChat Notification Settings
  160. You can configure the following HipChat notification settings in
  161. `elasticsearch.yml`. For more information about sending notifications
  162. via HipChat, see {xpack-ref}/actions-hipchat.html#configuring-hipchat-actions[Configuring HipChat].
  163. `xpack.notification.hipchat` ::
  164. Specifies account information for sending notifications
  165. via HipChat. You can specify the following HipChat account attributes:
  166. [[hipchat-account-attributes]]
  167. `profile`;;
  168. The HipChat account profile to use: `integration`,
  169. `user`, or `v1`. Required.
  170. `auth_token`;;
  171. The authentication token to use to access
  172. the HipChat API. Required.
  173. `host`;;
  174. The HipChat server hostname. Defaults to `api.hipchat.com`.
  175. `port`;;
  176. The HipChat server port number. Defaults to 443.
  177. `room`;;
  178. The room you want to send messages to. Must be specified
  179. if the `profile` is set to `integration`. Not valid for
  180. the `user` or `vi` profiles.
  181. `user`;;
  182. The HipChat user account to use to send messages.
  183. Specified as an email address. Must be specified if the
  184. `profile` is set to `user`. Not valid for the `integration`
  185. or `v1` profiles.
  186. `message.format`;;
  187. The format of the message: `text` or `html`.
  188. Defaults to `html`.
  189. `message.color`;;
  190. The background color of the notification in the room.
  191. Defaults to `yellow`.
  192. `message.notify`;;
  193. Indicates whether people in the room should be
  194. actively notified. Defaults to `false`.
  195. [float]
  196. [[slack-notification-settings]]
  197. ==== Slack Notification Settings
  198. You can configure the following Slack notification settings in
  199. `elasticsearch.yml`. For more information about sending notifications
  200. via Slack, see {xpack-ref}/actions-slack.html#configuring-slack-actions[Configuring Slack].
  201. `xpack.notification.slack` ::
  202. Specifies account information for sending notifications
  203. via Slack. You can specify the following Slack account attributes:
  204. [[slack-account-attributes]]
  205. `url`;;
  206. The Incoming Webhook URL to use to post
  207. messages to Slack. Required.
  208. `message_defaults.from`;;
  209. The sender name to display in the
  210. Slack message. Defaults to the watch ID.
  211. `message_defaults.to`;;
  212. The default Slack channels or groups you
  213. want to send messages to.
  214. `message_defaults.icon`;;
  215. The icon to display in the Slack messages.
  216. Overrides the incoming webhook's configured
  217. icon. Accepts a public URL to an image.
  218. `message_defaults.text`;;
  219. The default message content.
  220. `message_defaults.attachment`;;
  221. Default message attachments. Slack message attachments
  222. enable you to create more richly-formatted messages.
  223. Specified as an array as defined in the
  224. https://api.slack.com/docs/attachments[
  225. Slack attachments documentation].
  226. [float]
  227. [[jira-notification-settings]]
  228. ==== Jira Notification Settings
  229. You can configure the following Jira notification settings in
  230. `elasticsearch.yml`. For more information about using notifications
  231. to create issues in Jira, see {xpack-ref}/actions-jira.html#configuring-jira-actions[Configuring Jira].
  232. `xpack.notification.jira` ::
  233. Specifies account information for using notifications to create
  234. issues in Jira. You can specify the following Jira account attributes:
  235. [[jira-account-attributes]]
  236. `url`;;
  237. The URL of the Jira Software server. Required.
  238. `user`;;
  239. The name of the user to connect to the Jira Software server. Required.
  240. `password`;;
  241. The password of the user to connect to the Jira Software server. Required.
  242. `issue_defaults`;;
  243. Default fields values for the issue created in Jira. See
  244. {xpack-ref}/actions-jira.html#jira-action-attributes[Jira Action Attributes] for more information.
  245. Optional.
  246. [float]
  247. [[pagerduty-notification-settings]]
  248. ==== PagerDuty Notification Settings
  249. You can configure the following PagerDuty notification settings in
  250. `elasticsearch.yml`. For more information about sending notifications
  251. via PagerDuty, see {xpack-ref}/actions-pagerduty.html#configuring-pagerduty-actions[Configuring PagerDuty].
  252. [[pagerduty-account-attributes]]
  253. `xpack.notification.pagerduty`::
  254. Specifies account information for sending notifications
  255. via PagerDuty. You can specify the following PagerDuty account attributes:
  256. `name`;;
  257. A name for the PagerDuty account associated with the API key you
  258. are using to access PagerDuty. Required.
  259. `service_api_key`;;
  260. The https://developer.pagerduty.com/documentation/rest/authentication[
  261. PagerDuty API key] to use to access PagerDuty. Required.
  262. `event_defaults`;;
  263. Default values for {xpack-ref}/actions-pagerduty.html#pagerduty-event-trigger-incident-attributes[
  264. PagerDuty event attributes]. Optional.
  265. `description`::
  266. A string that contains the default description for PagerDuty events.
  267. If no default is configured, each PagerDuty action must specify a
  268. `description`.
  269. `incident_key`::
  270. A string that contains the default incident key to use when sending
  271. PagerDuty events.
  272. `client`::
  273. A string that specifies the default monitoring client.
  274. `client_url`::
  275. The URL of the default monitoring client.
  276. `event_type`::
  277. The default event type. Valid values: `trigger`,`resolve`, `acknowledge`.
  278. `attach_payload`::
  279. Whether or not to provide the watch payload as context for
  280. the event by default. Valid values: `true`, `false`.