logstash配置output到Elasticsearch

input {
	file {
		path => ["/data/logs/nginx/201/*.log"]
		type => "test-log"
		start_position => "beginning"
        codec => "json"
	}
}
output {
	elasticsearch {
        hosts => "192.168.56.201:9200"
        index => "nginx-201"
	}
}

更多参考:https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html



Tagged , , . Bookmark the permalink.

Comments are closed.