monitoring-settings.asciidoc 11 KB

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