logstash中的 output中 有index属性,表示在elk中的主键标识。

在实际应用中,index的值不能为大写字母,可以是小写字母、数字、下划线、中文

这里重点强调index为中文时,注意linux的编码必须为utf-8,以下为例子:

 

input {

}

filter {
 
}

output {
  elasticsearch {
    action => "index"
    hosts => "10.19.105.189:9200"
    user => "elastic"
    password => "changeme"
    //支持中文,但是要确保Xshell的字符集类型为utf-8类型
    index => "测试"
  }
  stdout{
    codec => rubydebug
  }
}

 

posted on 2017-03-29 15:09  C碧水蓝天S  阅读(1035)  评论(0编辑  收藏  举报