Telegraf unbound Plugin error exit 1

Hi

I’m using Telegraf 1.14.4 on an OPNSense installation.
I’ve been trying to get unbound statistics
this is who my input looks like
[[inputs.unbound]]
binary = “/usr/local/sbin/unbound-control”
thread_as_tag = false

Everytime it tries to run I get this error
[inputs.unbound] Error in plugin: error gathering metrics: error running unbound-control: exit status 1 (/usr/local/sbin/unbound-control [stats_noreset])

How can I solve it ?

So, in the past I saw a solution in another forum stating that works as follows

rm /usr/local/etc/unbound/unbound.conf
ln -s /var/unbound/unbound.conf /usr/local/etc/unbound/unbound.conf

Now with the version 19.0 I started the get the same issue.

I added telegraf user to the unbound and wheel group and the error persists. Any idea ?

I just saw someone posting over at Telegraf plugin error using unbound input · Issue #2499 · opnsense/plugins · GitHub

I think it is a OPNsense problem, somehow - with permissions, perhaps? Or not, I saw the OPNsense now has a feature which enables telegraf to be run directly as root (stated in the GitHub issue above).