Giter Site home page Giter Site logo

xavier-hernandez / goaccess-for-nginxproxymanager Goto Github PK

View Code? Open in Web Editor NEW
484.0 12.0 38.0 989.23 MB

GoAccess Docker Image for Nginx Proxy Manager and more...

Home Page: https://hub.docker.com/r/xavierh/goaccess-for-nginxproxymanager

License: MIT License

Dockerfile 5.35% Shell 94.65%
goaccess nginx nginx-proxy analytics logs traefik

goaccess-for-nginxproxymanager's Introduction

GoAccess for Nginx Proxy Manager Logs

Still in development... You might need to wait a bit if you have a large amount of logs for it to parse.

Parses the following log types:

  • NPM
  • NPM Redirection
  • NPM Error
  • Traefik
  • Load your own custom config as well to parse other logs

Alt text

Dependencies:

  • GoAccess version: 1.9.2
  • GeoLite2-City.mmdb (2024-04-21)
  • GeoLite2-Country.mmdb (2024-04-21)
  • GeoLite2-ASN.mmdb (2024-04-21)

Docker

Github Repo


version: '3.3'
services:
    goaccess:
        image: 'xavierh/goaccess-for-nginxproxymanager:latest'
        container_name: goaccess
        restart: always
        ports:
            - '7880:7880'
        environment:
            - TZ=America/New_York         
            - SKIP_ARCHIVED_LOGS=False #optional
            - DEBUG=False #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=NPM #optional - more information below
            - ENABLE_BROWSERS_LIST=True #optional - more information below
            - CUSTOM_BROWSERS=Kuma:Uptime,TestBrowser:Crawler #optional - comma delimited, more information below
            - HTML_REFRESH=5 #optional - Refresh the HTML report every X seconds. https://goaccess.io/man
            - KEEP_LAST=30 #optional - Keep the last specified number of days in storage. https://goaccess.io/man
            - PROCESSING_THREADS=1 #optional - This parameter sets the number of concurrent processing threads in the program's execution, affecting log data analysis, typically adjusted based on CPU cores. Default is 1. https://goaccess.io/man
        volumes:
        - /path/to/host/nginx/logs:/opt/log
        - /path/to/host/custom:/opt/custom #optional, required if using log_type = CUSTOM

If you have permission issues, you can add PUID and PGID with the correct user id that has read access to the log files.

version: '3.3'
services:
    goaccess:
        image: 'xavierh/goaccess-for-nginxproxymanager:latest'
        container_name: goaccess
        restart: always
        ports:
            - '7880:7880'
        environment:
            - PUID=0
            - PGID=0
            - TZ=America/New_York         
            - SKIP_ARCHIVED_LOGS=False #optional
            - DEBUG=False #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=NPM #optional - more information below
            - ENABLE_BROWSERS_LIST=True #optional - more information below
            - CUSTOM_BROWSERS=Kuma:Uptime,TestBrowser:Crawler #optional - comma delimited, more information below
            - HTML_REFRESH=5 #optional - Refresh the HTML report every X seconds. https://goaccess.io/man
            - KEEP_LAST=30 #optional - Keep the last specified number of days in storage. https://goaccess.io/man
            - PROCESSING_THREADS=1 #optional - This parameter sets the number of concurrent processing threads in the program's execution, affecting log data analysis, typically adjusted based on CPU cores. Default is 1. https://goaccess.io/man
        volumes:
        - /path/to/host/nginx/logs:/opt/log
        - /path/to/host/custom:/opt/custom #optional, required if using log_type = CUSTOM
