logstash配置output到Elasticsearch

2018-04-28 11:48:52 浏览数 (1)

代码语言:javascript复制
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

es2

0 人点赞