indices.asciidoc 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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,sh]
  9. ----------------------------------
  10. GET /_template/.monitoring-*
  11. ----------------------------------
  12. // CONSOLE
  13. By default, the template configures one shard and one replica for the
  14. monitoring indices. To override the default settings, add your own template:
  15. . Set the `template` pattern to `.monitoring-*`.
  16. . Set the template `order` to `1`. This ensures your template is
  17. applied after the default template, which has an order of 0.
  18. . Specify the `number_of_shards` and/or `number_of_replicas` in the `settings`
  19. section.
  20. For example, the following template increases the number of shards to five
  21. and the number of replicas to two.
  22. [source,js]
  23. ----------------------------------
  24. PUT /_template/custom_monitoring
  25. {
  26. "index_patterns": ".monitoring-*",
  27. "order": 1,
  28. "settings": {
  29. "number_of_shards": 5,
  30. "number_of_replicas": 2
  31. }
  32. }
  33. ----------------------------------
  34. // CONSOLE
  35. IMPORTANT: Only set the `number_of_shards` and `number_of_replicas` in the
  36. settings section. Overriding other monitoring template settings could cause
  37. your monitoring dashboards to stop working correctly.