Parameter Function
-e SKIP_ARCHIVED_LOGS=True/False (Optional) Defaults to False. Set to True to skip archived logs, i.e. proxy-host*.gz
-e DEBUG=True/False (Optional) Displays more information in the docker logs. This mode also checks logs for parsing errors.
-e BASIC_AUTH=True/False (Optional) Defaults to False. Set to True to enable nginx basic authentication. Docker container needs to stopped or restarted each time this flag is modified. This allows for the .htpasswd file to be changed accordingly.
-e BASIC_AUTH_USERNAME=user (Optional) Requires BASIC_AUTH to bet set to True. Username for basic authentication.
-e BASIC_AUTH_PASSWORD=pass (Optional) Requires BASIC_AUTH to bet set to True. Password for basic authentication.
-e EXCLUDE_IPS= (Optional) IP Addresses or range of IPs delimited by comma refer to https://goaccess.io/man. For example: 192.168.0.1-192.168.0.100 or 127.0.0.1,192.168.0.1-192.168.0.100
-e INCLUDE_PROXY_HOSTS= (Optional) Only consume the list of provided proxy hosts. This is a comma separated list containing the proxy host number for example "11,21". This would consume proxy-host-11_access.log* and proxy-host-21_access.log* . The host number can be found right clicking on the 3 dots on the proxy host line in the GUI.
-e LOG_TYPE= (Optional) By default the configuration will be set to read NPM logs. Options are: CUSTOM, NPM, NPM+R, TRAEFIK, NCSA_COMBINED. More information below.
-e LOG_TYPE_FILE_PATTERN= (Optional) Only to be used with LOG_TYPE=NCSA_COMBINED or TRAEFIK. This parameter will pass along the file type you are trying match. For example you can pass -e LOG_TYPE_FILE_PATTERN="*.log" or -e LOG_TYPE_FILE_PATTERN="access.log". The default is *.log. Please keep it simple as I have not tested this completely. Use at your own RISK!
-e LANG=zh_CN.UTF-8 -e LANGUAGE=zh_CN.UTF-8 (Optional) Language localization added. GoAccess only has a few translations available. Please visit https://github.com/allinurl/goaccess/tree/master/po to see the translations available.

Current Translations
de - German
es - Spanish
fr - French
it - Italian
ja - Japanese
ko - Korean
pt_BR - Portuguese (Brazil)
ru - Russian
sv - Swedish
uk - English (United Kingdom)
zh_CN - Chinese - Simplified
-e ENABLE_BROWSERS_LIST=True/False (Optional) Defaults to False. Set to true if you would like to enable the goaccess browsers.list file.
-e CUSTOM_BROWSERS= - (Optional) Consumes the list of provided custom browsers. This is a comma separated list containing the custom browser(s) in the format Browser:Browser_category.
- If your custom browser is already defined in the default browsers.list file, it will not be added. However, the Browser_category can be reused.

CUSTOM_BROWSERS list example: Kuma:Crawlers,TestBrowser:Crawlers,Kuma:Uptime,Discordbot:Crawlers

For the example above, only Kuma:Crawlers and TestBrowser:Crawlers will be appended to the browsers.list file.

Kuma:Uptime is ignored as the browser Kuma has already been defined in Kuma:Crawlers. Discordbot:Crawlers is ignored as the browser Discordbot is already defined in the default browsers.list file

Note for users using CUSTOM LOG_TYPE:

If your goaccess.conf file references a browsers.list file other than the one located in the /goaccess-config/ directory, the CUSTOM_BROWSERS variable will be ignored.
-e HTML_REFRESH= (Optional) Refresh the HTML report every X seconds. https://goaccess.io/man
-e KEEP_LAST= (Optional) Keep the last specified number of days in storage. https://goaccess.io/man
-e PROCESSING_THREADS= (Optional) This parameter sets the number of concurrent processing threads in the program's execution, affecting log data analysis, typically adjusted based on CPU cores. Default is 1.

Additional environment information

