notification-settings.asciidoc 14 KB

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