logstash配置elasticsearch

按照自己的意思添加index和type:

      elasticsearch {                                                                                                                                                                                             
            hosts => ["10.10.1.11:9200"]                                                                                                                                                                           
            user => elastic                                                                                                                                                                                         
            password => SA33                                                                                                                                                                        
            index => "log-%{+YYYY.MM.dd}"                                                                                                                                                                           
            document_type => "log"                                                                                                                                                                                  
        } 

你可能感兴趣的:(logstash配置elasticsearch)