-e LOG_TYPE=

  • Options:
    • CUSTOM

      • this feature will load your own configuration
      • an additional volume must be included
        • /path/to/host/custom:/opt/custom
      • volume should include
        • goaccess.conf
          • this is your custom config
          • container will exit if no file is found
          • leave the default port number at 7890
      • environment parameters that will not work and will be ignored
        • SKIP_ARCHIVED_LOGS
        • EXCLUDE_IPS
    • NPM (default if variable is empty or not included)

      • the following file(s) are read and parsed.
        • proxy-host-*_access.log.gz
        • proxy-host-*_access.log
        • proxy*host-*.log
    • NPM+R

      • a second instance of GOACCESS is created
      • append "/redirection" to the url to access the instance, for example http://localhost:7880/redirection/
      • the following file(s) are read and parsed:
        • redirection*host-*.log*.gz
        • redirection*host-*.log
        • fallback_access.log*.gz
        • fallback_access.log
        • dead-host*.log*.gz
        • dead-host*.log
    • NPM+ALL

      • a second and third instance of GOACCESS are created
        • append "/redirection" to the url to access the instance, for example http://localhost:7880/redirection/
          • the following file(s) are read and parsed.
            • redirection*host-.log.gz
            • redirection*host-*.log
        • append "/error" to the url to access the instance, for example http://localhost:7880/error/
          • the following file(s) are read and parsed.
            • *_error.log*.gz
            • *_error.log
          • "error" log files sometimes have inconsistent log types and there isn't a way to process these. GoAccess does process files that have at least 1 error log in the files in the correct format. Viewing the docker container logs will tell you which files have been skipped.
    • TRAEFIK

      • environment parameters that will not work and will be ignored

        • SKIP_ARCHIVED_LOGS
      • the following file(s) are read and parsed.

        • access.log
      • You can also set the following environment variables yourself to override the defaults

        • TIME_FORMAT
        • DATE_FORMAT
        • LOG_FORMAT
        FOR EXAMPLE
        ---------------------------------
        TIME_FORMAT=%H:%M:%S
        DATE_FORMAT=%Y-%m-%d
        LOG_FORMAT='{"ClientHost": "%h", "ClientUsername": "%e", "DownstreamContentSize": "%b", "Duration": "%n", "DownstreamStatus": "%s", "RequestAddr": "%v", "RequestMethod": "%m", "RequestPath": "%U", "RequestProtocol": "%H", "StartUTC": "%dT%t.%^", "request_User-Agent": "%u"}'
        
    • NCSA_COMBINED

      • environment parameters that will not work and will be ignored
        • SKIP_ARCHIVED_LOGS
      • by default the following file(s) are read and parsed.
        • *.log
    • NGINX_ACCESS

      • the following file(s) are read and parsed.
        • access.log

LOG FORMATS

NPM PROXY LOG FORMAT

time-format %T
date-format %d/%b/%Y
log_format [%d:%t %^] %^ %^ %s - %m %^ %v "%U" [Client %h] [Length %b] [Gzip %^] [Sent-to %^] "%u" "%R"

NPM REDIRECTION LOG FORMAT

time-format %T
date-format %d/%b/%Y
log_format [%d:%t %^] %s - %m %^ %v "%U" [Client %h] [Length %b] [Gzip %^] "%u" "%R"

NPM ERROR LOG FORMAT

time-format %T
date-format %Y/%m/%d
log_format %d %t %^: %v, %^: %h, %^ %v %^"%r" %^

TRAEFIK ACCESS LOG FORMAT

time-format %T
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u" %Lm"

NGINX ACCESS LOG FORMAT

time-format %T
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"

Possible/Known Issues

  • A lot of CPU Usage and 10000 request every second in webUI
  • If your using NPM to proxy the container you need to turn on websockets support
  • LOG_TYPE=NPM+ALL
    • "error" log files sometimes have inconsistent log types and there isn't a way to process these. GoAccess does process files that have at least 1 error log in the files in the correct format. Viewing the docker container logs will tell you which files have been skipped.
  • Debug=True
    • The version of this application, (GOAN vX), does not get displayed in the left side toolbar on purpose. In debug mode I don't want many customizations.

Thanks

To https://github.com/GregYankovoy for the inspiration, and for their nginx.conf :)

Users:

  • Just5KY
  • martadinata666

Disclaimer

This product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com.

goaccess-for-nginxproxymanager's People

Contributors

just5ky avatar robertd502 avatar webysther avatar xavier-hernandez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

goaccess-for-nginxproxymanager's Issues

start.sh failed: Permission denied

After the latest update, I see the below errors in my container logs. Watchtower updated the container on 28-09. I cannot tell for sure if this was caused by this update because nginxproxymanager was also updated today so could be that too?

[FATAL tini (7)] exec /goan/start.sh failed: Permission denied

I checked the permission for the user that I am using for goaccess stack and the user does seem to have access to the logs folder.

I am running goaccess on a raspberrypi (open media vault 6.x)

GoAccess dont get npm logs?

I run NPM in an docker container with the following map /root/npm/data -> /data

when i add a new container:


docker create -it \
--name=Goaccess \
--restart=always \
-p 7880:7880 \
-v /root/npm/data/logs:/opt/log \
-e SKIP_ARCHIVED_LOGS=False \
xavierh/goaccess-for-nginxproxymanager:latest


I can open the page but it stays by zero.

ls -la (/root/npm/data/logs)



