First off, thanks for sharing/creating the script.
I have been able to get the script working within my environment and just wanted to share the steps I needed to take on an Ubuntu 10.04 64bit system. I imagine some of the steps may not be needed or overkill, but they are what I used to allow the Cacti box to query the BIND system through snmp. The steps below assumes you have SNMP setup and able to query other OIDs on the BIND system.
On the BIND system:
1) Ubuntu doesn't have the root setup by default. Create a password using your standard user account by "sudo passwd"
2) Log into to root with the new credentials and place the files in the /root/bin directory as in the original directions. I used SFTP to transfer the files over via OpenSSH.
3) Next, chmod +x and chmod 755 each file. (i.e. 755=overkill)
4) Add the line into snmpd.conf as the original directions state
5) Setup the snmp process to run as root. By default, it runs at snmpd. Modify the -u and -g parameters in /etc/default/snmpd from snmpd to root.
6) Remove the carriage returns on both of the files.
First, to verify if there are carriage returns (will display as <CR>), issue cat <filename> | perl –pe ‘s/\r/<CR>/’
There are many ways to do remove the <CR>, but I found launching vim and issuing a ":set ff=unix" to be the method that worked for me. The perl script did not work correctly on my system for some reason.
On the Cacti system:
7) Place the bind-stats.sh as recommended in the original directions.
Verify the user and group are correct for your system (mine needed set to root root).
9) chmod +x bind-stats.sh to make it executable
10) Remove the Carriage Returns on the bind-stats.sh script as we did in step 6.
11) Modify the bind-stats.sh file - community credentials should be updated with your systems community
12) Setup the device/graphs in Cacti.
Hopefully this helps someone. Thanks.