leicht modifizierte version von imageindex (wurde noch nicht
uebernommen); logclient fuer sao+sobi
This commit is contained in:
parent
c84bed5b08
commit
2aba8e7440
2 changed files with 3081 additions and 20 deletions
2995
spielspass/imageindex
Executable file
2995
spielspass/imageindex
Executable file
File diff suppressed because it is too large
Load diff
|
@ -1,29 +1,95 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
VERSIONS="17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0"
|
cd "/home/age/logs/sao-apache/2006"
|
||||||
SRC="logs/access.log"
|
#TODO
|
||||||
DEST="access.log.all"
|
## das ist hier etwas bloede
|
||||||
|
## die logfiles sollten gzipped sein und ein .gz am ende haben
|
||||||
|
## hier stehen sie aber ophne drin
|
||||||
|
LOGFILES="access-sao2006-02.log.shrunk access-sobi2006-02.log.shrunk"
|
||||||
|
|
||||||
#[ -e ${SRC}.1.gz ] && gzip $SRC ${SRC}.1.gz
|
DEST="/tmp/tmplog"
|
||||||
|
## hier werden ein paar dinge rausgefiltert
|
||||||
|
for SRC in $LOGFILES; do
|
||||||
|
cp -v ${SRC}.gz ${DEST}.gz
|
||||||
|
gunzip -v ${DEST}.gz
|
||||||
|
rows_orig=`wc -l $DEST | cut -d " " -f 1`
|
||||||
|
## hier kannst du deine inline sed replacements einfuegen
|
||||||
|
sed -i 's/^/127.0.0.1 /' $DEST
|
||||||
|
sed -i '/Python-urllib/d' $DEST
|
||||||
|
#sed -i '/\"Wget\/1\.9\.1\"/d' $DEST
|
||||||
|
sed -i '/check_http\/1\.81/d' $DEST
|
||||||
|
sed -i '/U\;\ Nessus/d' $DEST
|
||||||
|
sed -i '/action=rss/d' $DEST
|
||||||
|
rows_filtered=`wc -l $DEST | cut -d " " -f 1`
|
||||||
|
echo "logentries original: $rows_orig and filtered: $rows_filtered"
|
||||||
|
visitors -AT -m 30 ${DEST} -o html --prefix https://systemausfall.org > ${SRC}_report_full.html
|
||||||
|
echo "generated full report"
|
||||||
|
visitors -WKOBXY -m 30 -i 15 -x 15 ${DEST} -o html --prefix https://systemausfall.org > ${SRC}_report_public.html
|
||||||
|
echo "generated public report"
|
||||||
|
visitors ${DEST} --prefix https://systemausfall.org --graphviz > ${SRC}.graph.dot
|
||||||
|
neato ${SRC}.graph.dot -Tpng -o ${SRC}.graph.png
|
||||||
|
rm "$DEST" "${SRC}.graph.dot"
|
||||||
|
done
|
||||||
|
|
||||||
## nur falls die logs auf mehrere dateien verteilt sind,
|
exit 0
|
||||||
#for vers in ${VERSIONS[@]}
|
|
||||||
#do
|
|
||||||
#file=${SRC}.${vers}.gz
|
|
||||||
#echo $file
|
|
||||||
#zcat $file >> $DEST
|
|
||||||
#echo -e "\n" >> $DEST
|
|
||||||
#done
|
|
||||||
|
|
||||||
## ein paar ersedzungen
|
## den report gengerieren
|
||||||
sed '/Python-urllib/d' $DEST > ${DEST}.a
|
#visitors --prefix https://systemausfall.org -AT -m 30 ${DEST}.0 -o html > ${SRC}_fullreport.html
|
||||||
sed '/\"Wget\/1\.9\.1\"/d' $DEST.a > ${DEST}.b
|
#visitors --prefix https://systemausfall.org -XKUWDOBT -m 30 ${SRC}.clean -o html > ${SRC}_customreport.html
|
||||||
sed '/U\;\ Nessus/d' $DEST.b > ${DEST}.c
|
#echo "generated custom report"
|
||||||
sed '/action=rss/d' $DEST.c > ${DEST}.d
|
#visitors --prefix https://systemausfall.org -WKOBXY -m 30 -i 15 -x 15 ${SRC}.clean -o html > ${SRC}_publicreport.html
|
||||||
sed 's/^/127.0.0.1 /' $DEST.d > ${DEST}.e
|
|
||||||
|
|
||||||
# den report gengerieren
|
## noch ne kleine grafik erzeugen
|
||||||
visitors --prefix https://systemausfall.org -XKUWDOBT -m 30 ${DEST}.e -o html > ${SRC}_sao_report_raw.html
|
#echo "generating the graph"
|
||||||
|
#visitors ${SRC}.clean --prefix https://systemausfall.org --graphviz > ${SRC}.graph.dot
|
||||||
|
#dot ${SRC}.graph.dot -Tpng > ${SRC}.graph.png
|
||||||
|
|
||||||
|
|
||||||
|
###############################################
|
||||||
|
|
||||||
|
cp ${SRCSAO}.gz ${DESTSAO}.gz
|
||||||
|
gunzip $DESTSAO
|
||||||
|
sed -i 's/^/127.0.0.1 /' $DESTSAO
|
||||||
|
sed -i '/Python-urllib/d' $DESTSAO
|
||||||
|
#sed '/\"Wget\/1\.9\.1\"/d' $DEST.a > ${DEST}.b
|
||||||
|
sed -i '/check_http\/1\.81/d' $DESTSAO
|
||||||
|
sed -i '/U\;\ Nessus/d' $DESTSAO
|
||||||
|
sed -i '/action=rss/d' $DESTSAO
|
||||||
|
cp $DESTSAO ${SRCSAO}.clean
|
||||||
|
#rm ${DESTSAO}.*
|
||||||
|
|
||||||
|
|
||||||
|
cp $SRCSOBI.gz $DESTSOBI.gz
|
||||||
|
gunzip $DESTSOBI
|
||||||
|
sed -i 's/^/127.0.0.1 /' $DESTSOBI
|
||||||
|
sed '/Python-urllib/d' $DESTSOBI > ${DESTSOBI}.a
|
||||||
|
#sed '/\"Wget\/1\.9\.1\"/d' $DEST.a > ${DEST}.b
|
||||||
|
sed '/U\;\ Nessus/d' $DESTSOBI.a > ${DESTSOBI}.c
|
||||||
|
sed '/action=rss/d' $DESTSOBI.c > ${DESTSOBI}.d
|
||||||
|
cp ${DESTSOBI}.d ${SRCSOBI}.clean
|
||||||
|
#rm ${DESTSOBI}.*
|
||||||
|
|
||||||
|
visitors -XKUWDOBT -m 30 ${SRCSAO}.clean -o html --prefix https://systemausfall.org > ${SRCSAO}_report.html
|
||||||
|
visitors ${SRCSAO}.clean --prefix https://systemausfall.org --graphviz > ${SRCSAO}.graph.dot
|
||||||
|
neato ${SRCSAO}.graph.dot -Tpng -o ${SRCSAO}.graph.png
|
||||||
|
|
||||||
|
visitors -XKUWDOBT -m 30 ${SRCSOBI}.clean -o html --prefix https://systemausfall.org > ${SRCSOBI}_report.html
|
||||||
|
visitors ${SRCSOBI}.clean --prefix https://systemausfall.org --graphviz > ${SRCSOBI}.graph.dot
|
||||||
|
neato ${SRCSOBI}.graph.dot -Tpng -o ${SRCSOBI}.graph.png
|
||||||
|
|
||||||
|
for $SRC in $LOGFILES; do
|
||||||
|
DEST=${SRC}.tmp
|
||||||
|
cp $SRC.gz $DEST.gz
|
||||||
|
gunzip $DEST
|
||||||
|
sed -i 's/^/127.0.0.1 /' $DEST
|
||||||
|
sed '/Python-urllib/d' $DEST> ${DEST}.a
|
||||||
|
#sed '/\"Wget\/1\.9\.1\"/d' $DEST.a > ${DEST}.b
|
||||||
|
sed '/U\;\ Nessus/d' $DEST.a > ${DEST}.c
|
||||||
|
sed '/action=rss/d' $DEST.c > ${DEST}.d
|
||||||
|
cp ${DEST}.d ${SRC}.clean
|
||||||
|
visitors -XKUWDOBT -m 30 ${SRC}.clean -o html --prefix https://systemausfall.org > ${SRC}_report.html
|
||||||
|
visitors ${SRC}.clean --prefix https://systemausfall.org --graphviz > ${SRC}.graph.dot
|
||||||
|
neato ${SRC}.graph.dot -Tpng -o ${SRC}.graph.png
|
||||||
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue