Logstash Cloudwatch 插件——错误:请求中包含的安全令牌无效

问题描述 投票:0回答:0

我们有一个 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 文件,密钥在那里,但不知何故密钥传递不正确。有没有人遇到过这样的问题?

elasticsearch amazon-ec2 logstash amazon-iam elk
© www.soinside.com 2019 - 2024. All rights reserved.