首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >logstash筛选器是否按顺序运行?

logstash筛选器是否按顺序运行?
EN

Stack Overflow用户
提问于 2021-01-18 16:34:24
回答 1查看 38关注 0票数 0

所以我们有这样的logstash配置,过滤器类似于:(我排除了输出),所以我想知道在我运行ruby代码来匿名字段之前,是否应该首先出现变异体。匿名者ruby是将匿名的ruby脚本。

代码语言:javascript
复制
input {
    http {
        port => 5045
        host => "0.0.0.0"
        add_field => { "category" => "client" }
    }
}

# The filter part of this file is commented out to indicate that it is optional.
filter {

        # the following line will create 1 additional copy of each document (i.e. including the original, 2 in total)
        # the copy will have a "type" field added only if the category is client.
        if [category] == "client" {
            clone {
                clones => ["anonym"]
            }
            # anonymized the field(s) of the cloned document through anonymizer.rb
            if [type] == "anonym" {
                ruby {
                    path => "/<path>/anonymizer.rb"
                    script_params => {
                        "key" => "<logstash_fingerprint_key>"
                    }
                }
            }
        }

        # update sample_schema_v1 to sample_schema_v2
        if [schema] == "sample_schema_v1" {
            mutate {
                update => { "schema" => "sample_schema_v2" }
            }
        }
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-01-26 12:14:24

是的,是按顺序执行的。经过测试和验证。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65771099

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档