The case of the non working Munin Node Plugin

So I was attempting to get some nice munin graphs for my shiny new PowerDNS Authorative server and all the graphs were saying was NaN

So Naturally I logged in an tried running the command itself

root@ns1:~# munin-run pdns_queries-v1
recursing_answers.value 0
recursing_questions.value 0
tcp_answers.value 772
tcp_queries.value 772
udp_answers.value 9195
udp_queries.value 9195

So – things are running and returning… good, so I moved on to test it from the node and things were not so great

root@ns1:~# telnet localhost 4949
Trying ::1…
Connected to localhost.
Escape character is ‘^]’.
# munin node at ns1
fetch pdns_queries-v1

Interestingly enough I was not getting any errors in the logs either. After messing around with the script I figured out it was being run as “nobody” which is bad since nobody cannot run pdns_control and that kinda puts a limit on what can be done!

so, under /etc/munin/plugin-conf.d/munin-node I added a new section that told munin to run the command under the root user.

user root

And now it works and returns values!

PuTTY Love

Cool things to do with Putty:

Private and Public Keys

If you do not use these yet, you should! Go to the PuTTY download page and download PuTTygen. Create your Public and Private key and put a password on the private key! Don’t want to enter you private key all the time? nor do I – read on!

Agent Authenticating

Go to the PuTTY download page and download Pageant and run it. It will appear in your system tray. Right click on it and “Add Key” and locate your putty private key (.ppk) file and open it. It will ask for the password to your SSH key (You did put a password on it, right?) put it in and now all future PuTTy sessions will ask Pageant for your SSH Key Password.

Auto Login

Do you use the same username all the time? yeah me too – In the PuTTY Config under Connection -> Data you can setup your Auto Login Username. Combine this with our agent authentication and you no longer have to enter any information when you log into your servers!

One key to rule them all

If you want to use your PuTTY SSH key on your servers to authenticate between them, you can do this too. Load your private key in PuTTYgen and under the Conversions menu choose “Export OpenSSH Key” save that to a file and then you can put that on your servers in your ~/.ssh/id_rsa file (assuming you are using RSA and not DSA)

Forwarding Agent Authentication

This means that you can use your private keys on the server without passwords too! putty will forward the decrypting password to the server when it asks for it, meaning you can SSH around in perfect safety without worrying about unprotected keys!

To set this up in your PuTTY config go to Connection ->  SSH -> Auth and tick the box marked “Allow agent forwarding”

Logging into a remote server that is behind another

So, you have some Linux servers that are behind a gateway or firewall box, but do not want to have to ssh into the gateway and then into each box separately? one (horrible) solution is port forwarding. The better solution is to have putty log into those boxes itself!

Follow the instructions above and get yourself some shiny SSH keys and some password less login loving. Then In the Putty Config go to Connection -> SSH and put into the Remote Command box:


If you have your SSH key set up and your “Allow Agent Forwarding” box ticked, you should now be presented with your server that is living behind the gateway/firewall.

Shouts go out to Billy @ for showing me the way with all of this stuff!