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
532 stars 39 forks source link

traefik access.log data not displaying #131

Closed LordWurstebrot closed 1 year ago

LordWurstebrot commented 1 year ago

Firstly, thanks very much for creating this. My problem is the log data is not displaying, and I don't get any error messages. I tried default log format and json.

my docker-compose.yml

  goaccess:
    image: 'xavierh/goaccess-for-nginxproxymanager:latest'
    container_name: goaccess
    restart: unless-stopped
    ports:
      - '7880:7880'
    environment:
      - TZ=Europe/Berlin
      - SKIP_ARCHIVED_LOGS=False #optional
      - DEBUG=True #optional
      - BASIC_AUTH=False #optional
      - BASIC_AUTH_USERNAME=user #optional
      - BASIC_AUTH_PASSWORD=pass #optional
      # - EXCLUDE_IPS=127.0.0.1 #optional - comma delimited
      - LOG_TYPE=TRAEFIK #optional
    volumes:
      - "/src/core/traefik-data/logs:/opt/log"
    labels:
      - traefik.enable=false

traefik.yml

# Configuring Multiple Filters
accessLog:
  filePath: "/logs/access.log"
  #filters:
  #  statusCodes:
  #    - "200"
  #    - "300-302"
    #retryAttempts: true
    #minDuration: "10ms"
  # collect logs as in-memory buffer before writing into log file
  bufferingSize: 0
  fields:
    headers:
      defaultMode: drop # drop all headers per default
      names:
          User-Agent: keep # log user agent strings

GoAccess log:

goaccess    |
goaccess     | GOAN v1.1.12
goaccess     |
goaccess     |
goaccess     | NGINX SETUP...
goaccess     |
goaccess     | NGINX BASIC AUTH
goaccess     | -------------------------------
goaccess     | None
goaccess     |
goaccess     | LOADING TRAEFIK LOGS
goaccess     | -------------------------------
goaccess     |
goaccess     |  Adding proxy logs...
goaccess     |           Filename: /opt/log/access.log | Read = yes
goaccess     | Found (1) proxy logs...
goaccess     |
goaccess     | EXCLUDE IPS
goaccess     | -------------------------------
goaccess     | None
goaccess     |
goaccess     | DEBUG
goaccess     | -------------------------------
goaccess     | ON
goaccess     |
goaccess     | Setting GeoIP Database
goaccess     | -------------------------------
goaccess     | DEFAULT
goaccess     |
goaccess     | SKIP ARCHIVED LOGS
goaccess     | -------------------------------
goaccess     | FEATURE NOT AVAILABLE FOR TRAEFIK
goaccess     |
goaccess     | RUN TRAEFIK GOACCESS
goaccess    |  [SETTING UP STORAGE /opt/log/access.log] {0} @ {0/s}
traefik        | time="2023-02-15T13:56:17+01:00" level=info msg="Configuration loaded from file: /traefik.yml"
goaccess     | Accepted: 14 [127.0.0.1]
goaccess     | Handling read 14 [127.0.0.1]...
goaccess     | Active: 1
goaccess     | Handling read 14 [127.0.0.1]...
goaccess     | CLOSE
goaccess     | Closing TCP 14 [127.0.0.1]

traefik access.log example 90.518.67.127 - - [15/Feb/2023:12:30:02 +0000] "GET /apps/richdocumentscode/proxy.php?req=/hosting/capabilities HTTP/1.1" 200 181 "-" "Nextcloud Ser>90.518.67.127 - pi [15/Feb/2023:12:30:09 +0000] "GET /api/overview HTTP/2.0" 200 504 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.>

xavier-hernandez commented 1 year ago

@LordWurstebrot thanks for the example, let me try later today on my local.

xavier-hernandez commented 1 year ago

@LordWurstebrot did your example get cutoff? Can you post it somewhere else so I can download it?

Thanks

xavier-hernandez commented 1 year ago

It worked for me. Does it show you 0 or does it fail to work altogether?

image
LordWurstebrot commented 1 year ago

Very strange. That's how it looks for me: Screenshot_20230217-221207

xavier-hernandez commented 1 year ago

@LordWurstebrot did you ever get this working?

LordWurstebrot commented 1 year ago

@xavier-hernandez no but I didn't had time to investigate further.