aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/webapps/webstats/default.nix5
-rw-r--r--modules/webapps/webstats/goaccess.conf13
2 files changed, 9 insertions, 9 deletions
diff --git a/modules/webapps/webstats/default.nix b/modules/webapps/webstats/default.nix
index fe5f068..7a27741 100644
--- a/modules/webapps/webstats/default.nix
+++ b/modules/webapps/webstats/default.nix
@@ -57,15 +57,14 @@ in {
57 #!${pkgs.stdenv.shell} 57 #!${pkgs.stdenv.shell}
58 set -e 58 set -e
59 shopt -s nullglob 59 shopt -s nullglob
60 date_regex=$(LC_ALL=C date -d yesterday +'%d\/%b\/%Y')
61 TMPFILE=$(mktemp) 60 TMPFILE=$(mktemp)
62 trap "rm -f $TMPFILE" EXIT 61 trap "rm -f $TMPFILE" EXIT
63 62
64 mkdir -p ${cfg.dataDir}/${domain} 63 mkdir -p ${cfg.dataDir}/${domain}
65 cat /var/log/httpd/access-${domain}.log | sed -n "/\\[$date_regex/ p" > $TMPFILE
66 for i in /var/log/httpd/access-${domain}*.gz; do 64 for i in /var/log/httpd/access-${domain}*.gz; do
67 zcat "$i" | sed -n "/\\[$date_regex/ p" >> $TMPFILE 65 zcat "$i" >> $TMPFILE
68 done 66 done
67 cat /var/log/httpd/access-${domain}.log > $TMPFILE
69 ${pkgs.goaccess}/bin/goaccess $TMPFILE --no-progress -o ${cfg.dataDir}/${domain}/index.html -p ${config} 68 ${pkgs.goaccess}/bin/goaccess $TMPFILE --no-progress -o ${cfg.dataDir}/${domain}/index.html -p ${config}
70 ''; 69 '';
71 in "${d}/bin/stats-${domain}"; 70 in "${d}/bin/stats-${domain}";
diff --git a/modules/webapps/webstats/goaccess.conf b/modules/webapps/webstats/goaccess.conf
index 4918988..c6c244a 100644
--- a/modules/webapps/webstats/goaccess.conf
+++ b/modules/webapps/webstats/goaccess.conf
@@ -1,26 +1,27 @@
1time-format %H:%M:%S 1time-format %H:%M:%S
2date-format %d/%b/%Y 2date-format %d/%b/%Y
3 3
4#sur immae.eu
5#log-format %v %h %^[%d:%t %^] "%r" %s %b "%R" "%u" $^
6
7log-format VCOMBINED 4log-format VCOMBINED
8#= %v:%^ %h %^[%d:%t %^] "%r" %s %b "%R" "%u" 5#= %v:%^ %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
9 6
10html-prefs {"theme":"bright","layout":"vertical"} 7html-prefs {"theme":"bright","layout":"vertical"}
11 8
9# old
12exclude-ip 188.165.209.148 10exclude-ip 188.165.209.148
13exclude-ip 178.33.252.96 11exclude-ip 178.33.252.96
14exclude-ip 2001:41d0:2:9c94::1 12exclude-ip 2001:41d0:2:9c94::1
15exclude-ip 2001:41d0:2:9c94:: 13exclude-ip 2001:41d0:2:9c94::
14# eldiron
16exclude-ip 176.9.151.89 15exclude-ip 176.9.151.89
17exclude-ip 2a01:4f8:160:3445:: 16exclude-ip 2a01:4f8:160:3445::
18exclude-ip 82.255.56.72 17# monitoring-1
18exclude-ip 95.216.164.150
19exclude-ip 2a01:4f9:c010:1c95::
19 20
20no-query-string true 21no-query-string true
21 22
22keep-db-files true 23persist true
23load-from-disk true 24restore true
24db-path @dbPath@ 25db-path @dbPath@
25 26
26ignore-panel REFERRERS 27ignore-panel REFERRERS