total 1087060
drwxr-xr-x 2 root root      4096 Mar 21 18:38  .
drwxr-xr-x 8 root root      4096 May  2  2021  ..
-rw-r--r-- 1 root root  68288072 Mar 21 18:48  default.log
-rw-r--r-- 1 root root  63622832 Mar 21 19:10  default_host.log
-rw-r--r-- 1 root root   5975518 Mar 21 18:17  error.log
-rw-r--r-- 1 root root     36717 Mar  6 12:27  letsencrypt-requests.log
-rw-r--r-- 1 root root        42 Mar 21 18:38 'og-format=%h %^[%d:%t %^] %v "%r" "%s" %b "%R" "%u" %^'
-rw-r--r-- 1 root root  34559380 Mar 21 19:10  proxy_host-1.log
-rw-r--r-- 1 root root    111554 Oct 12 03:23  proxy_host-12.log
-rw-r--r-- 1 root root     63496 Jul  4  2021  proxy_host-16.log
-rw-r--r-- 1 root root  14267140 Oct 12 03:28  proxy_host-17.log
-rw-r--r-- 1 root root    161921 Jul 18  2021  proxy_host-18.log
-rw-r--r-- 1 root root       598 Aug 20  2021  proxy_host-19.log
-rw-r--r-- 1 root root    609702 Dec 31 05:01  proxy_host-2.log
-rw-r--r-- 1 root root     78830 Nov  4 12:46  proxy_host-20.log
-rw-r--r-- 1 root root         0 Nov  6 22:05  proxy_host-21.log
-rw-r--r-- 1 root root         0 Nov  6 22:05  proxy_host-22.log
-rw-r--r-- 1 root root    278802 Jan  1 03:18  proxy_host-23.log
-rw-r--r-- 1 root root  24156909 Jan  1 22:13  proxy_host-24.log
-rw-r--r-- 1 root root   1073652 Mar 21 12:27  proxy_host-25.log
-rw-r--r-- 1 root root     24098 Nov 12 17:34  proxy_host-26.log
-rw-r--r-- 1 root root    105417 Nov 29 12:05  proxy_host-27.log
-rw-r--r-- 1 root root     13086 Nov 12 17:34  proxy_host-28.log
-rw-r--r-- 1 root root     15239 Nov 12 20:54  proxy_host-29.log
-rw-r--r-- 1 root root  58394594 Mar 21 19:12  proxy_host-3.log
-rw-r--r-- 1 root root     15617 Nov 12 20:54  proxy_host-30.log
-rw-r--r-- 1 root root      5904 Nov 12 20:54  proxy_host-31.log
-rw-r--r-- 1 root root      5896 Nov 12 23:01  proxy_host-32.log
-rw-r--r-- 1 root root      9349 Nov 13 01:20  proxy_host-33.log
-rw-r--r-- 1 root root    309088 Dec 29 16:43  proxy_host-34.log
-rw-r--r-- 1 root root      4788 Nov 25 14:22  proxy_host-35.log
-rw-r--r-- 1 root root      4117 Nov 13 01:21  proxy_host-36.log
-rw-r--r-- 1 root root         0 Nov 13 01:22  proxy_host-37.log
-rw-r--r-- 1 root root         0 Nov 13 01:22  proxy_host-38.log
-rw-r--r-- 1 root root      4110 Nov 13 01:22  proxy_host-39.log
-rw-r--r-- 1 root root         0 Nov 13 22:46  proxy_host-40.log
-rw-r--r-- 1 root root     54045 Dec 31 12:51  proxy_host-41.log
-rw-r--r-- 1 root root     25215 Dec 28 10:55  proxy_host-42.log
-rw-r--r-- 1 root root         0 Nov 25 07:56  proxy_host-43.log
-rw-r--r-- 1 root root         0 Nov 25 07:57  proxy_host-44.log
-rw-r--r-- 1 root root      2525 Nov 28 01:41  proxy_host-45.log
-rw-r--r-- 1 root root     12328 Nov 28 01:40  proxy_host-46.log
-rw-r--r-- 1 root root      8839 Nov 28 01:39  proxy_host-47.log
-rw-r--r-- 1 root root    139091 Mar 20 22:45  proxy_host-48.log
-rw-r--r-- 1 root root    323933 Mar 21 13:40  proxy_host-49.log
-rw-r--r-- 1 root root  63630789 Mar 21 19:12  proxy_host-5.log
-rw-r--r-- 1 root root   1013726 Jan 31 23:11  proxy_host-50.log
-rw-r--r-- 1 root root 527660441 Mar 21 19:12  proxy_host-51.log
-rw-r--r-- 1 root root     45142 Jan 10 13:04  proxy_host-52.log
-rw-r--r-- 1 root root     47567 Mar 19 05:21  proxy_host-53.log
-rw-r--r-- 1 root root     70911 Mar 21 12:27  proxy_host-54.log
-rw-r--r-- 1 root root   2734245 Mar 21 12:27  proxy_host-55.log
-rw-r--r-- 1 root root    351558 Mar 20 14:22  proxy_host-56.log
-rw-r--r-- 1 root root     27049 Mar 16 22:19  proxy_host-57.log
-rw-r--r-- 1 root root    129794 Mar 21 12:28  proxy_host-58.log
-rw-r--r-- 1 root root     31082 Mar 21 12:28  proxy_host-59.log
-rw-r--r-- 1 root root  56955513 Mar 21 19:12  proxy_host-6.log
-rw-r--r-- 1 root root    877462 Mar 18 13:58  proxy_host-60.log
-rw-r--r-- 1 root root 102583938 Mar 21 19:12  proxy_host-7.log
-rw-r--r-- 1 root root  36479510 Mar 21 19:10  redirection_host-1.log
-rw-r--r-- 1 root root  47254508 Mar 21 19:12  redirection_host-3.log
-rw-r--r-- 1 root root    212723 Nov 11 03:01  redirection_host-4.log

