[Pdns-users] Logging to /var/log/messages

Ian Goldstein (BLOOMBERG/ 120 PARK) igoldstein5 at bloomberg.net
Thu Sep 14 14:32:29 UTC 2023


Thank you.

Adding stop was unsuccessful.  I even made this the first directive in my /etc/rsyslog.d directory (00-pdns.conf).
What is also confusing me is the following.

In the pdns.conf file, I set logging-facility=1.

The log entry that appears in my pdns.log is:
Sep 14 09:07:52 xxxxxx-232 pdns[1380]: AXFR of domain 'foo.bar.com' to 1.2.3.4 finished

The entry that appears in /var/log/messages:
Sep 14 09:26:30 xxxxxx-209 pdns_server: AXFR of domain 'foo.bar.com' initiated by 1.2.3.4

also, the output from journalctl shows 2 entries
Sep 14 10:22:41 xxxxxx-209 pdns_server[98865]: AXFR of domain 'foo.bar.com' to 1.2.3.4finished
Sep 14 10:22:41 xxxxxx-209 pdns[98865]: AXFR of domain 'foo.bar.com' to 1.2.3.4 finished

I kick off pdns via systemd: /usr/sbin/pdns_server --guardian=no --daemon=no --log-timestamp=no --write-pid=no
I am running version: Sep 14 10:31:31 PowerDNS Authoritative Server 4.1.14 (C) 2001-2018 PowerDNS.COM BV

Thanks in advance

From: b.candler at pobox.com At: 09/14/23 02:58:28 UTC-4:00To:  Ian Goldstein (BLOOMBERG/ 120 PARK ) ,  pdns-users at mailman.powerdns.com
Subject: Re: [Pdns-users] Logging to /var/log/messages

                  
On 13/09/2023 22:48, Ian Goldstein       (BLOOMBERG/ 120 PARK) via Pdns-users wrote:
         
While I       am successfully logging to /var/log/pdns.log, I am also logging to       /var/log/messages which I do not want.
     
That question is entirely about rsyslog and not powerdns, but in       short you'll need something like this:     
local1.* {
              # Logging for powerdns
              # facility-specific targets
              action(type="omfile" file="/var/log/pdns.log")
              stop
      }     
You can see some more examples at https://www.rsyslog.com/doc/v8-stable/configuration/converting_to_new_format.html#converting-action-chains     
("A common construct is to send messages to a remote host         based on some message content and then not further process it")
             

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20230914/94af8e18/attachment.htm>


More information about the Pdns-users mailing list