logstash - type与tags属性

猪小花1号2018-11-25 11:36

此文已由作者赵计刚薪授权网易云社区发布。

欢迎访问网易云社区,了解更多网易技术产品运营经验。


参考:http://kibana.logstash.es/content/logstash/plugins/input/stdin.html

最常用法:

input {
    stdin {
        tags => ["_grokparsefailure"]
        type => "web"
    }
}

filter {
    if [type] == "web" {
        grok {
            match => ["message", %{COMBINEDAPACHELOG}]
        }
    }
}
output { if "_grokparsefailure" in [tags] { nagios_nsca { nagios_status => "1" } } else { elasticsearch { } } }

 


免费体验云安全(易盾)内容安全、验证码等服务

更多网易技术、产品、运营经验分享请点击