indices.asciidoc 1.7 KB

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