所以我们有这样的logstash配置,过滤器类似于:(我排除了输出),所以我想知道在我运行ruby代码来匿名字段之前,是否应该首先出现变异体。匿名者ruby是将匿名的ruby脚本。
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" }
}
}
}发布于 2021-01-26 12:14:24
是的,是按顺序执行的。经过测试和验证。
https://stackoverflow.com/questions/65771099
复制相似问题