此文已由作者赵计刚薪授权网易云社区发布。
欢迎访问网易云社区,了解更多网易技术产品运营经验。
参考: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 { } } }
更多网易技术、产品、运营经验分享请点击。