elasticsearch 为给定筛选器的logstash输出添加公共前缀,elasticsearch,filter,logstash,elasticsearch,Filter,Logstash" /> elasticsearch 为给定筛选器的logstash输出添加公共前缀,elasticsearch,filter,logstash,elasticsearch,Filter,Logstash" />

elasticsearch 为给定筛选器的logstash输出添加公共前缀

elasticsearch 为给定筛选器的logstash输出添加公共前缀,elasticsearch,filter,logstash,elasticsearch,Filter,Logstash,我正在使用一些logstash io,它会生成许多名为“a0”、“a1”的字段。我可以对这些字段进行变异,但它们有很多,所以我想为过滤器中的所有字段预先添加一个“名称空间”(排序) 即如果解析的记录是'a0'和'a1',我希望它们在elasticsearch中显示为'somespace.a0'和'somespace.a1' 这可能吗?如果您使用的是kv过滤器,则可以添加“前缀”(请参阅) prefix: Value type is string Default value is "" A st

我正在使用一些logstash io,它会生成许多名为“a0”、“a1”的字段。我可以对这些字段进行变异,但它们有很多,所以我想为过滤器中的所有字段预先添加一个“名称空间”(排序)

即如果解析的记录是'a0'和'a1',我希望它们在elasticsearch中显示为'somespace.a0'和'somespace.a1'


这可能吗?

如果您使用的是kv过滤器,则可以添加“前缀”(请参阅)

prefix:

Value type is string
Default value is ""
A string to prepend to all of the extracted keys.

For example, to prepend arg_ to all keys:

filter { kv { prefix => "arg_" } }