1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| input { redis { id => "test" host => "xxxx" port => "xxxx" password => "p1ssw0rd" data_type => "list" threads => 4 key => "log:test" type => "test" } }
filter { date { match => ["ts", "UNIX", "UNIX_MS", "ISO8601"] timezone => "Asia/Shanghai" target => "@timestamp" remove_field => ["ts"] } ruby { code => ' if event.get("msg") and event.get("msg").length > 512*1024 event.set("msg", "IGNORED LARGE MSG") end ' } }
output { elasticsearch { id => "log" hosts => "es-master:9200" user => "logstash_internal" password => "${LOGSTASH_INTERNAL_PASSWORD}" index => "logstash-%{type}-%{+YYYY.MM.dd}" } }
|