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

How to read log from Nginx Docker #94

Open
Maatary opened this issue Nov 10, 2018 · 1 comment
Open

How to read log from Nginx Docker #94

Maatary opened this issue Nov 10, 2018 · 1 comment

Comments

@Maatary
Copy link

Maatary commented Nov 10, 2018

The official Nginx Docker image does a redirection of access.log to /dev/stdout, so that one can access the log with docker log from outside docker i.e. on the host. This is an issue because then from within the docker container I can't access access.log.

I finally resorted to install nginx on my mac and perform the following command
docker logs -f competent_edison &>> ~/Dev/monitoring/access.log

While the redirection works fine and the access.log on my mac, mirror the output of the container in realtime, ngxtop output nothing when i pass that file as parameter: ngnix -l ~/Dev/monitoring/access.log

I wonder if there is a way for ngxtop to be installed on an host, to monitor an nginx running in a container.

Please any indication would be helpful as i spend 2 days around that and can't figure out how to deal with it.

@cmjzzx
Copy link

cmjzzx commented Mar 30, 2022

@Maatary Hi, has this problem been solved?

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

2 participants