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

Docker stuck on RUN TRAEFIK GOACCESS #159

Closed VozDeOuro closed 1 year ago

VozDeOuro commented 1 year ago

the docker get stuck in this part and never leaves it Web panel is still all on 0

 [SETTING UP STORAGE /opt/log/access.log] {0} @ {0/s}
WebSocket server ready to accept new client connections

GOAN v1.1.19

NGINX SETUP...

NGINX BASIC AUTH
-------------------------------
None

LOADING TRAEFIK LOGS
-------------------------------

        Adding proxy logs...
         Filename: /opt/log/access.log | Read = yes
Found (1) proxy logs...

EXCLUDE IPS
-------------------------------
None

DEBUG
-------------------------------
OFF

Setting GeoIP Database
-------------------------------
DEFAULT

SKIP ARCHIVED LOGS
-------------------------------
FEATURE NOT AVAILABLE FOR TRAEFIK

RUN TRAEFIK GOACCESS
xavier-hernandez commented 1 year ago

can you send me your compose file?

VozDeOuro commented 1 year ago

image

xavier-hernandez commented 1 year ago

are the logs your consuming in Traefik format?

VozDeOuro commented 1 year ago

Yes, the name of the file is crowdsec but the traefic log is inside there, so yes

are the logs your consuming in Traefik format?

xavier-hernandez commented 1 year ago

can you provide a sample of the logs?

VozDeOuro commented 1 year ago

can you provide a sample of the logs?

sure here is some lines if you want more just tell me

nal" "-" 0ms
192.168.0.7 - - [09/Apr/2022:10:37:57 +0000] "GET /api/overview HTTP/1.1" 200 494 "-" "-" 20547 "api@internal" "-" 0ms
192.168.0.7 - - [09/Apr/2022:10:37:57 +0000] "GET /api/http/routers?search=&status=&per_page=20&page=1 HTTP/1.1" 200 4699 "-" "-" 20548 "api@internal" "-" 0ms
192.168.0.7 - - [09/Apr/2022:10:38:02 +0000] "GET /api/overview HTTP/1.1" 200 494 "-" "-" 20549 "api@internal" "-" 0ms
192.168.0.7 - - [09/Apr/2022:10:38:02 +0000] "GET /api/http/routers?search=&status=&per_page=20&page=1 HTTP/1.1" 200 4699 "-" "-" 20550 "api@internal" "-" 0ms
192.168.0.7 - - [09/Apr/2022:10:38:07 +0000] "GET /api/overview HTTP/1.1" 200 494 "-" "-" 20551 "api@internal" "-" 0ms
192.168.0.7 - - [09/Apr/2022:10:38:07 +0000] "GET /api/http/routers?search=&status=&per_page=20&page=1 HTTP/1.1" 200 4699 "-" "-" 20552 "api@internal" "-" 0ms
xavier-hernandez commented 1 year ago

I think that the first row is probably what is causing the problem. I recently added something to nginx logs to skip over that let me add that to the traefik function.

VozDeOuro commented 1 year ago

the first roll was because i copy wrong it just saw it

VozDeOuro commented 1 year ago

@xavier-hernandez do you have any idea ?

xavier-hernandez commented 1 year ago

sorry, I'll look into this tomorrow 8/27 and should have a build for you

VozDeOuro commented 1 year ago

thx @xavier-hernandez if you want anything else, text me on discord: vozdeouro I can provide you more info and logs if you want

xavier-hernandez commented 1 year ago

So I've updated the develop branch with a change. The change... by default goaccess reads X amount of rows from the log and if there is an error in the reading a line it stops processing the file. I've updated the TREAFIK version of the code to skip over this. I was able to read the sample log you gave me with no problem so maybe the issue was further down the log.

Also, looking at your screenshot other than pointing to the develop tag please turn off DEBUG.

So... docker pull xavierh/goaccess-for-nginxproxymanager:develop and DEBUG = FALSE

Let me know if that works.

VozDeOuro commented 1 year ago

It doesn't fix it is there any other info that i can provide ?

VozDeOuro commented 1 year ago

i think i found the problem it's trying to read other .log files that are in the folder is there a way to you to implement a var that i can choose the name of the log file

VozDeOuro commented 1 year ago

Yes that was the problem I force the traffic to save the logs with another name but would be nice to be able to choose the log file name on the variables Thanks for you time @xavier-hernandez

xavier-hernandez commented 1 year ago

what are the names of the files? are they all in the same sub directory?

VozDeOuro commented 1 year ago

what are the names of the files? are they all in the same sub directory?

yes sure

traefik.log
authelia.log
access.log
xavier-hernandez commented 1 year ago

are all 3 in traefik log format?

VozDeOuro commented 1 year ago

Just those access.log traefik.log

VozDeOuro commented 1 year ago

but before access.log Was not traefic

xavier-hernandez commented 1 year ago

I had a flag set up for NCSA_COMBINED so you can pass it a pattern. I've moved the same functionality to TRAEFIK. So now if you pull down develop again, add this parameter, and it should read all log files.

docker pull xavierh/goaccess-for-nginxproxymanager DEBUG= FALSE LOG_TYPE_FILE_PATTERN="*.log" LOG_TYPE=TRAEFIK

VozDeOuro commented 1 year ago

txh