Pihole.log for specific device in Web Interface

I would found it useful if you can select a device (for example IP-Address or MAC-Address) for the "Tail pihole.log" feature only, so you don't get the traffic for all devices in the network.


I think the Tools > Tail pihole.log feature is available in the web admin interface as a convenience. It might be useful to be able to filter this with a text box on the same page, but the cleanest way to do this is to tail and filter from the command line, which on Pi OS can be done with the command below, with that last text part being for example a device's IP address.

sudo tail -f /var/log/pihole.log | grep text_you_want_to_match
1 Like

Thanks for the info!

For convenience we built in such a function in pihole

pihole -t [arg]

  -t, tail [arg]      View the live output of the Pi-hole log.
                      Add an optional argument to filter the log
                      (regular expressions are supported)

1 Like

This is the best way as the text colouring helps pick things out and the irrelevant dnsmasq text is removed. I've used pihole -t before but found it missed things during busy activity (eg when loading an amazon site and filtering for amazon, or when running dnsleaktest and filtering for leak). But I think I might have been piping pihole -t through grep rather than using the built-in arg. I just tried it now and it worked great with nothing dropped.

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