Prometheus exporter for metrics provided by GoAccess.
It´s currently configured to work with Nginx Proxy Manager but can easily be reconfigured to work with any other access logs.
- Download this project to your local file system
git clone https://github.com/FranzDeschler/goaccess-prometheus-exporter
-
Adjust the
GoAccess
call in the/resources/run_goaccess.sh
script to your needs. See the GoAccess man page for parameters. -
In the
docker-compose.yml
file, adjust the following settings:LOG_FILES
environment variable: a comma separated list of file names. Wildcards like "*.log" are also possible.TIMEZONE
environment variable: A canonical timezone name like "Europe/Berlin". Default is "Etc/UTC".- port mapping
- replace the
LOG_DIRECTORY
placeholder with the directory where your log files are that you want to monitor
-
Create and run the Docker container.
docker-compose up
Note that most metrics provided by this exporter are counters. Those counters will be reset as soon as log rotation is applied to the log files you are monitoring. If your log files are rotated daily, the counters will also be reset daily.