notification-settings.asciidoc 15 KB

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