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
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
what directory or file is it missing?
Installation process overviewDownload the agent package. Modify the CloudWatch agent configuration file and specify the metrics that you want to collect. Install and start the agent on your servers. As you install the agent on an EC2 instance, you attach the IAM role that you created in step 1.
Amazon Linux 2
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
Make sure to change the AWS Region as mentionned in the doc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With