QUERY_LOGGING, log-facility, and dnsmasq.d/01-pihole.conf

Hi piholers,

I'll start off by saying I am running pihole in Docker, but I'm 50/50 on whether this question resides in the Docker install scripts or the core pihole install.

My goal is to include pihole's queries in Docker logging. By default, Docker doesn't capture pihole's query logs at /var/log/pihole.log.

Sending pihole's queries to stderr should put them in Docker's reach. So, I have attempted to customize dnsmasq by creating an additional file /etc/dnsmasq.d/logging.conf:

log-queries=extra
log-facility=-

(Man page of DNSMASQ)

However, this doesn't work as these two options are already present in the default /etc/dnsmasq.d/01-pihole.conf, so dnsmasq errors upon seeing the same options used twice.

Next, I attempted to set /etc/pihole/setupVars.conf with QUERY_LOGGING=false. It seems like basic-install.sh would comment out the log-facility line in 01-pihole.conf with this setting, allowing me to use it in my own file. ([pi-hole/basic-install.sh at e41c4b5bb691cea1f5b950d39518d8c404b5846e · pi-hole/pi-hole · GitHub]) However, this doesn't work either, as log-facility is not commented out after installation has completed.

My docker run maps these directories:
--volume=/docker-volumes/pihole/etc/pihole:/etc/pihole/, which includes my setupVars.conf with QUERY_LOGGING=false
--volume=/docker-volumes/pihole/etc/dnsmasq.d:/etc/dnsmasq.d/, which includes my
logging.conf mentioned above.

So, is it possible to change the log-facility setting, preferably as part of the automated install process?

Thanks for reading!

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