CloudWatch pushes only ERROR or WARNING message of a specific log file

0

Hello everyone,

I configured an on-prem installation of the CloudWatch Agent, and three logs files should be pushed to CloudWatch Logs. All three configuration entries have only the fields "file_path", "log_group_name", "log_stream_name" and "retention_in_days" set, therefore no filters. For some reason, and for just one of these files, only logs with level > WARN are pushed to the Cloud. Of course the file on the server also has other messages, i.e., a lot of INFO logs. I tried to check on the file system and also on the documentation and I could not find anything like that.

Am I missing something? Thanks, Federico

질문됨 일 년 전382회 조회
1개 답변
0

According to the documentation:

If you do not specify an agent logging config file here, the default file awslogs.conf is used. 
The default file location is /var/awslogs/etc/awslogs.conf if you installed the agent 
with a script, and is /etc/awslogs/awslogs.conf if you installed the agent with rpm. 

In the [general] section, what is logging_config_file set to?

profile pictureAWS
전문가
kentrad
답변함 일 년 전
  • I have seen that piece of documentation, but I have no such file in my installation (i.e., no awslogs folder under /var). This is an on-prem installation that I have done via Systems Manager, and then I configured CloudWatch using the Wizard.

    P.S.: After some services restart anyway it seems that also INFO logs are sent. Anyway it might be interesting to know if and where the file you are mentioning may be located in my environment.

    Thanks!

    Edit: There is no awslogs folder even under /etc

  • You could do a 'find . -name awslog.conf' from the root directory. Or explicitly set the logging_config_file and manage it's contents.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인