我们有一个 ELK 堆栈在停止工作的 EC2 实例上运行。检查 Kibana、Elastic Search 和 Logstash 的日志后,我注意到这个错误:
Plugin: <LogStash::Inputs::CloudWatch_Logs access_key_id=>"JSDFTGHUKEVSCHIDP5VY", secret_access_key=><password>, id=>"68ef61a27eed2bd3e2a969415fd27263924ca794001390c75f15c212eab", log_group=>["fluteui-Prod", "
logstash[30989]: Error: The security token included in the request is invalid.
Exception: Aws::CloudWatchLogs::Errors::UnrecognizedClientException
secret_key 是一个 jsut 。在设置过程中,密钥和访问密钥被添加到 cloudwatch_logs_cloud.conf 文件中:
sudo sed -i "s/access_here/$(sed 's:/:\\/:g' /home/access_key_id.txt)/" /etc/logstash/conf.d/cloudwatch_logs_cloud.conf
sudo sed -i "s/secret_here/$(sed 's:/:\\/:g' /home/secret_access_key.txt)/" /etc/logstash/conf.d/cloudwatch_logs_cloud.conf
我查看了 .txt 文件和 cloudwatch.conf 文件,密钥在那里,但不知何故密钥传递不正确。有没有人遇到过这样的问题?