3

Pi-hole saves some information about queries in the file pihole.log(var/log/pihole.log).

Pi-hole saves the current log only for a while and after a few minutes it gets overwritten.

When will the file get overwritten? (Every 30 Minutes or every hour...)

Basically: How long does Pi-hole save my current log?

Is there maybe also an option to change this period of time?

Jakob
  • 180
  • 2
  • 10

1 Answers1

2

If you use this pihole recommendation , tail (if called without -n X) display the last lines of the file and exit. If -f is used, you can see in realtime the last lines and then all new lines will be appenened. (pihole web interface seems to use tail -F)

Try to read the full logfile with sudo cat /var/log/pihole.log (cat or less or more) in a terminal.

"after a few minutes it gets overwritten"

check if the size of the logfile is more important that the output you can actually read for confirm this real overwrite.

This can also be the normal job of logrotate.

ls -l /var/log/pihole* for enumerate all pihole logfiles.

Ephemeral
  • 2,167
  • 1
  • 8
  • 19