nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

External Nginx logging (potentially with Tabler WebUI based configuration)

Open phantomski77 opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. My problem is missing standardised external access to internal Nginx logs as these are not sent to stdout and stderr for subsequent Docker logging handling.

Why I think the change is needed: Any proxy is by design exposed to the unrelenting attacks on ports 80 and 443. While of course a good Nginx setup is capable of mitigting most of the risks (thank you!), it is more prudent to continuously monitor the traffic and based on that (for example http 3xx, 4xx and 5xx response status codes) update the firewall rules on the upstream router, for example by blocking the offending IPs.

Describe the solution you'd like I am using Graylog Centralised Log Management software to ingest monitoring data (mostly linux syslog and some UDP streams) from my servers and devices. Thanks to great Graylog functionality, I'm able to filter, categorise, (re)format and analyse these logs and produce minimalistic but meaningful outputs that massively narrow down the streams to just the most important data worth a manual look or ideally a scripted solution.

Current situation: As it stands at the moment, Nginx Proxy Manager's Docker log is pretty limited to basic system calls. While all the Nginx logs I need are indeed produced by Nginx under \data\logs inside the container and these are of course exposed through a persistent volume, they're not part of the main container log that could be subsequently configured and forwarded for ignestion using standard Docker Logging Drivers. I need to use a separate solution to read those files and forward them to Graylog.

I would like to:

  • Have the Nginx logs included as part of the container log (easiest and ideal standard solution) or
  • Have an internal logging system that would forward Nginx logs to for example specified GELF endpoint or
  • At least an UDP stream (BusyBox nc?) with these logs I could then pickup by Graylog

Bonus in ideal world: Ideally, those would be configurable via GUI. For example on/off switch for each source log (default_host.log, proxy_host-x.log, default.log, ...) and 1 or more on/off switches for "targets" for those logs (Docker, GELF with IP/port, UDP with IP/port, etc)

Describe alternatives you've considered

  • Analysis of volume stored logs and forwarding last line to ingest point (another container or system tool needed)
  • The above but inside container (violating the one service per container rule)
  • Reconfiguring your project

Thank you very much for considering. Hopefully it is "just" a simple Nginx/Dockerfile configuration.

phantomski77 avatar Mar 12 '21 17:03 phantomski77