logstash日志报错信息:
[2021-06-18T00:00:34,455][INFO ][logstash.outputs.elasticsearch] Retrying individual bulk
actions that failed or were rejected by the previous bulk request. {:count=>1}
[2021-06-18T00:01:38,034][INFO ][logstash.outputs.elasticsearch] retrying failed action wi
th response code: 403 ({"type"=>"cluster_block_exception", "reason"=>"blocked by: [FORBIDD
EN/8/index write (api)];"})
处理问题步骤:
1.查看ES集群状态,查看配置文件和日志是否有报错,发现没有
2.查看filebeat 的配置文件是否有误,查看之后没有
3.登录kibana查看具体什么时候没有日志,发现近两个月没有日志
问题原因分析:
查看索引情况,发现又几个索引被锁,所以logstash无法写入到ES的索引中。
索索引被冻住的原因是因为之前ES配置了生命周期。冻住30天的索引。
logstash写入到被锁住的ES索引,所以日志一直报写入ES失败。
解决方法:
在kibana上操作解除
unmanaged 是指不被管理的索引
查询出unmanaged的索引,然后选择点击左上角的manage index 下拉中选择unmanaged index,然后会发现索引逐渐会黄和green。
最后查看日志,会发现恢复正常。