itwrx
a87b907139
|
2 weeks ago | |
---|---|---|
binaries | 2 weeks ago | |
example_config_files | 2 weeks ago | |
CHANGELOG.md | 2 weeks ago | |
COPYING | 2 weeks ago | |
README.md | 2 weeks ago | |
goaccess_reporter.nim | 2 weeks ago |
README.md
GoAccessReporter
A small program for web hosts, or self hosters, that reads TOML config files (TOML v0.5.0 currently), generates reports with GoAccess, and emails them to config'd recipients. The user can schedule with cron, systemd-timers, etc. Written and tested for linux.
System package dependencies
-- GoAccessReporter expects GoAccess
to be installed and configured(working with your nginx log files), as well as tar
being installed.
Building from source?
-- You will need Nim installed, which probably also contains Nimble, the Nim package manager.
-- Install the non-stdlib dependencies: nimble install parsetoml, smtp, mime
-- Compile goaccess_reporter.nim with: nim c --d:threads:off -d:ssl -d:release goaccess_reporter.nim
Or Just Download a binary
-- Download whichever binary you need from the binaries
directory. The default binary is compiled for x86_64 GNU libc (in Fedora), and the other is compiled for x86_64 musl (in Alpine Linux). I will try to note the distros' versions in the CHANGELOGs for a given release, so users can gauge the compatibility of the binaries.
Configuration and use.
-- Copy the binary to /usr/local/bin
, or wherever you prefer in your PATH on your server, and make it executable with chmod +x goaccess_reporter_binary_name
.
-- Create /etc/goaccess-reporter
(dash, not underscore) and copy example_config_files/email.toml
and example_config_files/sites.toml
there and edit them for your needs.
-- Run the program with cron by copying example_config_files/run_goaccess_reporter.sh
to /etc/periodic/monthly
on your server, or use whatever scheduling method you prefer.
-- GoAccessReporter will create ~/.goaccess-reporter
, ~/.gooaccess-reporter/reports
and ~/.goaacess-reporter/goaccess-reporter.log
when it runs. If delete-after = false
is set in sites.toml
for a site, the report will be saved in the reports
directory.
But Why?
Many website owners want some stats on page visits, referrering urls, etc., so they can gauge their SEO and marketing efforts, but adding analytics scripts to sites can slow them down, and/or turn them into third party spyware. GoAccess is FOSS (Free/Open Source Software) that simply parses the webserver log, and makes it available as a nice html report. GoAccessReporter allows web hosts to easily configure which sites GoAccess generates reports for, and then emails those reports to configured addresses.
Enjoy!