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
  }
}

 

相关文章:

  • 2021-07-02
  • 2021-07-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-08
  • 2021-09-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2022-01-06
  • 2022-03-07
相关资源
相似解决方案