Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Fix MDQ counting by including urn style entityId queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhys Smith committed Feb 1, 2017
1 parent f2e0ff2 commit dfa7c6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utilities/stats-generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,9 @@ if [[ "$timeperiod" != "day" ]]; then
fi

# MDQ requests for entityId based names
mdqcountentityid=$(grep $apachesearchterm $logslocation/md/md1/mdq.uou-access_log* $logslocation/md/md2/mdq.uou-access_log* $logslocation/md/md3/mdq.uou-access_log* | grep -Ev "(Sensu-HTTP-Check|dummy|check_http|Balancer)" | grep "/entities" | grep -v "/entities " | grep -v "/entities/ " | grep -v 404 | grep "/entities/http" | wc -l)
mdqcountentityidhttp=$(grep $apachesearchterm $logslocation/md/md1/mdq.uou-access_log* $logslocation/md/md2/mdq.uou-access_log* $logslocation/md/md3/mdq.uou-access_log* | grep -Ev "(Sensu-HTTP-Check|dummy|check_http|Balancer)" | grep "/entities" | grep -v "/entities " | grep -v "/entities/ " | grep -v 404 | grep "/entities/http" | wc -l)
mdqcountentityidurn=$(grep $apachesearchterm $logslocation/md/md1/mdq.uou-access_log* $logslocation/md/md2/mdq.uou-access_log* $logslocation/md/md3/mdq.uou-access_log* | grep -Ev "(Sensu-HTTP-Check|dummy|check_http|Balancer)" | grep "/entities" | grep -v "/entities " | grep -v "/entities/ " | grep -v 404 | grep "/entities/urn" | wc -l)
mdqcountentityid=$((mdqcountentityidhttp+mdqcountentityidurn))
if [[ "$mdqcount" -ne "0" ]]; then
mdqcountentityidpc=$(echo "scale=3;($mdqcountentityid/$mdqcount)*100" | bc | awk '{printf "%.1f\n", $0}')
else
Expand Down

0 comments on commit dfa7c6b

Please sign in to comment.