Skip to content

Commit

Permalink
Fix another bug in stats generation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhys Smith committed Mar 28, 2017
1 parent dcc82b1 commit 0c1c2d0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions utilities/stats-generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,8 @@ fi
# =====

# How many requests were there for the main content files?
wwwaccesscount=$(grep $apachesearchterm $logslocation/www/web1/ssl_access_log* $logslocation/www/web2/ssl_access_log* $logslocation/www/www-ne-01/ssl_access_log* $logslocation/www/www-we-01/ssl_access_log* | grep -Ev "(Sensu-HTTP-Check|dummy|check_http|Balancer)" | grep 200 | grep "/content/" | wc -l | awk '{ printf ("%'"'"'d\n", $0) }')
wwwaccesscount=$(grep $apachesearchterm $logslocation/www/web1/ssl_access_log* $logslocation/www/web2/ssl_access_log* $logslocation/www/www-ne-01/ssl_access_log* $logslocation/www/www-we-01/ssl_access_log* | grep -Ev "(Sensu-HTTP-Check|dummy|check_http|Balancer)" | grep 200 | grep "/content/" | wc -l)
wwwaccesscountfriendly=$(echo $wwwaccesscount | awk '{ printf ("%'"'"'d\n", $0) }')

# And from how many unique IdPs?
wwwaccessipcount=$(grep $apachesearchterm $logslocation/www/web1/ssl_access_log* $logslocation/www/web2/ssl_access_log* $logslocation/www/www-ne-01/ssl_access_log* $logslocation/www/www-we-01/ssl_access_log* | grep -Ev "(Sensu-HTTP-Check|dummy|check_http|Balancer)" | grep 200 | grep "/content/" | cut -f 1 -d " " | cut -f 2-9 -d ":" | sort | uniq | wc -l | awk '{ printf ("%'"'"'d\n", $0) }')
Expand Down Expand Up @@ -726,7 +727,7 @@ if [[ "$timeperiod" == "day" ]]; then
msg+=">*Wugen:* $wugencount WAYFless URLs generated, $wugennewsubs new subscriptions.\n"
msg+=">*Test IdP:* $testidplogincount logins to $testidpspcount SPs.\n"
msg+=">*Test SP:* $testsplogincount logins from $testspidpcount IdPs.\n"
msg+=">*Website:* $wwwaccesscount hits from $wwwaccessipcount unique IPs."
msg+=">*Website:* $wwwaccesscountfriendly hits from $wwwaccessipcount unique IPs."


else
Expand Down Expand Up @@ -795,7 +796,7 @@ else
msg+="$testsptoptenidpsbycount\n"
msg+="\n-----\n"
msg+="Website usage:\n"
msg+="-> $wwwaccesscount hits from $wwwaccessipcount unique IPs.\n"
msg+="-> $wwwaccesscountfriendly hits from $wwwaccessipcount unique IPs.\n"
msg+="-> Server distribution: www-ne-01: $wwwaccessne01pc% www-we-01: $wwwaccesswe01pc% / web1: $wwwaccessweb1pc% web2: $wwwaccessweb2pc% \n"
msg+="\n-----"
fi
Expand Down

0 comments on commit 0c1c2d0

Please sign in to comment.