How to uninstall awslogs-agent-setup.py?

后端 未结 2 657
慢半拍i
慢半拍i 2021-02-06 04:10

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:

2条回答
  •  鱼传尺愫
    2021-02-06 04:21

    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.

    Edited as the link above is not reachable:

    These steps should be executed:

    #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.

    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”.

提交回复
热议问题