BIND 9.7 (only) host template

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

bdestephen
Posts: 2
Joined: Tue Sep 27, 2011 7:08 pm
Location: Ohio

Re: BIND 9.7 host template

Post by bdestephen »

Hello,

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.
8) 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.
Matteh
Posts: 2
Joined: Sat Apr 14, 2012 9:14 am

Re: BIND 9.7 host template

Post by Matteh »

Hey Guys,

Thanks for the template/script.

I've been loooking for one for a while that works.

Anyway, my output is:

Code: Select all

root@web:/var/www/cacti# ./scripts/bind-stats.sh fr-01.get-sourced.net
a:89261 a6:149 aaaa:68153 any:374 cname:8 mx:2549 naptr:0 ns:858 ptr:8696 soa:21 spf:164 srv:58 txt:462 rsnx:500 rsfail:181 rserr:398 rsipv4qs:10 rsipv4rr:10 rsmismatch: rsqr:2 rsqt:1 rsrtt10:6783 rsrtt100500:2 rsrtt10100:6 rsrtt1600: rsrtt500800:1 rsrtt8001600:6 sockopen:28677 sockclosed:28674 sockbf:7 consest:26683 recverr:15
So I know it is working correctly. However, my graphs (shown below) Don't appear to match up with this data?

I'm not sure if I'm doing something wrong xD

If you require further information from me, Please just ask :)

Thanks,

Matt
queries
queries
queries.png (41.61 KiB) Viewed 9699 times
IO stats
IO stats
iostats.png (29.34 KiB) Viewed 9699 times
rtt
rtt
rtt.png (26.87 KiB) Viewed 9699 times
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Re: BIND 9.7 host template

Post by timi »

your output looks good, but you have less than 1 q/s
Matteh
Posts: 2
Joined: Sat Apr 14, 2012 9:14 am

Re: BIND 9.7 host template

Post by Matteh »

Weird, cause when i was tailing the messages - There were dns requests pretty much constantly.
neodawg
Posts: 13
Joined: Mon Dec 03, 2007 10:22 pm

Re: BIND 9.7 host template

Post by neodawg »

Hello,

Has anyone seen this issue? I have just setup this template and graph on two different servers and have seen the same result on this graph and other graphs in this template. I am not sure if its something wrong with the polling or that the servers are randomly getting nailed with the traffic that it shows, however it seems that has now happened twice on this graph the first time being almost double the size of this spike.

Anyone have any thoughts on how to eliminate or remedy this.
I am running the newest cacti 8.8a and fedora 14 and bind 9.7 on the servers.

Thanks for any help.
neodawg
Attachments
graph.png
graph.png (55.42 KiB) Viewed 9661 times
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Re: BIND 9.7 host template

Post by timi »

bind was restarted, if you restard bind then the counters are messed, use killspike to remove the spike
neodawg
Posts: 13
Joined: Mon Dec 03, 2007 10:22 pm

Re: BIND 9.7 host template

Post by neodawg »

timi wrote:bind was restarted, if you restard bind then the counters are messed, use killspike to remove the spike

Thanks,
Right after I posted I remembered something about a spike killer, so I just got that setup and installed. Now I am just waiting for it to run and remove the spikes.
kokel
Posts: 2
Joined: Sat Jun 23, 2012 11:41 am

Re: BIND 9.7 host template

Post by kokel »

Hello,

I also use this template and cacti is already graphing some stats but all the values are zero (see attachment). What do I wrong?

Regards,
Kokel
Attachments
dns.png
dns.png (25.75 KiB) Viewed 9327 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: BIND 9.7 host template

Post by gandalf »

The printed values are rounded. The graphs show, that the number of queries is in the range << 1. So it is very likely, that numbers are rounded to 0. So I assume you're graphing a low usage dns
R.
kokel
Posts: 2
Joined: Sat Jun 23, 2012 11:41 am

Re: BIND 9.7 host template

Post by kokel »

Hmm,
ok, what means the "m" behind th values on y axis?
How can I modify this that the graph will show the current absolute values?

Regards,
Kokel
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Re: BIND 9.7 host template

Post by timi »

mili or 10^-3

you can start by reading http://docs.cacti.net/manual:087
uno
Posts: 32
Joined: Mon Aug 27, 2007 7:22 am

Re: BIND 9.7 host template

Post by uno »

Hmm, I don't really like the idea of running snmpd as root... I fixed the rndc.key problem by adding the snmp user to the bind group, but I still have the problem with removing the named.stats file.
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Re: BIND 9.7 host template

Post by timi »

sorry, I can't help you with linux related problems.
fonts
Posts: 22
Joined: Tue Jan 08, 2008 8:19 pm

