Send nginx logs to journald #583

Merged
benvin merged 1 commits from benvin/nginx-logs-journald into develop 2026-11-24 21:32:07 +11:00
Member

nginx only logs to files, so its access and error logs never reach journald or VictoriaLogs, and proxy errors (e.g. consul.service.consul 502s) can't be diagnosed from vlogs.

  • add a journald log_format with $host, request time and upstream addr/status/response time
  • add syslog (unix:/dev/log) targets estate-wide: tag=nginx_access for access, tag=nginx for errors
  • add the same syslog targets to the per-vhost logs in simpleproxy, edgecache, reposync, certbot and puppetboard, keeping the existing files
nginx only logs to files, so its access and error logs never reach journald or VictoriaLogs, and proxy errors (e.g. consul.service.consul 502s) can't be diagnosed from vlogs. - add a `journald` log_format with `$host`, request time and upstream addr/status/response time - add syslog (`unix:/dev/log`) targets estate-wide: `tag=nginx_access` for access, `tag=nginx` for errors - add the same syslog targets to the per-vhost logs in simpleproxy, edgecache, reposync, certbot and puppetboard, keeping the existing files
unkin-agent added 1 commit 2026-11-23 22:37:49 +11:00
Send nginx access and error logs to journald
ci/woodpecker/pr/puppet-lint Pipeline was successful
ci/woodpecker/pr/ruby-validate Pipeline was successful
ci/woodpecker/pr/erb-validate Pipeline was successful
ci/woodpecker/pr/yamllint Pipeline was successful
ci/woodpecker/pr/bolt-validate Pipeline was successful
ci/woodpecker/pr/epp-validate Pipeline was successful
ci/woodpecker/pr/puppet-validate Pipeline was successful
ci/woodpecker/pr/ruby-check Pipeline was successful
0265f5c4d0
Add syslog targets alongside the existing file logs so nginx logs reach VictoriaLogs via journald.
benvin merged commit 89bd97048e into develop 2026-11-24 21:32:07 +11:00
benvin deleted branch benvin/nginx-logs-journald 2026-11-24 21:32:07 +11:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/puppet-prod#583