Matomo's [log analytics](https://matomo.org/log-analytics/), dockerized and watching specified directories for logs to ingest.
the log analytics script is wrapped in an [`inotifywait`](https://linux.die.net/man/1/inotifywait) loop to automagically pick up logs from specified directories.
## Environment variables
-`WATCH_PATHS` (default: `"/srv/logs/"`)
Whitespace-separated list of paths to watch. These *should* be directories, which will be watched recursively. Once an `inotify` event fires, all files matching the glob pattern `*.log` contained in this directory will be ingested, one by one.
-`WATCH_DELAY` (default: `"0.5"`)
Delay between detecting changes and starting to process the files, in seconds (decimals are supported). Since `inotifywait` will detect the *first* change, if there is a large batch of changes happening (for example, a batch of large logfiles being copied into the directory), starting to load the files immediately would lead to unexpected results.
## Volume
The "`/srv/logs`" directory is exposed through the [`VOLUME` Dockerfile directive](https://docs.docker.com/engine/reference/builder/#volume), and is also configured as the default location to watch in `WATCH_PATHS`.