如何卸载awslogs-agent-setup.py? [英] How to uninstall awslogs-agent-setup.py?

查看:122
本文介绍了如何卸载awslogs-agent-setup.py?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

仅在我的Amazon Linux AMI上使用 sudo python ./awslogs-agent-setup.py --region us-east-1 后,我才从AWS文档中找到以下警告提示:

Only after using sudo python ./awslogs-agent-setup.py --region us-east-1 on my Amazon Linux AMI, I found this tidbyte of Caution from AWS docs:

不要使用RPM安装来更新CloudWatch Logs代理以前使用Python脚本安装代理的方法.这样做可能会导致配置问题,从而阻止CloudWatch日志代理将您的日志发送到CloudWatch.

Do not update the CloudWatch Logs agent using the RPM installation method if you previously used the Python script to install the agent. Doing so may cause configuration issues that prevent the CloudWatch Logs agent from sending your logs to CloudWatch.

现在,如何卸载python版本以使用RPM安装?

Now, how can I uninstall the python version to use the RPM installation?

推荐答案

有一篇有关

There is a writeup about removing awslogs on CentOS, I guess you can apply this on Amazon Linux as well. I don't think there is an easier way than doing it manually.

由于无法访问上面的链接而被

这些步骤应执行:

#Stop the awslogs service.
service awslogs stop

#Remove cloud watch related files.
rm -rf /var/awslogs
rm /etc/cron.d/awslogs*
rm /etc/init.d/awslogs
rm /var/log/awslogs*
rm -rf /home/ubuntu/awslogs-agent-setup.py

然后根据需要重新启动服务器.

Then restart the server if required.

现在应从系统中删除CloudWatch logs代理.确保登录到CloudWatch AWS控制台以删除日志组:AWS控制台-> CloudWatch->日志->选择日志组,然后单击删除日志组".

The CloudWatch logs agent should now be removed from the system. Ensure you log into the CloudWatch AWS Console to remove the log group: AWS Console -> CloudWatch -> Logs -> Select the Log Group and click on "Delete Log Group".

这篇关于如何卸载awslogs-agent-setup.py?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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