#!${pkgs.stdenv.shell}
set -e
shopt -s nullglob
- date_regex=$(LC_ALL=C date -d yesterday +'%d\/%b\/%Y')
TMPFILE=$(mktemp)
trap "rm -f $TMPFILE" EXIT
mkdir -p ${cfg.dataDir}/${domain}
- cat /var/log/httpd/access-${domain}.log | sed -n "/\\[$date_regex/ p" > $TMPFILE
for i in /var/log/httpd/access-${domain}*.gz; do
- zcat "$i" | sed -n "/\\[$date_regex/ p" >> $TMPFILE
+ zcat "$i" >> $TMPFILE
done
+ cat /var/log/httpd/access-${domain}.log > $TMPFILE
${pkgs.goaccess}/bin/goaccess $TMPFILE --no-progress -o ${cfg.dataDir}/${domain}/index.html -p ${config}
'';
in "${d}/bin/stats-${domain}";
time-format %H:%M:%S
date-format %d/%b/%Y
-#sur immae.eu
-#log-format %v %h %^[%d:%t %^] "%r" %s %b "%R" "%u" $^
-
log-format VCOMBINED
#= %v:%^ %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
html-prefs {"theme":"bright","layout":"vertical"}
+# old
exclude-ip 188.165.209.148
exclude-ip 178.33.252.96
exclude-ip 2001:41d0:2:9c94::1
exclude-ip 2001:41d0:2:9c94::
+# eldiron
exclude-ip 176.9.151.89
exclude-ip 2a01:4f8:160:3445::
-exclude-ip 82.255.56.72
+# monitoring-1
+exclude-ip 95.216.164.150
+exclude-ip 2a01:4f9:c010:1c95::
no-query-string true
-keep-db-files true
-load-from-disk true
+persist true
+restore true
db-path @dbPath@
ignore-panel REFERRERS
self: super: {
goaccess = super.goaccess.overrideAttrs(old: rec {
name = "goaccess-${version}";
- version = "1.3";
+ version = "1.4";
src = self.fetchurl {
url = "https://tar.goaccess.io/${name}.tar.gz";
- sha256 = "16vv3pj7pbraq173wlxa89jjsd279004j4kgzlrsk1dz4if5qxwc";
+ sha256 = "1gkpjg39f3afdwm9128jqjsfap07p8s027czzlnxfmi5hpzvkyz8";
};
configureFlags = old.configureFlags ++ [ "--enable-tcb=btree" ];
buildInputs = old.buildInputs ++ [ self.tokyocabinet self.bzip2 ];