notification-settings.asciidoc 15 KB

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