Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elastic Beanstalk with CloudWatch logs and Nginx

I have activated the CloudWatch logs in my EBS Application. I have enabled like screenshot attached:

enter image description here

But when I look in awslogs.log, I can find all the time this error:

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*'.

I don't know why, because httpd is a service from Apache, and I'm working with Nginx (with Node.js as origin).

How can I disable/remove this error?

Thanks.

like image 851
chemitaxis Avatar asked Oct 18 '22 11:10

chemitaxis


1 Answers

This is happening because the awslogs application on your EC2 instance is looking for those files to send to the CloudWatch.

You can check and edit the configuration file located at:

/etc/awslogs/awslogs.conf

Make sure to restart the service:

sudo service awslogs restart

You can specify your own files there and create different groups and what not.

Resources:

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

like image 146
Abhyudit Jain Avatar answered Oct 21 '22 03:10

Abhyudit Jain