玩 CloudWatch Logs

看到「Study Notes - CloudWatch」這篇後想到可以把 CloudWatch Logs 寫下來...

目前的玩法是參考「Quick Start: Install and Configure the CloudWatch Logs Agent on a Running EC2 Instance」這篇設定 IAM Role 的權限,然後安裝 agent,最後設定要丟什麼上去,其實這塊還蠻簡單的...

然後用 kennu/cwtail 這隻程式負責幫你跑出像 tail -f 的效果。像是 cwtail --profile=myaccount -e -f -s -t /var/log/syslog 這樣的用法 (參數的意義可以直接跑 cwtail 看到)。

不過他的 -n 好像不會動,跑下去都會從頭拉 XDDD

Leave a Reply

Your email address will not be published. Required fields are marked *