Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    Kea DHCP Logging Issue: Dual Output (File + Syslog) Conflict

    Scheduled Pinned Locked Moved DHCP and DNS
    4 Posts 2 Posters 1.1k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MoonLight 0
      last edited by

      Hello everyone,

      I am experiencing a specific integration issue with the Kea DHCP4 service running on pfSense, and I would appreciate your insights.

      My objective is to ensure Dual Logging for Kea DHCPv4 logs:

      1. To the pfSense GUI (via Syslog): For quick viewing in Status > System Logs > DHCP.
      2. To a Dedicated Log File (/var/log/kea-dhcp4.log): This is critical because I use an agent to send this clean, specific log file to CloudWatch Logs (AWS).

      I modified the Kea PHP source file (/etc/inc/services.inc) to configure the kea-dhcp4 logger with dual output, which is supposed to be fully supported by Kea.

      Here is the configuration I tested (including placing syslog in the first position to test initialization priority):

      'loggers' => [[
          'name' => 'kea-dhcp4',
          'severity' => config_get_path('kea/loglevel', 'INFO'),
          'output_options' => [
              [
                  'output' => 'syslog' 
              ],
              [
                  'output' => '/var/log/kea-dhcp4.log',
                  'maxsize' => 512000,
                  'maxver' => 7
              ]
          ]
      ]],
      

      I have confirmed that the generated JSON configuration file (/usr/local/etc/kea/kea-dhcp4.conf) is correct and contains both output blocks. I restarted the Kea DHCP4 service after every change.

      Despite the correct configuration, the results are inconsistent:

      โœ… File Output Works: New logs are correctly written to /var/log/kea-dhcp4.log. My CloudWatch stream is functional when this configuration is active.

      โŒ Syslog Output Fails: No Kea logs whatsoever appear in the pfSense GUI (neither under the DHCP filter nor in the General system log).

      Diagnosis: Kea is sending the dual logging command, but the pfSense syslogd process (FreeBSD) appears to ignore or reject Kea messages when the dual output is configured. When I remove the file output, syslog works.

      Is this a known bug or limitation in the Kea and pfSense syslogd integration when using dual output?

      Is there an alternative Syslog method (like specifying a facility, e.g., syslog:local7, plus a required pfSense configuration change) that would allow Kea to log to both a file AND appear in the GUI without conflict? (I must keep the dedicated file for CloudWatch).

      Thank you in advance for your help and insights!

      GertjanG 1 Reply Last reply
      Reply Quote 0
      • GertjanG
        Gertjan @MoonLight 0
        last edited by

        @MoonLight-0 said in Kea DHCP Logging Issue: Dual Output (File + Syslog) Conflict:

        Thank you in advance for your help and insights!

        Where did you get this from :

        'loggers' => [[
            'name' => 'kea-dhcp4',
            'severity' => config_get_path('kea/loglevel', 'INFO'),
            'output_options' => [
                [
                    'output' => 'syslog' 
                ],
                [
                    'output' => '/var/log/kea-dhcp4.log',
                    'maxsize' => 512000,
                    'maxver' => 7
                ]
            ]
        ]],
        

        ?
        Suggestion : here and I know it works, as I'm using it right now.

        The syslog issue : test if the syslog process is still running.
        Don't use this one :

        2176ba07-d276-4454-b499-e821d284121c-image.png

        fact-check it :

        ps aux | grep 'syslogd'

        [25.07.1-RELEASE][root@pfSense.bhf.tld]/root: ps aux | grep 'syslogd'
        root    11947   0.0  0.1  14308   3448  -  SCs  29Oct25      0:12.94 /usr/sbin/syslogd -O rfc5424 -s -c -c -l /va
        .....
        

        and restart it - GUI method is ok - if needed.

        Btw : there is a syslog issue if you send the logs to a remote syslog server. I can fail if the syslog server becomes unreachable. There are some forum threads about that issue - and redmine has mentioned a temp. fix.

        No "help me" PM's please. Use the forum, the community will thank you.

        M 1 Reply Last reply
        Reply Quote 0
        • M
          MoonLight 0 @Gertjan
          last edited by

          Hi @Gertjan, thank you for your reply!

          Where did you get this from

          The default configuration in /etc/inc/services.inc being:

          'loggers' => [[
                                 'name' => 'kea-dhcp4',
                                 'output_options' => [[
                                         'output' => 'syslog'
                                 ]],
                                 'severity' => config_get_path('kea/loglevel', 'INFO')
                         ]],
          

          After reading various conversations on the internet, including the one you linked to me, I thought I could add an 'output' entry so that the dhcp logs are also sent to /var/log/kea-dhcp4.log.

          The syslog issue : test if the syslog process is still running.

          Yes, the syslog process is currently running. I restarted it, but I still don't have any log on the GUI.

          To be honest, after rereading the conversion you sent me, I think I'm a little bit lost.
          I don't need to add a 'output' => 'syslog' entry so that the logs are displayed on the GUI?
          How can I get the logs in /var/log/kea-dhcp4.log and on the GUI exactly?
          Sorry if this seems obvious to you.

          Thank you!

          M 1 Reply Last reply
          Reply Quote 0
          • M
            MoonLight 0 @MoonLight 0
            last edited by

            Hi again, @Gertjan

            Quick update, looks like the following config will do what I want:

                        'loggers' => [
                            [
                                'name' => 'kea-dhcp4',
                                'output_options' => [[
                                'output' => 'syslog'
                                ]],
                                'severity' => config_get_path('kea/loglevel', 'INFO')
                            ],
                            [
                                'name' => 'kea-dhcp4.leases',
                                'output_options' => [[
                                'output' => '/var/log/kea-dhcp4.log',
                                'maxsize' => 512000,
                                'maxver' => 7
                                ]],
                                'severity' => config_get_path('kea/loglevel', 'INFO')
                            ]
                        ],
            

            Thanks again for your help! :)

            1 Reply Last reply
            Reply Quote 1

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better ๐Ÿ’—

            Register Login
            • First post
              Last post
            Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
            Privacy Policy · Cookie Policy