Trouble with unbound and telegraf

  • Hi,
    I have a problem getting unbound status via telegraf.
    My telegraf.conf looks like this

      server = ""
      binary = "/usr/local/sbin/unbound-control -c /var/unbound/unbound.conf"
      thread_as_tag = false

    When running
    /usr/local/bin/telegraf -config=/usr/local/etc/telegraf.conf --test
    I get the following error:
    [inputs.unbound] Error in plugin: error gathering metrics: error running unbound-control: fork/exec /usr/local/sbin/unbound-control -c /var/unbound/unbound.conf: no such file or directory (/usr/local/sbin/unbound-control -c /var/unbound/unbound.conf [-s stats_noreset])

    But the mentioned command alone works perfect:
    /usr/local/sbin/unbound-control -c /var/unbound/unbound.conf -s stats_noreset

    What am I donig wrong? Pretty sure it is somethins obvious...