Unraid template

Not an issue more of a request for a unraid template on the App Store.

Custom Date Range

Is there any way to allow for custom date ranges? Sometimes I only want to see the data for the last week/month/quarter/year etc.

Live TX / RX

Live bandwidth monitoring support would be nice
Thanks

Docker compose file

Since docker-compose is now deprecated, the current format of compose file on the docker hub page is not compatible with native docker compose. The one below works.

version: '3.3'
services:
    goaccess:
        image: 'xavierh/goaccess-for-nginxproxymanager:latest'
        container_name: goaccess
        restart: always
        ports:
            - '7880:7880'
        environment:
            - PUID=0
            - PGID=0
            - TZ=America/New_York         
            - SKIP_ARCHIVED_LOGS=False #optional
            - DEBUG=False #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=NPM #optional - more information below
        volumes:
        - /path/to/host/nginx/logs:/opt/log
        - /path/to/host/custom:/opt/custom #optional, required if using log_type = CUSTOM

allow mounting of goaccess.conf

The current code does not allow the user to update the goaccess.conf. It would be nice to give the user a choice to load their own for customizations such as panels, static files, etc.

standard_init_linux.go:228: exec user process caused: exec format error

I cannot get it to work on my Raspberry Pi (full updated). Latest version of docker and Portainer. I created a stack with the below and get this error: standard_init_linux.go:228: exec user process caused: exec format error

version: "3"
services:
goaccess:
image: xavierh/goaccess-for-nginxproxymanager:latest
container_name: GoAccess
restart: always
environment:
- TZ=Europe/London
- PUID=0
- PGID=0
- SKIP_ARCHIVED_LOGS=False #optional
- BASIC_AUTH=False #optional
- BASIC_AUTH_USERNAME=user #docker admin account used
- BASIC_AUTH_PASSWORD=pass #docker admin password used
ports:
- '7880:7880'
volumes:
- /home/pi/nginx/data/logs:/opt/log

How long is a while to wait?

I have NPM and goaccess in separate docker containers and am proxying to the gaaccess container. I have websockets enabled in NPM and I see my files being loaded in the logs. There are no errors in the logs, they just end in

RUN NPM GOACCESS
Daemonized GoAccess: 31

I have waited a few hours but the webpage is still in an infinite refresh loop saying Logs processing: 26 (might take some time depending on the number of files to parse)

Yes I have 26 hosts but they are all for personal use and probably only around 50k log lines total so it shouldn't be taking this long. How can I tell if anything is actually happening?

Tutorial Video

Since I'm not sure how else to contact you, I wanted to let you know that I released a video this morning to share your GoAccess for Nginx Proxy Manager container with my YouTube audience: https://youtu.be/-CQcEWVBjQU

Parse error [arm64]

Built an image for arm64
docker build -t justsky/goaccess-for-nginxproxymanager .

Using this compose

  goaccess:
    image: justsky/goaccess-for-nginxproxymanager
    container_name: goaccess
    restart: unless-stopped
    ports:
      - 7880:7880
    volumes:
      - $DOCKERDIR/npm/data/logs:/opt/log
    environment:
      - PUID=0
      - PGID=0
      - TZ=$TZ

