indices.asciidoc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[config-monitoring-indices]]
  4. === Configuring indices for monitoring
  5. <<indices-templates,Index templates>> are used to configure the indices
  6. that store the monitoring data collected from a cluster.
  7. You can retrieve the templates through the `_template` API:
  8. [source,console]
  9. ----------------------------------
  10. GET /_template/.monitoring-*
  11. ----------------------------------
  12. By default, the template configures one shard and one replica for the
  13. monitoring indices. To override the default settings, add your own template:
  14. . Set the `template` pattern to `.monitoring-*`.
  15. . Set the template `order` to `1`. This ensures your template is
  16. applied after the default template, which has an order of 0.
  17. . Specify the `number_of_shards` and/or `number_of_replicas` in the `settings`
  18. section.
  19. For example, the following template increases the number of shards to five
  20. and the number of replicas to two.
  21. [source,console]
  22. ----------------------------------
  23. PUT /_template/custom_monitoring
  24. {
  25. "index_patterns": ".monitoring-*",
  26. "order": 1,
  27. "settings": {
  28. "number_of_shards": 5,
  29. "number_of_replicas": 2
  30. }
  31. }
  32. ----------------------------------
  33. IMPORTANT: Only set the `number_of_shards` and `number_of_replicas` in the
  34. settings section. Overriding other monitoring template settings could cause
  35. your monitoring dashboards to stop working correctly.