Well,不要刷屏了

安装完x-pack后logstarsh无法传数据进入elasticsearch

Logstash | 作者 bytecat | 发布于2017年09月26日 | 阅读数:5114

logstarsh收集配置文件如下:
#cat yarn.conf
input {
  redis {
        host => "10.66.1.4"
        port => 6379
        key => "logstash:redis-yarn"
        type => "yarn"
        data_type => "list"
    }

}

output{
if [type] == "yarn" {
                elasticsearch {
                        manage_template => true
                        hosts => ["10.66.1.6:9200"]
                        index => "logstash-yarn-%{+YYYY.MM.dd}"
                        user => "logstash_internal"
                        password => "changeme"
                }
        }

}
logstarsh从redis中取数据,查看redis中,确实有数据,执行./logstarsh -f yarn.conf有如下报错:
[logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}
[2017-09-26T16:22:01,449][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({"type"=>"security_exception", "reason"=>"action [indices:data/write/bulk[s]] is unauthorized for user [logstash_internal]"})
[2017-09-26T16:22:01,450][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({"type"=>"security_exception", "reason"=>"action [indices:data/write/bulk[s]] is unauthorized for user [logstash_internal]"})
[2017-09-26T16:22:01,450][INFO ][logstash.outputs.elasticsearch] Retrying individual bulk actions that failed or were rejected by the previous bulk request. {:count=>2}
 
 
 
err01.png
已邀请:

rockybean - Elastic Certified Engineer, ElasticStack Fans,公众号:ElasticTalk

赞同来自:

[2017-09-26T16:22:01,450][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({"type"=>"security_exception", "reason"=>"action [indices:data/write/bulk[s]] is unauthorized for user [logstash_internal]"})

权限问题,你要创建这个用户,或者关掉 xpack 的security 功能
 

要回复问题请先登录注册