Logback xml configuration

Hi Team
We are trying to capture the edge-message-processor/logs/system.logsystem.log into Datadog. But there was an issue we are facing on capturing the log continuously.

Issue: /opt/apigee/var/log/edge-message-processor/logs/system.log have setup with log rotation. once system.log was filled and zipped as gz file like (system-2024-02-14.1.log.gz) once zipped new system.log is created automatically. while creating the new system.log it’s created without read permission with other users like below

-rw-r----- 1 apigee apigee 21058892 Feb 14 08:09 system.log.

Datadog agent is running with DD-agent user. We need to provide the read permission for other in the system.log.
I am able to find some logrotate setup has made on logback.xml /opt/apigee/edge-message-processor/source/conf/logback.xml.

${data.dir:-..}/logs/system.log ${data.dir:-..}/logs/system-%d{yyyy-MM-dd}.%i.log.gz 10 50MB ${sensitiveDataPattern} ${defaultPattern}

Question: Where i need to make the changes in logback xml file to provide the read access for system.log file.

3 Likes

I think its not with Apigee, All the files creating on linux will follow the UMASK configured on the machine.

Try running the “umask” command & see, I think your machine will have the umask value as - 027 (-rw-r-----)

means, 0 - Owner, 2 - Groups, 7 - Others

So, check with your admin & try to update the umask value as 023 so that your DD-agent can read that newly created log file

  • 0 : read, write and execute
  • 1 : read and write
  • 2 : read and execute
  • 3 : read only
  • 4 : write and execute
  • 5 : write only
  • 6 : execute only
  • 7 : no permissions
2 Likes