summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2012-12-10 19:05:17 +0100
committerHolger Levsen <holger@layer-acht.org>2012-12-10 19:05:17 +0100
commit9bcaf7f81a01fe80f633ac4363c33a8b8e0c9fc0 (patch)
tree1256ccb2e61f68820415d21c0fe1614ed3143204 /etc
parent85106f4c835c6c12f3ee1755b1b2429dd1eed3d1 (diff)
downloadjenkins.debian.net-9bcaf7f81a01fe80f633ac4363c33a8b8e0c9fc0.tar.xz
run daily visitors report
Diffstat (limited to 'etc')
-rwxr-xr-xetc/cron.daily/visitors15
1 files changed, 15 insertions, 0 deletions
diff --git a/etc/cron.daily/visitors b/etc/cron.daily/visitors
new file mode 100755
index 00000000..3fffeecb
--- /dev/null
+++ b/etc/cron.daily/visitors
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Copyright 2012 Holger Levsen <holger@layer-acht.org>
+# released under the GPLv=2
+
+LOGS=$(mktemp)
+DOT=$(mktemp)
+# FIXME: provide monthly stats and don't run this daily
+zcat /var/log/apache2/access.log* | grep -v 127.0.0.1 | sort | ip2host > $LOGS
+
+visitors --debug -AKMY -m 30 $LOGS > /var/www/visitors-report.html
+#visitors --debug -VT -m 30 --prefix http://jenkins.debian.net $LOGS > $DOT
+# dot -Tpng -o/var/lib/www/visitors-report-graph.png $DOT
+
+rm $LOGS $DOT