0

我已在我的EBS應用程序中激活了CloudWatch日誌。具有CloudWatch日誌和Nginx的Elastic Beanstalk

enter image description here

但是,當我看着awslogs.log,我能找到的所有時間這個錯誤:我有一個截圖附着啓用

cwlogs.push.stream - WARNING - 3317 - Thread-1 - No file is found with given path '/var/log/httpd/error.log*'. 
cwlogs.push.stream - WARNING - 3317 - Thread-1 - No file is found with given path '/var/log/httpd/access.log*'. 

我不知道爲什麼,因爲httpd的是來自Apache的一項服務,我正在與Nginx合作(以Node.js作爲起源)。

如何禁用/刪除此錯誤?

謝謝。

回答

0

發生這種情況的原因是EC2實例上的awslogs應用程序正在查找要發送到CloudWatch的文件。

您可以查看和編輯位於配置文件:

/etc/awslogs/awslogs.conf 

確保重新啓動服務:

sudo service awslogs restart 

你可以有自己指定文件,並創建不同的組,什麼不可以。

資源:

https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AgentReference.html