Hey there,
sure, after some Digging I was able to get the CSV output
#group,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true
#datatype,string,long,dateTime:RFC3339,double,string,string,string,string,string,string,string,string,string,string,string,dateTime:RFC3339,dateTime:RFC3339
#default,count,,,,,,,,,,,,,,,,
,result,table,_time,,IP,IP_24,QC,QH,QT,TLD,Upstream,_field,_measurement,host,path,_start,_stop
,,0,2024-02-27T10:02:21Z,73507864,172.20.0.4,172.20.0.x,IN,baanane.de,A,baanane.de,https://dns.google:443/dns-query,Elapsed,tail,w2tj-dns1,/opt/AdGuardHome/data/querylog.json,2024-02-27T08:29:04.294100928Z,2024-02-27T11:29:04.294100928Z
,,0,2024-02-27T10:02:23Z,8793423,172.20.0.4,172.20.0.x,IN,lol.de,AAAA,lol.de,https://dns.cloudflare.com:443/dns-query,Elapsed,tail,w2tj-dns1,/opt/AdGuardHome/data/querylog.json,2024-02-27T08:29:04.294100928Z,2024-02-27T11:29:04.294100928Z
,,0,2024-02-27T10:02:26Z,23620582,172.20.0.4,172.20.0.x,IN,lan.party,AAAA,lan.party,https://dns.cloudflare.com:443/dns-query,Elapsed,tail,w2tj-dns1,/opt/AdGuardHome/data/querylog.json,2024-02-27T08:29:04.294100928Z,2024-02-27T11:29:04.294100928Z
,,0,2024-02-27T10:02:30Z,12426039,172.20.0.4,172.20.0.x,IN,exxessive.das,A,exxessive.das,https://dns.cloudflare.com:443/dns-query,Elapsed,tail,w2tj-dns1,/opt/AdGuardHome/data/querylog.json,2024-02-27T08:29:04.294100928Z,2024-02-27T11:29:04.294100928Z
,,0,2024-02-27T10:02:34Z,9029170,172.20.0.4,172.20.0.x,IN,check24.de,AAAA,check24.de,https://dns.cloudflare.com:443/dns-query,Elapsed,tail,w2tj-dns1,/opt/AdGuardHome/data/querylog.json,2024-02-27T08:29:04.294100928Z,2024-02-27T11:29:04.294100928Z
,,0,2024-02-27T10:02:42Z,8594962,172.20.0.4,172.20.0.x,IN,pizza.de,AAAA,pizza.de,https://dns.cloudflare.com:443/dns-query,Elapsed,tail,w2tj-dns1,/opt/AdGuardHome/data/querylog.json,2024-02-27T08:29:04.294100928Z,2024-02-27T11:29:04.294100928Z
,,0,2024-02-27T10:02:45Z,7675430,172.20.0.4,172.20.0.x,IN,google.com,AAAA,google.com,https://dns.cloudflare.com:443/dns-query,Elapsed,tail,w2tj-dns1,/opt/AdGuardHome/data/querylog.json,2024-02-27T08:29:04.294100928Z,2024-02-27T11:29:04.294100928Z
,,0,2024-02-27T10:02:52Z,2767033481,172.20.0.4,172.20.0.x,IN,lustigesachen.de,A,lustigesachen.de,https://dns.cloudflare.com:443/dns-query,Elapsed,tail,w2tj-dns1,/opt/AdGuardHome/data/querylog.json,2024-02-27T08:29:04.294100928Z,2024-02-27T11:29:04.294100928Z
,,0,2024-02-27T10:02:57Z,14270267,172.20.0.4,172.20.0.x,IN,lustig.de,AAAA,lustig.de,https://dns.google:443/dns-query,Elapsed,tail,w2tj-dns1,/opt/AdGuardHome/data/querylog.json,2024-02-27T08:29:04.294100928Z,2024-02-27T11:29:04.294100928Z
,,0,2024-02-27T10:03:01Z,65711,172.20.0.4,172.20.0.x,IN,lustigesachen.de,A,lustigesachen.de,https://dns.cloudflare.com:443/dns-query,Elapsed,tail,w2tj-dns1,/opt/AdGuardHome/data/querylog.json,2024-02-27T08:29:04.294100928Z,2024-02-27T11:29:04.294100928Z
,,0,2024-02-27T10:03:06Z,13107974,172.20.0.4,172.20.0.x,IN,3fu.de,AAAA,3fu.de,https://dns.google:443/dns-query,Elapsed,tail,w2tj-dns1,/opt/AdGuardHome/data/querylog.json,2024-02-27T08:29:04.294100928Z,2024-02-27T11:29:04.294100928Z
,,0,2024-02-27T10:03:13Z,12115,172.20.0.4,172.20.0.x,IN,lustig.de,AAAA,lustig.de,https://dns.google:443/dns-query,Elapsed,tail,w2tj-dns1,/opt/AdGuardHome/data/querylog.json,2024-02-27T08:29:04.294100928Z,2024-02-27T11:29:04.294100928Z
,,0,2024-02-27T10:03:16Z,32417,172.20.0.4,172.20.0.x,IN,lustigesachen.de,A,lustigesachen.de,https://dns.cloudflare.com:443/dns-query,Elapsed,tail,w2tj-dns1,/opt/AdGuardHome/data/querylog.json,2024-02-27T08:29:04.294100928Z,2024-02-27T11:29:04.294100928Z
,,0,2024-02-27T10:03:20Z,26668141,172.20.0.4,172.20.0.x,IN,error.de,A,error.de,https://dns.google:443/dns-query,Elapsed,tail,w2tj-dns1,/opt/AdGuardHome/data/querylog.json,2024-02-27T08:29:04.294100928Z,2024-02-27T11:29:04.294100928Z
So my guess is that I make something wrong from the beginning and I’m not able to understand how to pull this. The Timeseries should show me first the Queries grouped by IP_24 and a second with all of them.
The query for my PieChart is:
from(bucket: "adguard")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["path"] == "/opt/AdGuardHome/data/querylog.json")
|> drop(columns: ["_start", "_stop"])
|> group(columns: ["IP"])
|> count()
|> rename(columns: {_value: ""})
|> yield(name: "count")