forcemerge索引配置文件示例

  1. 1、将副本设置为0;
  2. 2forcemerge索引;
  3. 3、将副本设置为1;
  4. 过滤添加: 前一天的索引
  5. ---
  6. actions:
  7. 1:
  8. action: replicas
  9. options:
  10. count: 0
  11. wait_for_completion: False
  12. timeout_override:
  13. continue_if_exception: False
  14. filters:
  15. - filtertype: pattern
  16. kind: prefix
  17. value: dtlog
  18. exclude:
  19. - filtertype: age
  20. source: name
  21. direction: older
  22. timestring: '%Y.%m.%d'
  23. unit: days
  24. unit_count: 1
  25. exclude:
  26. - filtertype: age
  27. source: name
  28. direction: younger
  29. timestring: '%Y.%m.%d'
  30. unit: days
  31. unit_count: 2
  32. exclude:
  33. 2:
  34. action: forcemerge
  35. options:
  36. max_num_segments: 1
  37. delay: 10
  38. timeout_override: 21600
  39. continue_if_exception: True
  40. ignore_empty_list: True
  41. filters:
  42. - filtertype: pattern
  43. kind: prefix
  44. value: dtlog
  45. exclude:
  46. - filtertype: age
  47. source: name
  48. direction: older
  49. timestring: '%Y.%m.%d'
  50. unit: days
  51. unit_count: 1
  52. exclude:
  53. - filtertype: age
  54. source: name
  55. direction: younger
  56. timestring: '%Y.%m.%d'
  57. unit: days
  58. unit_count: 2
  59. exclude:
  60. 3:
  61. action: replicas
  62. options:
  63. count: 1
  64. wait_for_completion: False
  65. timeout_override:
  66. continue_if_exception: False
  67. filters:
  68. - filtertype: pattern
  69. kind: prefix
  70. value: dtlog
  71. exclude:
  72. - filtertype: age
  73. source: name
  74. direction: older
  75. timestring: '%Y.%m.%d'
  76. unit: days
  77. unit_count: 1
  78. exclude:
  79. - filtertype: age
  80. source: name
  81. direction: younger
  82. timestring: '%Y.%m.%d'
  83. unit: days
  84. unit_count: 2
  85. exclude: