Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define nginx container logging approach #1

Open
adubeniuk opened this issue Mar 17, 2017 · 1 comment
Open

Define nginx container logging approach #1

adubeniuk opened this issue Mar 17, 2017 · 1 comment

Comments

@adubeniuk
Copy link
Owner

adubeniuk commented Mar 17, 2017

There could be multiple ways to get the logs from nginx to the logging agent in the container environment.

As this is quite an important decision I would like to describe some of the available options:

  • use nginx built-in syslog module to forward logs to the remote syslog
  • use docker built-in syslog logging driver to forward logs to the remote syslog
  • mount /var/log/nginx as docker data volume and attach that volume to the logging agent container

First option is the easiest to implement but it could also have the worst consequences.
By its design nginx will simply freeze when unable to write its logs in this case over syslog.

Second option seems rational as it will also allow us to get the logs from the Docker host itself.
Also it allows us to change logging driver from syslog to any other supported logging driver including fluentd.

However none of these two options require separate logging container.
Indeed we could forward the logs directly to the centralized logging server either from the nginx or the Docker host itself eliminating the need for an auxiliary logging container.

But as the separate logging agent is strictly required by the task I will proceed with the dedicated logging container option and storing nginx logs on a docker data volume.

@adubeniuk
Copy link
Owner Author

@adubeniuk adubeniuk reopened this Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant