BIND 9.7 (only) host template

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

Moderators: Developers, Moderators

vpanos
Posts: 4
Joined: Fri Nov 05, 2010 12:24 am

Re: BIND 9.7 (only) host template

Post by vpanos »

vpanos wrote:
timi wrote:if you define all $vars as 0 in the perl script I think the spikes should not appear
Thank you for your reply, I tried your advice but it didn't work. I don't know perl very well so there is a chance I did it wrong.
Anyway, spike killer finally worked and cleared the graphs, I just needed to apply it many times in every graph.

I tried something else today.
I changed the data source type in the template from "counter" to "derive"
I tried 2-3 restarts and no spikes appear in the graphs.
I'm not sure this breaks something else but everything looks good for about 3 hours now.
HBomb
Posts: 38
Joined: Tue Sep 03, 2013 11:32 am
Location: UK

Re: BIND 9.7 (only) host template

Post by HBomb »

I deployed these on Bind 9.9, looks like its working fine (i dont have a lot of requests/load on the servers to be certain).
What's confusing at first is that in the stats output you won't see lines with stats "0". If for example there never were requests with latency "> 1600 ms" you'll see nan/0. So I'm yet to confirm if all possible statistic types can get matched, in any case, wicked template, kudos!
HBomb
Posts: 38
Joined: Tue Sep 03, 2013 11:32 am
Location: UK

Re: BIND 9.7 (only) host template

Post by HBomb »

I do initialise the vars to 0 but I got a spike even when the server wasnt restarted only for "ns" and it definitely had a normal value returned.
huybac.nguyen
Posts: 24
Joined: Mon Mar 07, 2011 2:02 am
Location: Viet Nam
Contact:

Re: BIND 9.7 (only) host template

Post by huybac.nguyen »

Please help me.

]# named -v
BIND 9.7.1-P2

# snmpd -v

NET-SNMP version: 5.5
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net

# ./runstats.sh
a:5 a6:0 aaaa:0 any:0 cname:0 mx:0 naptr:0 ns:1 ptr:0 soa:0 spf:0 srv:0 txt:0 rsnx: rsfail: rserr: rsipv4qs:4 rsipv4rr:4 rsmismatch: rsqr: rsqt: rsrtt10:1 rsrtt100500:1 rsrtt10100:2 rsrtt1600: rsrtt500800: rsrtt8001600: sockopen:6 sockclosed:4 sockbf: consest:4 recverr:

# more /etc/snmp/snmpd.conf
....................................
#
# See the snmpd.conf manual page, and the output of "snmpd -H".
extend .1.3.6.1.4.1.18689.0.1 dnscache-stats /data/logdns/runstats.sh

