Skip to content

automatically log all NPM proxies in one dashboard #2

@StefanHuettenmoser

Description

@StefanHuettenmoser

Hey null-burl

Thank you very much for your work.
I found your setup guide very helpful.

I wanted to log all the traffic that gets proxied by NPM in a single dashboard and found a very convenient solution.
Feel free to adapt and include it in the readme if you find it potentialy helpful for others:


automatically log all proxied traffic

set the single log file in NPM

After having started NPM, create a new file ./nginx_proxy/data/nginx/custom/server_proxy.conf with the content:

access_log /data/logs/proxy_access.log proxy;

Note: The folder custom will probably not yet exists.

This will tell NPM to log all the proxy traffic in a single file.

define log file in goaccess

In the goaccess.conf file, update:
log-file /opt/log/proxy_access.log

restart the containers

docker-compose down && docker-compose up -d

That's it. All you proxied traffic is now logged in a single dashboard. If you add new proxy hosts, they will automatically be included.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions