Commit 088a2e0d authored by Michał Woźniak's avatar Michał Woźniak

README update

parent 8b1359ed
......@@ -8,5 +8,5 @@ RUN apk add --no-cache git bash
RUN git clone --single-branch --branch 3.x-dev https://github.com/matomo-org/matomo-log-analytics.git /opt/matomo-log-analytics
WORKDIR /opt/matomo-log-analytics
ENTRYPOINT ["python", "import_logs.py"]
CMD ["--help"]
ENTRYPOINT ["/bin/bash"]
CMD ["/run.sh"]
# Docker Matomo Log Analytics
Matomo's [log analytics](https://matomo.org/log-analytics/), dockerized.
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`.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment