安装awslogs代理时遇到问题 [英] having trouble installing awslogs agent

查看:283
本文介绍了安装awslogs代理时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试在我的ec2节点上安装awslogs代理时遇到问题.当我运行此命令时:

I'm having issues trying to instal awslogs agent on my ec2 node. When I run this command:

sudo python ./awslogs-agent-setup.py --region us-east-1

在步骤2上似乎失败了:

it seems to fail at step 2 like this:

Launching interactive setup of CloudWatch Logs agent ... 

Step 1 of 5: Installing pip ...DONE

Step 2 of 5: Downloading the latest CloudWatch Logs agent bits ... 
Traceback (most recent call last):
  File "./awslogs-agent-setup.py", line 1144, in <module>
    main()
  File "./awslogs-agent-setup.py", line 1140, in main
    setup.setup_artifacts()
  File "./awslogs-agent-setup.py", line 696, in setup_artifacts
    self.install_awslogs_cli()
  File "./awslogs-agent-setup.py", line 523, in install_awslogs_cli
    subprocess.call([AWSCLI_CMD, 'configure', 'set', 'plugins.cwlogs', 'cwlogs'], env=DEFAULT_ENV)
  File "/usr/lib64/python2.7/subprocess.py", line 524, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

缺少什么目录或文件?

推荐答案

Amazon Linux 2

awslogs代理现在可以作为yum包 https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/QuickStartEC2Instance.html

The awslogs agent is available now as a yum package https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/QuickStartEC2Instance.html

sudo yum install -y awslogs
sudo systemctl start awslogsd
sudo systemctl enable awslogsd.service

确保按文档中所述更改AWS区域

Make sure to change the AWS Region as mentionned in the doc

这篇关于安装awslogs代理时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