xavier-hernandez / goaccess-for-nginxproxymanager

GoAccess Docker Image for Nginx Proxy Manager and more...
https://hub.docker.com/r/xavierh/goaccess-for-nginxproxymanager
MIT License
523 stars 39 forks source link

Error processing fallback_error.log #166

Open pucherot opened 11 months ago

pucherot commented 11 months ago

When running npm with a custom user:

enviroment:
  - PUID=1000
  - PGID=1000

Warn occur when processing the nginx.conf file, and this warn is logged at fallback_error.log:

2023/10/02 19:47:29 [warn] 158#158: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:4

goaccess attempts to process these warns as access errors, but the format of the line is not as expected.

The goaccess container log shows:

2023-10-11T10:09:10.044154270Z ==338== GoAccess - version 1.7.2 - Sep  9 2023 16:25:50
2023-10-11T10:09:10.044172641Z ==338== Config file: /goaccess-config/error/goaccess.conf
2023-10-11T10:09:10.044186567Z ==338== https://goaccess.io - <hello@goaccess.io>
2023-10-11T10:09:10.044200400Z ==338== Released under the MIT License.
2023-10-11T10:09:10.044213918Z ==338==
2023-10-11T10:09:10.044250900Z ==338== FILE: /opt/log/fallback_error.log
2023-10-11T10:09:10.044265067Z ==338== Parsed 10 lines producing the following errors:
2023-10-11T10:09:10.044278770Z ==338==
2023-10-11T10:09:10.044292381Z ==338== IPv4/6 is required.
2023-10-11T10:09:10.044328770Z ==338== IPv4/6 is required.
2023-10-11T10:09:10.044344196Z ==338== IPv4/6 is required.
2023-10-11T10:09:10.044357733Z ==338== IPv4/6 is required.
2023-10-11T10:09:10.044418011Z ==338== IPv4/6 is required.
2023-10-11T10:09:10.044437696Z ==338== IPv4/6 is required.
2023-10-11T10:09:10.044451474Z ==338== IPv4/6 is required.
2023-10-11T10:09:10.044465048Z ==338== IPv4/6 is required.
2023-10-11T10:09:10.044503974Z ==338== IPv4/6 is required.
2023-10-11T10:09:10.044518845Z ==338== IPv4/6 is required.

I think goaccess should filter fallback_error.log files

xavier-hernandez commented 11 months ago

It shouldn't be processing that file, per the filters set in place. Can you provide your docker setup, so I can test on my end?

pucherot commented 10 months ago

This is my docker-compose.yml Thank you in advance.

services:
  proxy:
    image:          jc21/nginx-proxy-manager
    container_name: proxy
    restart:        unless-stopped

    network_mode:   bridge
    ports:
      - 80:80
      - 81:81
      - 443:443

    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt

    environment:
      - TZ=Europe/Madrid
      - PUID=1000
      - PGID=1000
      - DISABLE_IPV6=true

  goaccess:
    image:          xavierh/goaccess-for-nginxproxymanager
    container_name: proxy-goaccess
    restart:        unless-stopped

    network_mode:   bridge
    ports:
      - 7880:7880

    volumes:
      - ./data/logs:/opt/log

    environment:
      - TZ=Europe/Madrid
      - PUID=1000
      - PGID=1000
#      - SKIP_ARCHIVED_LOGS=False
#      - DEBUG=False
#      - BASIC_AUTH=True
#      - BASIC_AUTH_USERNAME=admin
#      - BASIC_AUTH_PASSWORD=PASSWORD
      - EXCLUDE_IPS=127.0.0.1
      - LOG_TYPE=NPM+ALL