Re: BIND 9.7 host template

Post by fonts »

Hello,

i have added the script however i am getting the following errors

Code: Select all

10/15/2012 07:40:07 PM - CMDPHP: Poller[0] Host[6] DS[53] CMD: /usr/share/cacti/site/scripts/bind-stats.sh 192.168.1.9, output: iso.3.6.1.4.1.18689.0.1.4.1.2.14.100.110.115.99.97.99.104.101.45.115.116.97.116.115.1 = STRING: a:971 a6:0 aaaa:3 any:0 cname:0 mx:0 naptr:0 ns:133 ptr:1 soa:0 spf:0 srv:0 txt:0 rsnx:2 rsfail:4 rserr: rsipv4qs:922 rsipv4rr:911 rsmismatch: rsqr:18 rsqt:11 rsrtt10: rsrtt100500:186 rsrtt10100:716 rsrtt1600:2 rsrtt500800:4 rsrtt8001600:3 sockopen:924 sockclosed:922 sockbf: consest:922
10/15/2012 07:40:07 PM - CMDPHP: Poller[0] Host[6] DS[53] WARNING: Result from CMD not valid. Partial Result: iso.3.6.1.4.1.18689.
10/15/2012 07:40:07 PM - CMDPHP: Poller[0] Host[6] DS[51] CMD: /usr/share/cacti/site/scripts/bind-stats.sh 192.168.1.9, output: iso.3.6.1.4.1.18689.0.1.4.1.2.14.100.110.115.99.97.99.104.101.45.115.116.97.116.115.1 = STRING: a:971 a6:0 aaaa:3 any:0 cname:0 mx:0 naptr:0 ns:133 ptr:1 soa:0 spf:0 srv:0 txt:0 rsnx:2 rsfail:4 rserr: rsipv4qs:922 rsipv4rr:911 rsmismatch: rsqr:18 rsqt:11 rsrtt10: rsrtt100500:186 rsrtt10100:716 rsrtt1600:2 rsrtt500800:4 rsrtt8001600:3 sockopen:924 sockclosed:922 sockbf: consest:922
10/15/2012 07:40:07 PM - CMDPHP: Poller[0] Host[6] DS[51] WARNING: Result from CMD not valid. Partial Result: iso.3.6.1.4.1.18689.
10/15/2012 07:40:07 PM - CMDPHP: Poller[0] Host[6] DS[52] CMD: /usr/share/cacti/site/scripts/bind-stats.sh 192.168.1.9, output: iso.3.6.1.4.1.18689.0.1.4.1.2.14.100.110.115.99.97.99.104.101.45.115.116.97.116.115.1 = STRING: a:971 a6:0 aaaa:3 any:0 cname:0 mx:0 naptr:0 ns:133 ptr:1 soa:0 spf:0 srv:0 txt:0 rsnx:2 rsfail:4 rserr: rsipv4qs:922 rsipv4rr:911 rsmismatch: rsqr:18 rsqt:11 rsrtt10: rsrtt100500:186 rsrtt10100:716 rsrtt1600:2 rsrtt500800:4 rsrtt8001600:3 sockopen:924 sockclosed:922 sockbf: consest:922
10/15/2012 07:40:07 PM - CMDPHP: Poller[0] Host[6] DS[52] WARNING: Result from CMD not valid. Partial Result: iso.3.6.1.4.1.18689.
10/15/2012 07:40:07 PM - CMDPHP: Poller[0] Host[6] DS[54] CMD: /usr/share/cacti/site/scripts/bind-stats.sh 192.168.1.9, output: iso.3.6.1.4.1.18689.0.1.4.1.2.14.100.110.115.99.97.99.104.101.45.115.116.97.116.115.1 = STRING: a:971 a6:0 aaaa:3 any:0 cname:0 mx:0 naptr:0 ns:133 ptr:1 soa:0 spf:0 srv:0 txt:0 rsnx:2 rsfail:4 rserr: rsipv4qs:922 rsipv4rr:911 rsmismatch: rsqr:18 rsqt:11 rsrtt10: rsrtt100500:186 rsrtt10100:716 rsrtt1600:2 rsrtt500800:4 rsrtt8001600:3 sockopen:924 sockclosed:922 sockbf: consest:922
10/15/2012 07:40:07 PM - CMDPHP: Poller[0] Host[6] DS[54] WARNING: Result from CMD not valid. Partial Result: iso.3.6.1.4.1.18689.
any help would be greatly appreciated

Thanks
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Re: BIND 9.7 host template

Post by timi »

looks like some of the variables are not readed from the stats file, run the script manualy and see if any errors
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests