Rsyslog not logging dmesg messages

Operating system: Ubuntu
OS version: 20.04.1

I recently upgraded my VPS from 14.04 to 20.04, Webmin to 1.962, and Virtualmin from an ancient version to 6.14. (All at once, I know that could cause a problem. And it did.)

In the process, logging got screwed up. I posted a longer note to StackExchange, but the Cliff Notes are:

  • I log certain messages from iptables (... -j LOG --log-prefix "iptables: info...")
  • I can see those messages with dmesg -x or in the System Logs > Output from dmesg page
  • Those messages never appear in files in /var/log/...

Any thoughts on troubleshooting this?

Update: It’s working now. While troubleshooting this, I made a huge number of changes, but I believe the problem was that the line below was commented out in /etc/rsyslog.conf Uncommenting it causes the log entries to appear as expected.

#module(load="imklog" permitnonkernelfacility="on")

For a much longer discussion of what I learned, check my StackExchange post