Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    unbound config file resets every boot

    Scheduled Pinned Locked Moved DHCP and DNS
    7 Posts 4 Posters 836 Views
    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.
    • A
      andrema2
      last edited by

      Hi,

      I'm trying to use Telegraf to gather unbound stats. The first issue is that the unbound plugin in pfSense doesn't accept the config_file = "/etc/unbound/unbound.conf" as a parameter and no matter what I do, if I run unbound-control stats it doesn't reset the counters. I look for unbound.conf and change it to statistics-cumulative: no. It doesn't respect it, so I though would be best to reboot the system and start it with the new configuration. When I do it, it replace my changed conf for a new one with statistics-cumulative: yes.

      I don't know if it is a default behaviour or how do I change it.

      To me the more important thing would be to be able to get the stats without the cumulative data in telegraf.

      Any idea is welcome

      GertjanG 1 Reply Last reply Reply Quote 0
      • A
        andrema2
        last edited by

        Just an update...

        I tried to restart the service by issuing pfSsh.php playback svc restart unbound

        It resets the conf file, so it's not the reboot it's the start of the service

        1 Reply Last reply Reply Quote 0
        • viktor_gV
          viktor_g Netgate
          last edited by

          @andrema2 said in unbound config file resets every boot:

          statistics-cumulative

          You could try to change https://github.com/pfsense/pfsense/blob/a3dea116f9ce533c7752939a8c7f75582dccd492/src/etc/inc/unbound.inc#L861

          A 1 Reply Last reply Reply Quote 0
          • S
            serbus
            last edited by

            Hello!

            server:statistics-cumulative:no

            in the DNS Resolver Custom Options?

            John

            Lex parsimoniae

            1 Reply Last reply Reply Quote 0
            • A
              andrema2 @viktor_g
              last edited by

              @viktor_g

              Hi

              Thanks now the file is correct. If I manually run unbound-control stats without forcing a conf file it does reset the stats.

              The Telegraf plugin, still gets the cumulative data.

              Any idea in this area ?

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

                @andrema2 said in unbound config file resets every boot:

                file = "/etc/unbound/unbound.conf"

                That file doesn't exist - isn't used.
                The unbound.conf file is here /var/unbound/
                This file, actually all config files, are 'build' on service startup, which is the reason they shouldn't be modified manually, as it make no sense.

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                A 1 Reply Last reply Reply Quote 0
                • A
                  andrema2 @Gertjan
                  last edited by

                  @Gertjan

                  Thanks, the file situation is solved.

                  On Telegraf unbound plugin with the conf file as it is with cumulative = no (changed in the inc file), it still doesn't respect the setting. So, it is not using the conf file in its default location or it's using status_noreset. How do I know which is the case ?

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.