seeing the following parse error in logs
goaccess-2022-03-02T03-03-34.log

Unable to open goaccess/access.log

I've set this up using the docker-compose from docker hub and pointed it to my NPM logs folder but i'm getting errors :

`
gzip: /opt/log/proxy-host-_access.log.gz: No such file or directory

Checking active logs...

GoAccess - version 1.5.5 - Feb 18 2022 04:55:07

Config file: /goaccess-config/goaccess.conf

Fatal error has occurred

Error occurred at: src/parser.c - read_log - 2015

Unable to open the specified log file '/goaccess/access.log'. No such file or directory`

Multiple Log Files in goaccess.conf

Thanks for building this great tool. Appreciate it.
Sorry if its a dumb question. My log-directory consists of multiple files depending on the service e.g.:

  1. vnstat-access.log
  2. prometheus-access.log

Is it possible to wildcard the log-file-directive in the goaccess.conf-File?
I tried with asterisk but no luck.

Request: please enable redirection-host-*_access.log

Hi,

thanks for the good work. I have a wish to you.

Right now it seems that only Proxy logs are processed. I would like also to have the redirection logs redirection-host-*_access.log to be imported.

BR
Michael

Date range selector

Hi,

Would be great if there was a date range selector where you can select specific dates so to be able to review specific data.

Thanks

Support custom config file

It's great that you've updated/built upon GregYankovoy's image but it does not look like the goaccess.conf file is user-overwritable which means anyone NOT using NPM is unable to use this.

I would suggest:

Move geoip db

COPY the db into /var so its unlikely to be overwritten by mounting a volume (and update the default config to reflect the location change)

Copy default config on container start instead of in build

Instead of COPY the NPM config into /goaccess-config during build, COPY it somewhere else as a backup and then during startup check for the file and if it does not exist then copy it to the required location.

This will make it so:

  1. users can mount a host directory to /goaccess-config that contains a custom config
  2. if no config exists the default one is created in the host's directory which allows them to edit it themselves

Since the config in the current image cannot be modified by the user you should be able to make these changes without any compatibility issues for current users.

No archived logs found at /opt/log

Hi,

I get the error No archived logs found at /opt/log. I do noticed, that the logs are not contained in the container, because $ docker-compose exec goaccess ls /opt/log do not show me any log file. I have mapped the volume in my docker-compose.yml like this

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

On my host, there are plenty of files in data/logs

Doesnt´t work with Nginx Proxy Manager

Hello,

I have installed on a Raspberry pi4 the image with the LOG_TYPE=NPM for a reverse proxy service that I have running with the jc21/nginx-proxy-manager container and I have the following problem.

OFF
RUN NPM GOACCESS
[SETTING UP STORAGE /opt/log/proxy-host-4_access.log] {0} @ {0/s}
Cleaning up resources...
==27== GoAccess - version 1.6.2 - Aug 18 2022 21:53:55
==27== Config file: /goaccess-config/goaccess.conf
==27== https://goaccess.io - [email protected]
==27== Released under the MIT License.
==27==
==27== FILE: /opt/log/proxy-host-1_access.log
==27== Parsed 10 lines producing the following errors:
==27==
==27== Token '8.29.164.31 - - [20/Aug/2022' doesn't match specifier '%d'
==27== Token '92.168.1.1 - - [20/Aug/2022' doesn't match specifier '%d'
==27== Token '8.29.164.31 - - [20/Aug/2022' doesn't match specifier '%d'
==27== Token '8.29.164.31 - - [20/Aug/2022' doesn't match specifier '%d'
==27== Token '8.29.164.31 - - [20/Aug/2022' doesn't match specifier '%d'
==27== Token '8.29.164.31 - - [20/Aug/2022' doesn't match specifier '%d'
==27== Token '8.29.164.31 - - [20/Aug/2022' doesn't match specifier '%d'
==27== Token '8.29.164.31 - - [20/Aug/2022' doesn't match specifier '%d'
==27== Token '8.29.164.31 - - [20/Aug/2022' doesn't match specifier '%d'
==27== Token '8.29.164.31 - - [20/Aug/2022' doesn't match specifier '%d'
==27==
==27== Format Errors - Verify your log/date/time format
GOAN v1.1.4
NGINX SETUP...
NGINX BASIC AUT

