unbound config file resets every boot
-
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
-
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
-
@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
-
Hello!
server:statistics-cumulative:no
in the DNS Resolver Custom Options?
John
-
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 ?
-
@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. -
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 ?