What am I missing? Trying to this working on my nginx logs. :}
core@dc /$ docker run voxxit/goaccess -f greptweet.access.log -c
GoAccess - version 0.9 - Mar 25 2015 14:39:32
Fatal error has occurred
Error occured at: src/parser.c - parse_log - 1650
No time format was found on your conf file.
core@dc /$ docker run voxxit/goaccess -c
GoAccess - version 0.9 - Mar 25 2015 14:39:32
Fatal error has occurred
Error occured at: src/parser.c - parse_log - 1650
No time format was found on your conf file.
core@dc /$ docker run voxxit/goaccess --version
GoAccess - 0.9.
For more details visit: http://goaccess.io
Copyright (C) 2009-2014 GNU GPL'd, by Gerardo Orellana
Please make sure you have the time-format variable set in your config file. May need to uncomment this line from your config file.
I don't have a config file. Isn't -c supposed to create one?
-c will prompt for a config dialog only if you are passing a file -f to parse (not when reading from STDIN).
Usually the config file is located under:
~/.goaccessrc
or
%sysconfdir%/goaccess.conf
where %sysconfdir% is either /etc/, /usr/etc/ or /usr/local/etc/
Otherwise, you can copy the config file from master and use -p /path/goaccess.config
I think there must be some issue with the containerized binary not getting access to my local filesystem.
goaccess -c -f ~/.goaccess works on my Archlinux machine.
docker run voxxit/goaccess -c -f ~/.goaccessrc does not.
I downloaded your config file, uncomment the time format section and it still doesn't work.
core@dc ~ $ docker run voxxit/goaccess -c -f goaccess.conf
GoAccess - version 0.9 - Mar 25 2015 14:39:32
Fatal error has occurred
Error occured at: src/parser.c - parse_log - 1650
No time format was found on your conf file.
core@dc ~ $ grep ^time goaccess.conf
time-format %H:%M:%S
core@dc ~ $
Further clue:
core@dc ~ $ docker run voxxit/goaccess -p goaccess.conf
GoAccess - version 0.9 - Mar 25 2015 14:39:32
Fatal error has occurred
Error occured at: src/settings.c - get_config_file_path - 90
Unable to open the specified config file. No such file or directory
Make sure you are using -p instead of -f, for example:
goaccess -f /var/log/nginx/access.log -p goaccess.conf
-c is not needed in this particular case.
I've worked out:
docker run -v $(pwd):/logs voxxit/goaccess -f /logs/greptweet.access.log -p /logs/goaccess.conf
Works, but it only generates a HTML output IIUC. Not interactive. Is there was to trigger an interactive terminal?
goaccess -f /logs/greptweet.access.log -p /logs/goaccess.conf
That should generate a terminal output (similar to this) where you can interact with. What are you getting?
Just streaming HTML text. I guess it failed to detect an interactive terminal ?
Is output-format commented out in your config file?
Closing this. Feel free to reopen it if needed.
I have a similar problem but with latest 1.2
The generated config file was empty so I had this error. Adding different options I had all the HTML logged into the docker log instead of the web.
I have used the config file in github and set this options (and provided the files in the /srv/data):
time-format %H:%M:%S
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
log-format COMBINED
geoip-database /srv/data/GeoLiteCity.dat
log-file /srv/data/access_log
output-format /srv/data/file.html
real-time-html true
The problem is that when I set daemonize, either in options or via --daemonize in supervisord I get this error:
/usr/bin/goaccess: unrecognized option: daemonize
I have rebuilt the image with the v1.2 code but I receive the same error.
Cheers,
The problem is that the goaccess version is v1.1.1 instead of v1.2
I have no idea why goaccess -V reports 1.1.1 using the online docker image.
I have built a new image using the github code, checked that there is a "daemonize" option in options.c, but still when I build and run the container the goaccess -V still reports v1.1.1 and no daemonize option.
Ok, I respond to myself. As seen in other post the current Dockerfile uses alpine apk manager to update goaccess that its still v.1.1.1. The source fetched from the github repo is still not used in the Dockerfile to build the latest goaccess v1.2.0 that has the daemonize option.
@Jacq @julianxhokaxhiu interesting, Alpine appears to have v1.2 on the main repo.
I'll take a look if we can provide a binary release based on github releases. This way we don't need to use Alpine package manager.
@Jacq which docker file did you use? From the docker build status page, it should be building v1.2. Alpine does have v1.2. Please try again and let me know how it goes. Here are the Docker details.
I have just clean everything and run:
docker run --restart=always -d -p 8200:8080 -v "/root/docker/goaccess/data:/srv/data" --name goaccess allinurl/goaccess
Unable to find image 'allinurl/goaccess:latest' locally
latest: Pulling from allinurl/goaccess
627beaf3eaaf: Already exists
9c7c365ac2ed: Pull complete
e13ae3a9ef1c: Pull complete
1b9ca3863ef2: Pull complete
455087d74b0a: Pull complete
184f28b7179f: Pull complete
dae0078f0156: Pull complete
0d64cc8f2963: Pull complete
Digest: sha256:7d7b970aa773b5fae85f9ad45150ab055e667acb63ad71d08ace656c4d6f9ff3
Status: Downloaded newer image for allinurl/goaccess:latest
424922f4c6244a5b27d607d39175463e78a50dc4c046207222be72c82f0e4011
Then looking in the log
/usr/bin/goaccess: unrecognized option: daemonize
2017-04-01 16:20:27,643 INFO exited: goaccess (exit status 1; not expected)
2017-04-01 16:20:27,643 INFO exited: goaccess (exit status 1; not expected)
@Jacq OK, please try again, I just tested this and it should now let you pull the latest version (from Alpine edge).
BTW, if necessary, I also added some instructions here.
Thanks @allinurl, its working now.
The only issue I found related to the instructions is that "ws-url 172.17.0.2" should point to the IP of the docker host not the container. The 172.X.X.X container IP is located in a private bridge network shared between the container and the host and if you open the index.html from a external computer it cannot reach the goaccess container. So ws-url should point to the docker host public IP address and exposed port address as:
ws-url 172.17.0.2:
I didn't found information in the docs but I wonder if it is possible to access index.html through http://ws_url/someroute instead of having to copy it locally from the report path.
Thanks for your work is really an impressive, complete and visual appealing report analyzer.
Cheers
Jacq
@Jacq Glad that worked :)
As far as the port is concerned. If you are running on a different port, i.e.,
docker run --restart=always -d -p 8080:7890 ...
Then you can simply set the external port within ws-url. e.g., ws-url ws://localhost:8080 and keep GoAccess internal port in your config file set to port 7890. That should do it.
GoAccess doesn't have a WebServer built-in, so you will need to share a volume with another Docker container and that can serve the generated report.
BTW, I Docker instructions, please the let me know if that looks right to you.
The instructions look good to me. Before them I thought that I need to also to set --daemonize for docker version as commented in #660.
Thanks
@Jacq Unless I'm missing something, it's not needed and I think it's fine without setting --daemonize. Passing -d to docker should detach the container from the shell.
Most helpful comment
I'll take a look if we can provide a binary release based on github releases. This way we don't need to use Alpine package manager.