goaccess icon indicating copy to clipboard operation
goaccess copied to clipboard

Unraid Docker Template for GoAccess

Open masterwishx opened this issue 2 years ago • 40 comments

im using GregYankovoy/docker-goaccess and its working after all problems.. but its v1.4 Now im trying to create this docker for unraid but its not starting . this is my config is it right ? maybe im missing something for start ? tryed ports 8080:7890 , 7890:7890 what is right ports ?

image image

masterwishx avatar Dec 09 '21 11:12 masterwishx

It should be 7890. Though, I'm not sure how you have it set up.

allinurl avatar Dec 11 '21 02:12 allinurl

changed to 7890:7890 it was 8080:7890 becase its wrote in docs: image

this run after changed :

image

but how to add (goaccess --somethink) after container builded and not started ? goaccess --no-global-config --config-file=/access/goaccess.conf becose in GregYankovoy/docker-goaccess it was builded inside of container : goaccess --somethink

CMD ["sh" "/usr/local/bin/goaccess.sh"] (# ready to go /sbin/tini -s -- nginx -c /opt/nginx.conf /sbin/tini -s -- goaccess --no-global-config --config-file=/config/goaccess.conf)

masterwishx avatar Dec 11 '21 10:12 masterwishx

Glad that did the trick. Thanks for sharing that.

Safe to close this?

allinurl avatar Dec 12 '21 01:12 allinurl

Glad that did the trick. Thanks for sharing that.

Safe to close this?

No, I still can't run it, how to add command line goaccess - something?

masterwishx avatar Dec 12 '21 07:12 masterwishx

I mean container is stopped after creation, becose it need to be runner with command (goaccess --no-global-config --config-file=/access/goaccess.conf) I think, but I don't know where to put it and how to add it to container?

masterwishx avatar Dec 12 '21 07:12 masterwishx

fixed by adding needed line to post argument :

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker create --name='goaccess2' --net='proxynet' -e TZ="Asia/Jerusalem" -e HOST_OS="Unraid" -e 'PUID'='99' -e 'PGID'='100' -p '7890:7890/tcp' -v '/mnt/user/appdata/goaccess2/data/':'/goaccess':'rw' -v '/mnt/user/Logs/NginxProxyManager/proxy_logs.log':'/goaccess/access.log':'rw' -v '/mnt/user/appdata/goaccess2/html/index.html':'/goaccess/index.html':'rw' 'allinurl/goaccess' /goaccess --no-global-config --config-file=/goaccess/goaccess.conf

but having some problem : image

masterwishx avatar Dec 12 '21 09:12 masterwishx

Looks like a path issue. Have you tried running it as (please change the paths accordingly):

$ echo 'log-format VCOMBINED' > /home/user/goaccess.conf
$ sudo mkdir /srv
$ sudo cat access.log | docker run -v /home/user/goaccess.conf:/srv/goaccess.conf --rm -i -e LANG=$LANG allinurl/goaccess -a -o html -p /srv/goaccess.conf - > report.html

allinurl avatar Dec 13 '21 03:12 allinurl

Yes i know but dont know how to fix it i dont have a lot expireience in dockers and Unraid template but tryed to change volume from /goaccess to [/var/www/goaccess] like in docker but still need post argument command to run after container created and started and first it what log file ... but if i write log path its not working ... i will try like you said but not shure how tranform it to unraid temlate

masterwishx avatar Dec 13 '21 18:12 masterwishx

Sorry, I can't help you with Unraid as I have not used it. Take a look at that example I posted and see if you are able to match that to the config in Unraid. Let me know if that helps or if you find a solution.

allinurl avatar Dec 14 '21 23:12 allinurl

OK i will try Thanks

masterwishx avatar Dec 17 '21 16:12 masterwishx

Any updates on this? Take a look at this post, maybe related.

allinurl avatar Dec 21 '21 03:12 allinurl

Any updates on this? Take a look at this post, maybe related.

Thanks , its really like my problem in Unraid , i also founded that goaccess in start command is no needed . but i still cant get it working somehow ,i even changed all values like in example.. image

Dont know if its good i used /var/www/goaccess when its start , i dont have log and container restart always i will try to remove and install from start it

masterwishx avatar Dec 21 '21 16:12 masterwishx

i installed from start and entered values like in example ,but having error image image

masterwishx avatar Dec 21 '21 16:12 masterwishx

im really dont know what else to do , gregyankovoy/goaccess work well but old version i think i need to check what he did more closly inside container and commands on github ...

masterwishx avatar Dec 21 '21 16:12 masterwishx

With this setting also no logs of container and no webUI but i can get to console also having a lot of cpu usage like 25% image

dont know what to do ....

masterwishx avatar Dec 22 '21 13:12 masterwishx

should be root:root used in container direcotory ? tryed to change to root but same ..... changed back to nobody:users in container using 99:100

masterwishx avatar Dec 23 '21 13:12 masterwishx

Are you able to post this question to the unraid folks/project? They may have better insights on this issue as it sounds it's a config issue. Let me know if they have some feedback. Thanks

allinurl avatar Dec 23 '21 18:12 allinurl

100% its config issue, i already asked if some one using official version ,but no answer in Unraid forum,also made a CA Template Request - GoAccess #306 (https://github.com/selfhosters/unRAID-CA-templates/issues/306) but like i said befor there is old temlate that using in Unraid gregyankovoy/goaccess.

masterwishx avatar Dec 30 '21 07:12 masterwishx

Any update on this? is there a working configuration for Unraid?

lordraiden avatar Mar 07 '22 22:03 lordraiden

Any update on this? is there a working configuration for Unraid?

No , or i dont know how to adopt it ,the only working docker for unraid is https://github.com/GregYankovoy/docker-goaccess but with old version

masterwishx avatar Mar 08 '22 16:03 masterwishx

@masterwishx have you tried updating the Dockerfile from v1.4 to 1.5.5?

allinurl avatar Mar 08 '22 21:03 allinurl

@masterwishx have you tried updating the Dockerfile from v1.4 to 1.5.5?

No, I wanted and made copy of his github but I need to upload docker image but don't have much time for now

masterwishx avatar Mar 09 '22 08:03 masterwishx

we have now working container for unraid

goaccess-for-nginxproxymanager

masterwishx avatar Mar 11 '22 11:03 masterwishx

@masterwishx Thanks for sharing that link!

allinurl avatar Mar 11 '22 14:03 allinurl

@masterwishx Thanks for sharing that link!

Founded only today, posted yesterday in Unraid CA apps

masterwishx avatar Mar 11 '22 14:03 masterwishx

@masterwishx Thanks for sharing that link!

https://github.com/xavier-hernandez/goaccess-for-nginxproxymanager/issues/28 i founded a lot of CPU usage and i can see like 15000 request adding every second ...

masterwishx avatar Mar 19 '22 18:03 masterwishx

@allinurl

Thanks for sharing that link!

Do you know maybe what the problem can be and where to look to solve issue? i have a lot of request every second and so a lot of CPU usage but some days befor the problem is gone and now its back https://github.com/xavier-hernandez/goaccess-for-nginxproxymanager/issues/28 Many Thanks

masterwishx avatar Mar 25 '22 15:03 masterwishx

@masterwishx I'd run goaccess directly without docker, and see if the issue persists, we want to make sure the layers on top are not the culprit. Also, where are you seeing 15K reqs/sec?

allinurl avatar Mar 28 '22 03:03 allinurl

Sorry, I didn't saw you answer befor. Can you please see https://github.com/xavier-hernandez/goaccess-for-nginxproxymanager/issues/38 But in old container of GregYankov goaccess v 1.4 for unraid I don't have this problem

masterwishx avatar Apr 19 '22 11:04 masterwishx

i see it in webUI (Total Requests,VIRTUAL HOSTS,Tx. Amount) also another user confirmed have this issue

image

masterwishx avatar Apr 19 '22 11:04 masterwishx