Unbound Log Verbosity

I raised verbosity to 5 and reloaded. Confirmed:

/etc/unbound # unbound-control status
version: 1.4.20
verbosity: 5
threads: 4
modules: 2 [ validator iterator ]
uptime: 600 seconds
unbound (pid 66544) is running...

Shouldn't I be able to see individual queries?

Hi Fongaboo,

I raised verbosity to 5 and reloaded. Confirmed:

> /etc/unbound # unbound-control status | version: 1.4.20 |
verbosity: 5 | threads: 4 | modules: 2 [ validator iterator ] |
uptime: 600 seconds | unbound (pid 66544) is running...

Shouldn't I be able to see individual queries?

Yes, it logs every query in detail, and with query source. Where is
unbound logging to? Syslog or a log file? The last statement in
unbound.conf determines which one (use syslog yes or use log-file
filename). You could try to use a logfile, because perhaps the syslog
connection fails and unbound cannot log at all (because syslog is
thwarted by chroot or permissions perhaps). Unbound needs to be able
to (re)open the log-file (as file permissions), so the logfile, and
perhaps directory, has to allow those permissions. When you kill -HUP
unbound it attempts to re-open the logfile with its (downlevelled)
user permissions - this is for log file rotation - but if it does not
have permission it cannot log.

Best regards, Wouter

-------------------------------------------------------------------------

shot through the heart ooh baby do you know what that's worth

Thank you.

Strangely, I found no entries in unbound.conf related to logging other than the verbosity.

I tried adding...

syslog: yes
log-queries: yes

...but when I run unbound-checkconf, I got:

/var/unbound/unbound.conf:8: error: unknown keyword 'syslog'
/var/unbound/unbound.conf:8: error: stray ':'
/var/unbound/unbound.conf:8: error: unknown keyword 'yes'
read /var/unbound/unbound.conf failed: 3 errors in configuration file

Nevermind. The option is actually 'use-syslog: yes'.

Working now...

Hi Fongaboo,

It is use-syslog: yes, not syslog: yes.

Best regards,
   Wouter

Thank you.

Strangely, I found no entries in unbound.conf related to logging
other than the verbosity.

I tried adding...

syslog: yes log-queries: yes

...but when I run unbound-checkconf, I got:

/var/unbound/unbound.conf:8: error: unknown keyword 'syslog'
/var/unbound/unbound.conf:8: error: stray ':'
/var/unbound/unbound.conf:8: error: unknown keyword 'yes' read
/var/unbound/unbound.conf failed: 3 errors in configuration file

Hi Fongaboo,

I raised verbosity to 5 and reloaded. Confirmed:

> /etc/unbound # unbound-control status | version: 1.4.20 |
verbosity: 5 | threads: 4 | modules: 2 [ validator iterator ]
> uptime: 600 seconds | unbound (pid 66544) is running...

Shouldn't I be able to see individual queries?

Yes, it logs every query in detail, and with query source. Where
is unbound logging to? Syslog or a log file? The last statement
in unbound.conf determines which one (use syslog yes or use
log-file filename). You could try to use a logfile, because
perhaps the syslog connection fails and unbound cannot log at all
(because syslog is thwarted by chroot or permissions perhaps).
Unbound needs to be able to (re)open the log-file (as file
permissions), so the logfile, and perhaps directory, has to allow
those permissions. When you kill -HUP unbound it attempts to
re-open the logfile with its (downlevelled) user permissions - this
is for log file rotation - but if it does not have permission it
cannot log.

Best regards, Wouter

-------------------------------------------------------------------------

shot through the heart ooh baby do you know what that's