I've recently switched my network configuration on Raspbian to use external DNS and not Pi-Hole DNS (I have other things going on on my Raspberry PI... and I don't want all the DNS entries in Pi-Hole).
All my network devices are exclusively going through Pi-Hole for DNS and DHCP.
In the Long term data section, host name are not shown... I only see IP addresses for my devices.
Dash Board, Query Log, Network Overview and local resolving (from one of my computers on my network) are working as expected (showing the correct host name).
Is this how it's supposed to work? If not, what should I do to fix this?
Your debug log looks ok, showing Pi-hole has successfully integrated into your network with full IPv4 connectivity.
As Pi-hole is also your DHCP server, reverse resolution of IPv4 addresses to hostnames should work.
Do you have some examples of IPs you see and the names you would expect instead?
You could also verify you supplied a name for leases via Pi-hole's Settings | DHCP.
The DNS protocol itself is only aware of a client by its IP address, so this is the only thing Pi-hole ever can directly associate with a query.
For recent queries, Pi-hole is making an effort to associate that IP address to a known hosts as can be determined currently.
For long-term queries, that assumption may not be valid, as IP addresses may have changed for several reasons (e.g. lease reneeal or connection through an additional routing device).
The long-term pages work differently than anything else on the dashboard because they interact directly with the database instead of sourcing the information (incl. possible host names) from our FTL daemon.
What is necessary here is that your web server (typically lighttpd) can resolve the host names correctly. For this, the local resolver has to be identical to Pi-hole.
Yes, because you asked the system to use a DNS server that cannot provide the requested answer.