Logstash排除字段及字段内容

排除字段

filter {
    grok {
        remove_field => ["agent", "cloud", "ecs", "host", "input"]
    }
}

排除字段内容

output {
    if "_grokparsefailure" in [tags] {
        file { path => "/usr/local/logstash/logs/grok_failures.txt" }
    } else {
        if (([classpath] == "com.netflix.eureka.registry.AbstractInstanceRegistry" and [methodname] == "run") or
            ([classpath] == "com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver" and [methodname] == "getClusterEndpoints")) {
            #stdout {
               #codec => rubydebug
            #}
        } else {
            elasticsearch {
                hosts => ["172.10.1.10:9200"]
                #index => "%{type}"
                index => "appblog-%{+YYYY.MM.dd}"
            }
        }
    }
}
上一篇 提升WooCommerce商店的安全性
下一篇 Logstash使用日志记录时间替换@timestamp
目录
文章列表
1 Vue刷新当前页面或组件
Vue刷新当前页面或组件
2
JavaScript中forEach与each
JavaScript中forEach与each
3
比 Kubernetes Dashboard 更好用的管理工具 - Kuboard
比 Kubernetes Dashboard 更好用的管理工具 - Kuboard
4
CentOS 7下安装MySQL 8
CentOS 7下安装MySQL 8
5
CentOS下安装composer
CentOS下安装composer
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。