AWS Elastic Beanstalk healthd uses wrong timezone for nginx logs

0

With configuration from https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-serverlogs.html the nxing generates log files named by local timezone but healthd looks for files with UTC (i guess) named logs:

[2023-12-12T14:12:05.600240 #4544]  WARN -- : log file "/var/log/nginx/healthd/application.log.2023-12-12-13" does not exist

Is there any way to force either nginx or healthd to match (or a place to fill bug report for healthd at least)?

已提问 6 个月前125 查看次数
1 回答
0

As per nginx documentation: "By default, nginx removes all environment variables inherited from its parent process except the TZ variable."

However TZ can be overriden in nginx.conf:

  user  nginx;
  worker_processes  auto;
+ env TZ=UTC;

That would do the trick.

profile picture
已回答 12 天前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则