# service snmpd restart
Stopping snmpd: [ OK ]
Starting snmpd: [ OK ]
[


But

# snmpwalk -v 2c -Ovq -c public localhost .1.3.6.1.4.1.18689.0.1
No more variables left in this MIB View (It is past the end of the MIB tree)
[

AND
I don't know why have to be: .1.3.6.1.4.1.18689.0.1
Why isnt another. What ".1.3.6.1.4.1.18689.0.1" is ???
Please help me.
Thanks
huybac.nguyen
Posts: 24
Joined: Mon Mar 07, 2011 2:02 am
Location: Viet Nam
Contact:

Re: BIND 9.7 (only) host template

Post by huybac.nguyen »

OK.
I've resloved it.
This is my snmpd.conf

Old:

Code: Select all

# snmpd.conf:
com2sec notConfigUser  default       public
group   notConfigGroup v1           notConfigUser
group   notConfigGroup v2c           notConfigUser
[b][i]view    systemview    included   .1.3.6.1.2.1.1
view    systemview    included   .1.3.6.1.2.1.25.1.1[/i][/b]
access  notConfigGroup ""      any       noauth    exact  systemview none none
com2sec mynetwork 0.0.0.0/0     public

syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)

dontLogTCPWrappersConnects yes

mibDirs  +/usr/local/lib/snmp/mibs/
mibs ALL
showMibErros yes

[i][b]extend .1.3.6.1.4.1.18689.0.1 dnscache-stats /data/logdns/runstats.sh[/b][/i]
# 
i've added a line

view systemview included .1.3.6.1.4.1
same sub head of my command: extend .1.3.6.1.4.1.18689.0.1 dnscache-stats /data/logdns/runstats.sh

==> DONE.

But have another error

# /usr/bin/snmpget -v 2c -Ovq -c public localhost .1.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
"/data/logdns/runstats.sh: Permission denied"
# chmod 755 runstats.sh
# /usr/bin/snmpget -v 2c -Ovq -c public localhost .1.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
"/data/logdns/runstats.sh: Permission denied"

have 2 way to reslove.
1. Allow runstats.sh can run by user who run snmp.
2. Don't run snmp by acc default: service snmpd start.
run by acc root:
#snmpd -c /etc/snmp/snmpd.conf

then.
# /usr/bin/snmpget -v 2c -Ovq -c public localhost .1.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
"a:57 a6:0 aaaa:214 any:0 cname:0 mx:46 naptr:0 ns:2 ptr:24 soa:0 spf:0 srv:0 txt:0 rsnx:16 rsfail: rserr: rsipv4qs:58 rsipv4rr:58 rsmismatch: rsqr:11 rsqt: rsrtt10:13 rsrtt100500:7 rsrtt10100:38 rsrtt1600: rsrtt500800: rsrtt8001600: sockopen:60 sockclosed:58 sockbf: consest:58 recverr:"

And from my Cacti Server
#/var/www/html/cacti/scripts//bind-stats.sh 192.168.1.5
a:57 a6:0 aaaa:347 any:222 cname:0 mx:184 naptr:0 ns:2 ptr:24 soa:0 spf:0 srv:0 txt:0 rsnx:18 rsfail: rserr: rsipv4qs:60 rsipv4rr:60 rsmismatch: rsqr:13 rsqt: rsrtt10:14 rsrtt100500:7 rsrtt10100:39 rsrtt1600: rsrtt500800: rsrtt8001600: sockopen:62 sockclosed:60 sockbf: consest:60 recverr:
[root@localhost scripts]#

and show rrd file
[root@localhost rra]# ls -l | more
total 3789576
-rw-r--r--. 1 cacti cacti 85834424 Apr 11 04:56 dns_lab_rsrtt500800_684.rrd
-rw-r--r--. 1 cacti cacti 85834424 Apr 11 04:56 dns_lab_rsrtt500800_685.rrd
-rw-r--r--. 1 cacti cacti 85834424 Apr 11 04:56 dns_lab_rsrtt500800_686.rrd
-rw-r--r--. 1 cacti cacti 85834424 Apr 11 04:56 dns_lab_rsrtt500800_687.rrd
--More--
GGA
Cacti User
Posts: 62
Joined: Mon May 03, 2010 5:56 am

Re: BIND 9.7 (only) host template

Post by GGA »

Thanks a lot for your wonderful work. I still have a question. Well I think it has more to do with my logrotation. But maybe somebody has an answer for me.
I have set up a logrotation that is going to rotate my bind-logs every hour. Log level has been set to info so the amount of data is pretty high.
named config sample

Code: Select all

    channel query.log {
        file "/var/log/named/query.log";
        // Set the severity to dynamic to see all the info messages.
        severity info;
        print-category yes;
        print-severity yes;
        print-time yes;
    };
logrotate config

Code: Select all

{
    daily
    rotate 168
    compress
    compresscmd /bin/bzip2
    compressoptions --best
    compressext .bz2
    missingok
    delaycompress
    create 0664 bind root
    postrotate
      /etc/init.d/bind9 reload > /dev/null
    endscript
}
These peaks have to do with my logrotation. Any idea who prohibit these?
Attachments
Snap 2014-04-15 at 10.14.04.png
Snap 2014-04-15 at 10.14.04.png (68.63 KiB) Viewed 7353 times
Snap 2014-04-15 at 10.14.21.png
Snap 2014-04-15 at 10.14.21.png (71.43 KiB) Viewed 7353 times
Snap 2014-04-15 at 10.13.53.png
Snap 2014-04-15 at 10.13.53.png (52.97 KiB) Viewed 7353 times
huybac.nguyen
Posts: 24
Joined: Mon Mar 07, 2011 2:02 am
Location: Viet Nam
Contact:

Re: BIND 9.7 (only) host template

Post by huybac.nguyen »

i thinks have some confuse. We use this Script for log Stats.
But it Rotate log, you rotate log fog log channel.
huybac.nguyen
Posts: 24
Joined: Mon Mar 07, 2011 2:02 am
Location: Viet Nam
Contact:

Re: BIND 9.7 (only) host template

Post by huybac.nguyen »

i thinks have some confuse. We use this Script for log Stats.
But it Rotate log, you rotate log fog log channel.
godfather216
Posts: 1
Joined: Fri May 29, 2015 4:48 am

Re: BIND 9.7 (only) host template

Post by godfather216 »

Hi..thanks for the great work! This is something I need to get working for my DNS servers.

I've read the whole thread and tweaked my Cacti installation.

But I cannot add the graphs to my CACTI. I can't seem to find the template (bind stats) in GRAPH TEMPLATE nor Data Queries section when I want to add graphs for my server.

Can you please tell me how to add the graphs to CACTI?

I've copied scripts files where it was supposed to be, gave necessary permissions as well. I've also followed http://gregsowell.com/?p=4763.

I'm using:
NET-SNMP version: 5.5
CentOS release 6.6 (Final)
BIND 9.8.2rc1
CACTI Version 0.8.8b

can someone please help me? This is urgent.
User avatar
Phil971
Posts: 2
Joined: Mon Oct 15, 2007 10:49 am
Location: Little Carribean Island

Re: BIND 9.7 (only) host template

Post by Phil971 »

to godfather216:

First, you have to install the original plugin (or at least import the cacti_host_template_bind9_7.xml).
Look @ http://docs.cacti.net/usertemplate:host:bind9.7

There is only a data template in this plugin (cacti_data_template_bind_stats.xml)
elfking
Posts: 1
Joined: Fri Aug 21, 2015 3:55 pm

Re: BIND 9.7 (only) host template

Post by elfking »

Hi All,
I have seen a few others having this issue, where it looks like the data is being cut off... when I do a snmpwalk

Code: Select all

"a:2287 a6:0 aaaa:156 any:0 cname:0 mx:0 naptr:0 ns:13 ptr:8 soa:0 spf:0 srv:25 txt:0 rsnx:4 rsfail: rserr: rsipv4qs:987 rsipv4rr:972 rsmismatch: rsqr:42 rsqt:17 rsrtt10:400 rsrtt100500:65 rsrtt10100:507 rsrtt1600: rsrtt500800: rsrtt8001600: sockopen:1017 sockclosed:1015 sockbf: consest:987 recverr:"

Does anyone have a solution for it? I haven't been able to figure out the cause, but I am pretty sure the values missing is why my data is not graphing...

Thanks!

I am running ubuntu 12.04 LTS,
SNMP version: 5.4.3
bind version: 9.8.1-P1

It feels so close to working yet does not, any hints on where to look would be great. :D
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Re: BIND 9.7 (only) host template

Post by timi »

I'm not sure if this template works with bind 9.8 since it was made for 9.7
jmarti
Posts: 2
Joined: Thu Dec 11, 2014 12:45 pm

Re: BIND 9.7 (only) host template

Post by jmarti »

For the user interested in a plugin suitable to Bind v9.3.6, here I post an adapted version.

The file "runstats.sh" was modified to match the chrooted location of statistics file.

Best regards!
Attachments
Bind9_3_6.zip
(4.72 KiB) Downloaded 333 times
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Re: BIND 9.7 (only) host template

Post by JJX »

What about 9.8 or 9.9 ?
Any updates / fixes ?
cacti rulez!
eviltrooper
Posts: 13
Joined: Fri Mar 11, 2011 7:22 am

Re: BIND 9.7 (only) host template

Post by eviltrooper »

hello.

what about an update for 9.9 because 9.7 is very old ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests