monitoring-settings.asciidoc 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. [role="xpack"]
  2. [[monitoring-settings]]
  3. === Monitoring Settings in Elasticsearch
  4. ++++
  5. <titleabbrev>Monitoring Settings</titleabbrev>
  6. ++++
  7. By default, monitoring is enabled but data collection is disabled. To enable
  8. data collection, use the `xpack.monitoring.collection.enabled` setting.
  9. You can configure these monitoring settings in the `elasticsearch.yml` file.
  10. Some of them can also be set across the cluster by using the
  11. <<cluster-update-settings,cluster update settings API>>.
  12. TIP: Cluster settings take precedence over settings in the `elasticsearch.yml`
  13. file.
  14. To adjust how monitoring data is displayed in the monitoring UI, configure
  15. {kibana-ref}/monitoring-settings-kb.html[`xpack.monitoring` settings] in
  16. `kibana.yml`. To control how monitoring data is collected from
  17. Logstash, configure
  18. {logstash-ref}/configuring-logstash.html#monitoring-settings[`xpack.monitoring` settings]
  19. in `logstash.yml`.
  20. For more information, see
  21. {xpack-ref}/xpack-monitoring.html[Monitoring the Elastic Stack].
  22. [float]
  23. [[general-monitoring-settings]]
  24. ==== General Monitoring Settings
  25. `xpack.monitoring.enabled`::
  26. Set to `true` (default) to enable {es} {monitoring} for {es} on the node.
  27. +
  28. --
  29. NOTE: To enable data collection, you must also set `xpack.monitoring.collection.enabled`
  30. to `true`. Its default value is `false`.
  31. --
  32. [float]
  33. [[monitoring-collection-settings]]
  34. ==== Monitoring Collection Settings
  35. The `xpack.monitoring.collection` settings control how data is collected from
  36. your Elasticsearch nodes.
  37. `xpack.monitoring.collection.enabled`::
  38. added[6.3.0] Set to `true` to enable the collection of monitoring data. When
  39. this setting is `false` (default), {es} monitoring data is not collected and
  40. all monitoring data from other sources such as {kib}, Beats, and Logstash is
  41. ignored.
  42. +
  43. You can update this setting through the
  44. <<cluster-update-settings,Cluster Update Settings API>>.
  45. `xpack.monitoring.collection.interval`::
  46. Setting to `-1` to disable data collection is no longer supported beginning with
  47. 7.0.0. deprecated[6.3.0, Use `xpack.monitoring.collection.enabled` set to
  48. `false` instead.]
  49. +
  50. Controls how often data samples are collected. Defaults to `10s`. If you
  51. modify the collection interval, set the `xpack.monitoring.min_interval_seconds`
  52. option in `kibana.yml` to the same value.
  53. +
  54. You can update this setting through the
  55. <<cluster-update-settings,Cluster Update Settings API>>.
  56. `xpack.monitoring.collection.cluster.stats.timeout`::
  57. Sets the timeout for collecting the cluster statistics. Defaults to `10s`.
  58. `xpack.monitoring.collection.indices`::
  59. Controls which indices Monitoring collects data from. Defaults to all indices. Specify the index names
  60. as a comma-separated list, for example `test1,test2,test3`. Names can include wildcards, for
  61. example `test*`. You can explicitly include or exclude indices by prepending
  62. `+` to include the index, or `-` to exclude the index. For example, to include all indices that
  63. start with `test` except `test3`, you could specify `+test*,-test3`.
  64. +
  65. You can update this setting through the
  66. <<cluster-update-settings,Cluster Update Settings API>>.
  67. `xpack.monitoring.collection.index.stats.timeout`::
  68. Sets the timeout for collecting index statistics. Defaults to `10s`.
  69. `xpack.monitoring.collection.indices.stats.timeout`::
  70. Sets the timeout for collecting total indices statistics. Defaults to `10s`.
  71. `xpack.monitoring.collection.index.recovery.active_only`::
  72. Controls whether or not all recoveries are collected. Set to `true` to
  73. collect only active recoveries. Defaults to `false`.
  74. `xpack.monitoring.collection.index.recovery.timeout`::
  75. Sets the timeout for collecting the recovery information. Defaults to `10s`.
  76. `xpack.monitoring.history.duration`::
  77. Sets the retention duration beyond which the indices created by a Monitoring
  78. exporter are automatically deleted. Defaults to `7d` (7 days).
  79. +
  80. --
  81. This setting has a minimum value of `1d` (1 day) to ensure that something is
  82. being monitored, and it cannot be disabled.
  83. IMPORTANT: This setting currently only impacts `local`-type exporters. Indices created using
  84. the `http` exporter will not be deleted automatically.
  85. If both {monitoring} and {watcher} are enabled, you can use this setting to
  86. affect the {watcher} cleaner service too. For more information, see the
  87. `xpack.watcher.history.cleaner_service.enabled` setting in the
  88. <<notification-settings>>.
  89. --
  90. `xpack.monitoring.exporters`::
  91. Configures where the agent stores monitoring data. By default, the agent uses a
  92. local exporter that indexes monitoring data on the cluster where it is installed.
  93. Use an HTTP exporter to send data to a separate monitoring cluster. For more
  94. information, see <<local-exporter-settings,Local Exporter Settings>>,
  95. <<http-exporter-settings,HTTP Exporter Settings>>, and
  96. {xpack-ref}/how-monitoring-works.html[How Monitoring Works].
  97. [float]
  98. [[local-exporter-settings]]
  99. ==== Local Exporter Settings
  100. The `local` exporter is the default exporter used by Monitoring. As the name is
  101. meant to imply, it exports data to the _local_ cluster, which means that there
  102. is not much needed to be configured.
  103. If you do not supply _any_ exporters, then Monitoring will automatically create
  104. one for you. If any exporter is provided, then no default is added.
  105. [source,yaml]
  106. ----------------------------------
  107. xpack.monitoring.exporters.my_local:
  108. type: local
  109. ----------------------------------
  110. `type`::
  111. The value for a Local exporter must always be `local` and it is required.
  112. `use_ingest`::
  113. Whether to supply a placeholder pipeline to the cluster and a pipeline processor with
  114. every bulk request. The default value is `true`. If disabled, then it means that it will not
  115. use pipelines, which means that a future release cannot automatically upgrade bulk requests
  116. to future-proof them.
  117. `cluster_alerts.management.enabled`::
  118. Whether to create cluster alerts for this cluster. The default value is `true`.
  119. To use this feature, {watcher} must be enabled. If you have a basic license,
  120. cluster alerts are not displayed.
  121. [float]
  122. [[http-exporter-settings]]
  123. ==== HTTP Exporter Settings
  124. The following lists settings that can be supplied with the `http` exporter.
  125. All settings are shown as what follows the name you select for your exporter:
  126. [source,yaml]
  127. ----------------------------------
  128. xpack.monitoring.exporters.my_remote:
  129. type: http
  130. host: ["host:port", ...]
  131. ----------------------------------
  132. `type`::
  133. The value for an HTTP exporter must always be `http` and it is required.
  134. `host`::
  135. Host supports multiple formats, both as an array or as a single value. Supported formats include
  136. `hostname`, `hostname:port`, `http://hostname` `http://hostname:port`, `https://hostname`, and
  137. `https://hostname:port`. Hosts cannot be assumed. The default scheme is always `http` and the default
  138. port is always `9200` if not supplied as part of the `host` string.
  139. +
  140. [source,yaml]
  141. ----------------------------------
  142. xpack.monitoring.exporters:
  143. example1:
  144. type: http
  145. host: "10.1.2.3"
  146. example2:
  147. type: http
  148. host: ["http://10.1.2.4"]
  149. example3:
  150. type: http
  151. host: ["10.1.2.5", "10.1.2.6"]
  152. example4:
  153. type: http
  154. host: ["https://10.1.2.3:9200"]
  155. ----------------------------------
  156. `auth.username`::
  157. The username is required if a `auth.password` is supplied.
  158. `auth.password`::
  159. The password for the `auth.username`.
  160. `connection.timeout`::
  161. The amount of time that the HTTP connection is supposed to wait for a socket to open for the
  162. request. The default value is `6s`.
  163. `connection.read_timeout`::
  164. The amount of time that the HTTP connection is supposed to wait for a socket to
  165. send back a response. The default value is `10 * connection.timeout` (`60s` if neither are set).
  166. `ssl`::
  167. Each HTTP exporter can define its own TLS / SSL settings or inherit them. See the
  168. <<ssl-monitoring-settings, TLS / SSL section below>>.
  169. `proxy.base_path`::
  170. The base path to prefix any outgoing request, such as `/base/path` (e.g., bulk requests would
  171. then be sent as `/base/path/_bulk`). There is no default value.
  172. `headers`::
  173. Optional headers that are added to every request, which can assist with routing requests through
  174. proxies.
  175. +
  176. [source,yaml]
  177. ----------------------------------
  178. xpack.monitoring.exporters.my_remote:
  179. headers:
  180. X-My-Array: [abc, def, xyz]
  181. X-My-Header: abc123
  182. ----------------------------------
  183. +
  184. Array-based headers are sent `n` times where `n` is the size of the array. `Content-Type`
  185. and `Content-Length` cannot be set. Any headers created by the Monitoring agent will override
  186. anything defined here.
  187. `index.name.time_format`::
  188. A mechanism for changing the default date suffix for the, by default, daily Monitoring indices.
  189. The default value is `YYYY.MM.DD`, which is why the indices are created daily.
  190. `use_ingest`::
  191. Whether to supply a placeholder pipeline to the monitoring cluster and a pipeline processor with
  192. every bulk request. The default value is `true`. If disabled, then it means that it will not
  193. use pipelines, which means that a future release cannot automatically upgrade bulk requests
  194. to future-proof them.
  195. `cluster_alerts.management.enabled`::
  196. Whether to create cluster alerts for this cluster. The default value is `true`.
  197. To use this feature, {watcher} must be enabled. If you have a basic license,
  198. cluster alerts are not displayed.
  199. `cluster_alerts.management.blacklist`::
  200. Prevents the creation of specific cluster alerts. It also removes any applicable
  201. watches that already exist in the current cluster. +
  202. +
  203. --
  204. You can add any of the following watch identifiers to the blacklist:
  205. * `elasticsearch_cluster_status`
  206. * `elasticsearch_version_mismatch`
  207. * `elasticsearch_nodes`
  208. * `kibana_version_mismatch`
  209. * `logstash_version_mismatch`
  210. * `xpack_license_expiration`
  211. For example: `["elasticsearch_version_mismatch","xpack_license_expiration"]`.
  212. --
  213. [[ssl-monitoring-settings]]
  214. :ssl-prefix: xpack.monitoring.exporters.$NAME
  215. :component: {monitoring}
  216. :verifies:
  217. :server!:
  218. include::ssl-settings.asciidoc[]