[elk@master001 config]$ cat logstash-log.conf # Sample Logstash configuration for creating a simple # Beats -> Logstash -> Elasticsearch pipeline. input { tcp { port => 5044 codec => json_lines } } filter { if [LOGLEVEL] == "DEBUG" { drop {} } if [LOGLEVEL] == "INFO" { drop {} } if [LOGLEVEL] == "WARN" { drop {} } ruby { code => "event.set('timestamp', event.get('@timestamp').time.localtime + 8*60*60)" } ruby { code => "event.set('@timestamp',event.get('timestamp'))" } mutate { remove_field => ["timestamp"] } } output { elasticsearch { hosts => ["http://localhost:9200"] index => "%{[appName]}-%{+YYYY.MM.dd}" #user => "elastic" #password => "changeme" } stdout { codec => rubydebug } }