Improved statistics on ip (#3807)
This commit is contained in:
parent
56655537ad
commit
66ad2e26db
@ -1,4 +1,3 @@
|
||||
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2018, 2019 Didier Clermonté <dclermonte@april.org>
|
||||
@ -40,10 +39,10 @@ generateReport()
|
||||
httpRequestCount=$(zgrep "$monthEnglish" /var/log/apache2/paste.chapril.org/paste.chapril.org-access.log*|grep $year|wc -l)
|
||||
echo "Nombre total de requêtes http = $httpRequestCount"
|
||||
|
||||
trueHttpRequestCount=$(zgrep "$monthEnglish" /var/log/apache2/paste.chapril.org/paste.chapril.org-access.log*|grep $year|grep -vi bot|grep -v check|wc -l)
|
||||
trueHttpRequestCount=$(zgrep "$monthEnglish" /var/log/apache2/paste.chapril.org/paste.chapril.org-access.log*|grep $year|grep -vi bot|grep -v check_http|wc -l)
|
||||
echo "Nombre de vraies requêtes http = $trueHttpRequestCount"
|
||||
|
||||
botRequestCount=$(zgrep "$monthEnglish" /var/log/apache2/paste.chapril.org/paste.chapril.org-access.log*|grep "$year"|grep -i bot|grep -c -v check)
|
||||
botRequestCount=$(zgrep "$monthEnglish" /var/log/apache2/paste.chapril.org/paste.chapril.org-access.log*|grep "$year"|grep -i bot|grep -c -v check_http)
|
||||
echo "Nombre de requêtes bot = $botRequestCount"
|
||||
|
||||
errorsRequestCount=$(zgrep "$monthEnglish" /var/log/apache2/paste.chapril.org/paste.chapril.org-error.log*|grep -c "$year")
|
||||
@ -72,11 +71,15 @@ generateReport()
|
||||
ipv6Count=$(zgrep -h "$monthEnglish" /var/log/apache2/paste.chapril.org/paste.chapril.org-access.log*|grep "$year"|grep -vi bot|grep -v check_http|grep '^\([0-9a-f]\{0,4\}:\)\{2,7\}\([0-9a-f]\{0,4\}\)\{1\} '|cut -d' ' -f1|sort|uniq|wc -l )
|
||||
echo "Nombre d'ipv6 ayant visité le service = $ipv6Count"
|
||||
|
||||
echo "Nombre total d'ip ayant visité le service = $((ipv4Count+ipv6Count))"
|
||||
|
||||
ipv4UserCount=$(zgrep -h "$monthEnglish" /var/log/apache2/paste.chapril.org/paste.chapril.org-access.log*|grep "$year"|grep -vi bot|grep -v check_http|grep '^\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\} '|grep POST|cut -d' ' -f 1|sort|uniq|wc -l )
|
||||
echo "Nombre d'ipv4 utilisatrices du service = $ipv4UserCount"
|
||||
|
||||
ipv6UserCount=$(zgrep -h "$monthEnglish" /var/log/apache2/paste.chapril.org/paste.chapril.org-access.log*|grep "$year"|grep -vi bot|gre\p -v check_http|grep '^\([0-9a-f]\{0,4\}:\)\{2,7\}\([0-9a-f]\{0,4\}\)\{1\} '|grep POST|cut -d' ' -f 1|sort|uniq|wc -l )
|
||||
echo "Nombre d'ipv6 utilisatrices du service = $ipv6UserCount"
|
||||
echo "Nombre d'ipv6 utilisatrices du service = $ipv6UserCount"
|
||||
|
||||
echo "Nombre total d'ip utilisatrices du service = $((ipv4UserCount+ipv6UserCount))"
|
||||
|
||||
echo -e "\n"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user