• close索引配置文件示例">close索引配置文件示例
  • open索引配置文件示例">open索引配置文件示例

    close索引配置文件示例

    1. 关闭30天前以dtlog为前缀的索引:
    2. ---
    3. actions:
    4. 1:
    5. action: close
    6. description: >-
    7. Close indices older than 30 days (based on index name), for dtlog-
    8. prefixed indices.
    9. options:
    10. delete_aliases: False
    11. timeout_override:
    12. continue_if_exception: False
    13. filters:
    14. - filtertype: pattern
    15. kind: regex
    16. value: '^dtlog-'
    17. exclude:
    18. - filtertype: pattern
    19. kind: regex
    20. value: '^(?!.*message).*$' 匹配不包含message的行
    21. exclude:
    22. - filtertype: pattern
    23. kind: regex
    24. value: '^(?!dtlog-1-jhyt).*$' 匹配不以dtlog-1-jhyt开头的行
    25. exclude:
    26. ##fliter默认以AND逻辑连接,若要匹配多个,可以使用|在同一个正则表达式中表示OR逻辑
    27. - filtertype: age
    28. source: name
    29. direction: older
    30. timestring: '%Y.%m.%d'
    31. unit: days
    32. unit_count: 30
    33. exclude:

    timeout_override
    image.png
    filtertype_pattern
    filtertype_age

    open索引配置文件示例

    1. actions:
    2. 1:
    3. action: open
    4. description: "open selected indices"
    5. options:
    6. continue_if_exception: False
    7. timeout_override: 300
    8. filters:
    9. - filtertype: pattern
    10. kind: regex
    11. value: '^dtlog-1.*2019.04'