summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Chatzimichos <tampakrap@gentoo.org>2012-08-05 16:48:17 +0200
committerTheo Chatzimichos <tampakrap@gentoo.org>2012-08-05 16:48:17 +0200
commit7f0d0bac4f735003b8e9f6df23f339b03adf9ae1 (patch)
treee5fd366dec558debe85b5dd92f7663f52bc9f4dc /scripts
parentAlso update the log dir for the cleanup log command (diff)
downloadplanet-7f0d0bac4f735003b8e9f6df23f339b03adf9ae1.tar.gz
planet-7f0d0bac4f735003b8e9f6df23f339b03adf9ae1.tar.bz2
planet-7f0d0bac4f735003b8e9f6df23f339b03adf9ae1.zip
New script that notifies planet admins for bad URLs
Diffstat (limited to 'scripts')
-rw-r--r--scripts/error-report8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/error-report b/scripts/error-report
new file mode 100644
index 00000000..ccb42eb0
--- /dev/null
+++ b/scripts/error-report
@@ -0,0 +1,8 @@
+#!/bin/bash
+# At the end of the day, scan the logs of planet/universe,
+# grep for errors, sort them, count the duplicate URLs
+# and email the planet admins with the result
+
+for instance in planet universe; do
+ find /var/log/planet.gentoo.org/${instance} -type f -name "$(date +%Y-%m-%d)*" -exec grep "ERROR" {} \; | sort | uniq -c
+done