The container keeps restarting, any help?

Thanks

Traefik format logs

Hi!

Thanks, dope tool! One question, just interesting, is it possible to implement support for the log format of Traefik?

Thanks in advance!

A lot of CPU Usage and 10000 request every second in webUI like #28

im very sorry but i again have this issue ,maybe yo can open the old one
#28

it was running about 2 days normal then it start grow up about 10000 in second ,
if im not running container for some days it again working Good for 2 days ,and then again start raising
Very strange i dont have this isshue on gregyankovoy/goaccess

becose i used his container befor i moved the Logs folder to /mnt/user/Logs/NginxProxyManager/
where i can look to find the problem ?

timezone

Latest image based on Alpine does not follow the set timezone in the TZ environment variable. The image based on ubuntu worked fine.

Cumulative data

Prior to deploying the latest, v1.04, I tested against my production server and the number of hits went down drastically. I had over 1,000,000 million requests compared now to 600,000.

I tested the docker image and that is not the issue. I tested the logs with the "latest" older version and the stats were the same. I also tested via the goaccess cli and the results were the same.

I'm not sure if the discrepancy is caused by NPM or GoAccess. I'm thinking NPM. Maybe NPM is not keeping all its data? Should I look into disk persistence?

arm64 image version

I enjoyed using your panel when I was using npm on a proxmox vm but decided to move it to a dedicated Pi and would like to continue to use goaccess on the Pi. Can you make an arm64 version?

Goaccess log errors

Getting multiple errors from goaccess reading log files. Docker container then stops.

FILE: /goaccess/access_archive.log

  • Token '009' doesn't match specifier '%s'
  • Token 'SEARCH' doesn't match specifier '%m'
  • Format Errors - Verify your log/date/time format

Running Nginx Proxy Manager v2.9.16 in docker container, on Ubuntu server 20.04

error after update...

Hi,

Since previous update, will not start up, get following error in log file....

/goan/start.sh: /goan/funcs/environment.sh: line 16: syntax error: unexpected redirection

Any ideas please?

Thanks

No data

version: "3.9"
services:
  goaccess:
    image: justsky/goaccess-for-nginxproxymanager:latest
    container_name: goaccess
    restart: always
    environment:
        - TZ=Europe/Berlin
        - SKIP_ARCHIVED_LOGS=False #optional
        - BASIC_AUTH=False #optional
        - BASIC_AUTH_USERNAME=user #optional
        - BASIC_AUTH_PASSWORD=pass #optional
    ports:
        - '7880:7880'
    volumes:
        - /data/nginx-proxy-manager/app/data/logs:/opt/log

I am using the docker-compose.yml above and under /data/nginx-proxy-manager/app/data/logs are multiple log files (proxy_host-x.log) files. I see zero data. Everything is 0. Just Log Parsing Time is 1 second. So I cannot see any old or live data. What am I doing wrong?

Chinese localization

How can I achieve the same effect as in the link?
-e LANG=zh_CN or -e LANG=zh_CN.UTF-8 or -e LC_ALL=zh_CN.UTF-8 does not take effect, still cannot display Chinese

Feature? Read into rotated logs

Shouldn't be nice if GoAccess would process the compressed rotated logs from NGINX?

I have this:

-rw-r--r-- 1 root root 17247 Mar 24 08:54 proxy-host-8_access.log
-rw-r--r-- 1 root root 2153 Mar 19 23:28 proxy-host-8_access.log.1.gz
-rw-r--r-- 1 root root 2793 Mar 14 05:56 proxy-host-8_access.log.2.gz
-rw-r--r-- 1 root root 3515 Mar 6 01:35 proxy-host-8_access.log.3.gz
-rw-r--r-- 1 root root 2413 Feb 28 05:06 proxy-host-8_access.log.4.gz
-rw-r--r-- 1 root root 0 Nov 20 08:34 proxy-host-8_error.log
-rw-r--r-- 1 root root 308 Nov 12 15:21 proxy-host-8_error.log.1.gz

And it's only processing the .log files.

CloudFlare mod_remoteip

When looking throug my logs, I see that all the IPs shown are from CloudFlare, which makes sense as I am using CloudFlare for DNS and security.

Do you have any plans to allow for mod_remoteip so that we can see the real IP addresses of the people accessing our containers rather than the CloudFlare IP addresses?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.