Skip to content

Conversation

@mccormick-wooden
Copy link

Thank you for your contribution to the Pi-hole Community!

Please read the comments below to help us consider your Pull Request.

We are all volunteers and completing the process outlined will help us review your commits quicker.

Please make sure you

  1. Base your code and PRs against the repositories developmental branch.
  2. Sign Off all commits as we enforce the DCO for all contributions
  3. Sign all your commits as they must have verified signatures
  4. File a pull request for any change that requires changes to our documentation at our documentation repo

What does this PR aim to accomplish?:

This PR adds the ability to view the query log with user-supplied client descriptions instead of raw ip addresses/host names, using a new toggle in the "Advanced filtering" section. I'd be interested in making this toggle on by default 👀
image
image
image

How does this PR accomplish the above?:

Updates the client code for the query log interface to fetch client and display client descriptions upon toggle.

Link documentation PRs if any are needed to support this PR:

N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)
  6. I have checked that another pull request for this purpose does not exist.
  7. I have considered, and confirmed that this submission will be valuable to others.
  8. I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  9. I give this submission freely, and claim no ownership to its content.

  • I have read the above and my PR is ready for review. Check this box to confirm

Signed-off-by: mwooden77@gmail.com <mwooden77@gmail.com>
@mccormick-wooden mccormick-wooden requested a review from a team as a code owner December 25, 2025 18:02
@DL6ER
Copy link
Member

DL6ER commented Dec 26, 2025

I have not yet been able to review any code, however, I want to express my concerns that you seem to be assuming that users are using the "comment" field as "description". I can say - for my having seen quite a few configurations over time during assisting in debugging - that many users really use it for comments about devices, example are (not limited to)

  • new as of 2021
  • has to be unblocked for application ABC
  • unclear DNS spikes since last firmware upgrade
  • password *****

None of these messages will be very helpful here, hence, I don't see a "default on" being any useful. I don't even see the "replaces the IP address" as helpful for many users. Sure, some may use the comment field as descriptive field, however, the vast majority will likely not care and leave the field empty.

My final note for you that the client field isn't limited to IP addresses but shows hostnames whenever available. Hence, simply enable conditional forwarding to your DHCP server (router?) and you magically see descriptive hostnames show up. In case you want to overwrite them (or if you don't want automatic names for any reason), simply go to your Pi-hole and define local DNS records (or even edit /etc/hosts directly) to configure the names in any way you want. This is an officially supported feature for years and comes at no ambiguities in the meaning of any fields.

@rdwebdesign
Copy link
Member

rdwebdesign commented Dec 26, 2025

Complementing the DL6ER answer, the "description" field is only used when the user manually adds each client to the Group Management Clients page, but most users only use the Default group and never add clients to this table, so the field will be empty.

Using Conditional forwarding (dns.revServers) is the easiest way to get clients names.

If Conditional forwarding doesn't work for your needs, you can still add the client names to the Local DNS Records page (this is the same as using dns.hosts option).
The "Domain" field can contain hostnames (see example below) and these names will be shown in Query Log table:

image

@mccormick-wooden
Copy link
Author

Hi all, appreciate the guidance here and apologies for not doing a bit more research in the codebase for how these fields should be used. I will admit that seeing description naming made me feel like I was doing something wrong but it was easy enough to implement so I did it anyway 😂 .

I'll go ahead and close this and follow the guidance provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants