Pi-hole long-term data showing IP's instead of hostnames

Hi,

I've set some custom hostnames to the ip's using my Pi-hole by defining these in /etc/hosts. This way I can easily recognize the clients. It all worked perfectly until I decided to update Pi-hole this afternoon, to version 3.3. That's where someting went wrong.

In the query log, I can still see the hostname I defined in /etc/hosts:

But if I go to the long term data (pihole query database), it will show the IP address instead of the hostname:

If I search for my defined hostname, you can see that it all went wrong after I updated Pi-hole this afternoon:

The first occurance of the IP is right after that:

Expected Behaviour:

The pihole query database (long-term data) should display hostnames.

Actual Behaviour:

Instead it displays IP's of clients.

Debug Token:

lc6a69xjfv

What can I do about this, if there's anything I can do :slight_smile:?

By the way, yes I'm running Pi-hole on a public server, but I've set my Digitalocean firewall to only accept DNS requests from specified IP's. This way it is not that public anymore :wink:

I found it took a few hours before the web interface picked up changes made in /etc/hosts.

In preparation for the next versions of Pi-hole, the long term stats will store the IP address instead of the hostname. The hostname resolution will happen in the upcoming API.

We have added this for the next release of Pi-hole, you can review the proposed changes here:

If you want to try it out, you can run

sudo pihole checkout web new/DB_resolve_hostnames

Later on, use

sudo pihole checkout web master

to get back to the officially released version or you won't be able to update etc.

1 Like

Alright, thanks! Looking forward to it :slight_smile:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.