Look for "query[" instead of "query" to avoid false-positives, like listed below

root@raspberrypi:/etc/.pihole# grep 'query' /var/log/pihole.log | grep -v 'query\['
Dec 22 16:29:50 dnsmasq[30801]: forwarded code.jquery.com to 208.67.222.222
Dec 22 16:29:50 dnsmasq[30801]: reply code.jquery.com is <CNAME>
Dec 22 16:29:50 dnsmasq[30801]: reply code.jquery.netdna-cdn.com is 94.31.29.54
Dec 22 16:29:50 dnsmasq[30801]: reply code.jquery.netdna-cdn.com is 23.111.11.3
Dec 22 16:29:50 dnsmasq[30801]: reply code.jquery.netdna-cdn.com is 198.232.125.113
This commit is contained in:
DL6ER 2016-12-22 19:09:37 +01:00
parent bcf8139708
commit a4f58b0a22
No known key found for this signature in database
GPG key ID: 00135ACBD90B28DD

View file

@ -33,7 +33,7 @@ CalcBlockedDomains() {
CalcQueriesToday() { CalcQueriesToday() {
if [ -e "${piLog}" ]; then if [ -e "${piLog}" ]; then
queriesToday=$(awk '/query/ {print $6}' < "${piLog}" | wc -l) queriesToday=$(awk '/query\[/ {print $6}' < "${piLog}" | wc -l)
else else
queriesToday="Err." queriesToday="Err."
fi fi