PowerDNS Munin Plugin not working.
Running PowerDNS Munin plugins from linux shell command line works fine.
Running from “munin-run” works fine as well.
But doing a “telnet localhost 4949” and “fetch <pdns_graph_script>” returns nothing.
it turns out that munin-node (from munin-node.log) does not have access to the pdns socket
2016/03/17-23:40:03  Error output from pdns_errors:
2016/03/17-23:40:03  Fatal error: Unable to connect to remote ‘/var/run/pdns.controlsocket’: Permission denied
Most cases for Munin problems are usually permission problems when it is munin-node is being invoked.
Munin-node is running as user munin group munin. It usually does not have permissions to access various applications especially those that are run exclusively as another user. For example, iptables and access to sockets.
The solution is to ensure that Munin-node can shift its own permission for a short time while running the plugin.
Sometimes it can be caused by Selinux running. See this article.
Another possibility is that your default bash shell either does not have the correct paths to various binaries listed. Here you can either hardcode the paths or ensure your paths are part of your script. See this article.
You need to add a file in /etc/munin/plugins.conf.d/pdns
You have to restart munin-node for it to take effect. Either via “service munin-node restart” or “systemctl restart munin-node”