Hi, noob here, please humor me…
I’m trying to build some dashboards, using information from the pi-hole sqlite3 databases.
I’ve already managed to get a panel up and running, extracting data from the query database, using the following sql query:
SELECT strftime('%d/%m/%Y %H:%M:%S', datetime(timestamp, 'unixepoch', 'localtime')), domain, additional_info, client FROM queries WHERE status = '9' GROUP BY queries.domain ORDER BY MAX(timestamp) DESC LIMIT 10;
This results in a panel looking like this:
As you can see, the client is displayed as an IP address.
the client name is in another database (the comment field)
I’ve already added the required ‘Data Sources’, selected ‘Mixed’ and added a second query to retrieve the ip and the comment field (SELECT ip, comment from client;)
From what I’ve been reading, it looks like I need to use ‘Transformations’ to replace the ip address in the panel (see screenshot above) with the associated name (= comment from the second query).
This is where I’m stuck, I’ve been reading and trying a lot of suggestions, however, I failed, thus the question: How do I achieve this?
Thank you for your time and effort.