gpt4 book ai didi

elasticsearch - 将索引名称中的字段用于 elasticsearch 插件 logstash

转载 作者:行者123 更新时间:2023-12-04 05:48:21 26 4
gpt4 key购买 nike

我正在尝试使用基于字段的 elasticsearch 索引,以便我可以获得每个源的索引(允许安全访问每个索引)。

我尝试了一些类似的东西

output {
stdout { codec => rubydebug }
elasticsearch {
index => [SERVER]"-%{+YYYY.MM.dd}"
}
}


output {
stdout { codec => rubydebug }
elasticsearch{
index => "[SERVER]-%{+YYYY.MM.dd}"
}
}

并且都不起作用:第一个错误,第二个尝试创建带有 [SERVER] 的索引,然后由于大写导致错误,这可能不受支持,因为我在文档中的任何地方都找不到它,但我想知道是否有人得到了像这样的功能对于他们自己的 ELK 堆栈?

最佳答案

正确的语法是 "%{SERVER}-%{+YYYY.MM.dd}"
根据 to the documentation :

[The index to write] can be dynamic using the %{foo} syntax.

关于elasticsearch - 将索引名称中的字段用于 elasticsearch 插件 logstash,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37838941/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com