BIND 9 Statistics for Cacti

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

Moderators: Developers, Moderators

Post Reply
razvanu
Posts: 7
Joined: Thu Jan 08, 2009 4:38 am
Location: Ro
Contact:

Post by razvanu »

Mike Adolphs wrote: This has not just something to do with increasing the amount of OIDs per snmpwalk but rather with the snmp timeout configuration variable. Simply increase the timeout value within your host configuration from 500ms to several seconds and you're set.
thanks....it's working now

i have bind 9.6.1 and cacti 0.8.7d
100matolog
Posts: 41
Joined: Sun Dec 20, 2009 3:15 am
Location: Kiev

not working

Post by 100matolog »

Trying to make " INSTALLATION - SNMP"

OS on client server

Code: Select all

OS  FreeBSD 6.3-RELEASE #0

Code: Select all

[root@ut4 /usr/local/etc/snmp]# perl -v

This is perl, v5.8.8 built for amd64-freebsd
SNMP-Extension-PassPersist-0.03 - Compiled by hand

Trying manually run bind9-stats-snmpd.p

Code: Select all

 /usr/bin/perl /usr/local/etc/snmp/bind9-stats-snmpd.pl
logfile bind9-stats.log is empty

source bind9-stats-snmpd.pl

Code: Select all

$DEBUG = 0;

$STAT_FILE = "/var/stats/named.stats";
$OID = ".1.3.6.1.4.1.2021.55";
$LOG = "/var/log/bind9-stats.log";
my named.conf (bind is chroot-ed)

Code: Select all

options {
        directory "/etc/namedb";
        notify yes;
        statistics-file "/var/stats/named.stats";
        zone-statistics yes;
        recursion yes;
physically, the file named.stats is located in the directory /usr/local/sandbox/BIND/var/stats
I make symlink this directory into /var/~stats
I made /usr/local/etc/rc.d/snmpd restart
then
I go to the sever with Cacti and trying to :

Data Query Debug Information

Code: Select all

+ Running data query [13].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.55.1'
+ Index found at OID: '.1.3.6.1.4.1.2021.55.1.0' value: '0'
+ Located input field 'bindIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.55.1'
+ Found item [bindIndex='0'] index: 0 [from value]
+ Located input field 'bindName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.55.2'
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
So, it's looks fine. But grafic still empty.
Tryinf resolve by snmpwalk on server and client

client

Code: Select all

[root@ut4 /usr/local/sandbox/BIND/var/stats]# snmpwalk -v2c -c cacti localhost  .1.3.6.1.4.1.2021.55
UCD-SNMP-MIB::ucdavis.55.1.0 = INTEGER: 0
on server-side

Code: Select all

[root@d3 ~]# snmpwalk -v 1 -c cacti ut4.***.*** .1.3.6.1.4.1.2021.55
UCD-SNMP-MIB::ucdavis.55.1.0 = INTEGER: 0
What do I wrong? Please help[/code]
iles
Posts: 1
Joined: Fri Jan 22, 2010 5:51 am

Post by iles »

I have the same problem.
Installed build 2.0, download here.
Charts zero.
I bring the logs:


ns1:/usr/bind9-snmp-20/snmp# snmpwalk -v 2c -c iles13 127.0.0.1 .1.3.6.1.4.1.2021.55
UCD-SNMP-MIB::ucdavis.55.1.0 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.2.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = STRING: "/usr/local/bind9-stats-snmpd.pl"
UCD-SNMP-MIB::ucdavis.55.2.1.3.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = ""
UCD-SNMP-MIB::ucdavis.55.2.1.4.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = ""
UCD-SNMP-MIB::ucdavis.55.2.1.5.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 5
UCD-SNMP-MIB::ucdavis.55.2.1.6.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.2.1.7.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.2.1.20.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 4
UCD-SNMP-MIB::ucdavis.55.2.1.21.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.3.1.1.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = STRING: "add_oid_entry(.1.3.6.1.4.1.2021.55.1.1, 'integer', 1)"
UCD-SNMP-MIB::ucdavis.55.3.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = STRING: "add_oid_entry(.1.3.6.1.4.1.2021.55.1.1, 'integer', 1)
add_oid_entry(.1.3.6.1.4.1.2021.55.2.1, 'integer', GLOBAL)
add_oid_entry(.1.3.6.1.4.1.2021.55.3.1, 'integer', GLOBAL)
add_oid_entry(.1.3.6.1.4.1.2021.55.4.1, 'integer', GLOBAL)
add_oid_entry(.1.3.6.1.4.1.2021.55.5.1, 'integer', GLOBAL)
add_oid_entry(.1.3.6.1.4.1.2021.55.6.1, 'integer', GLOBAL)
add_oid_entry(.1.3.6.1.4.1.2021.55.7.1, 'integer', GLOBAL)
add_oid_entry(.1.3.6.1.4.1.2021.55.8.1, 'integer', GLOBAL)
>>add_oid_entry(.1.3.6.1.4.1.2021.55.3.1, 'integer', 1758)
>>add_oid_entry(.1.3.6.1.4.1.2021.55.7.1, 'integer', 7075)
>>add_oid_entry(.1.3.6.1.4.1.2021.55.6.1, 'integer', 4)
>>add_oid_entry(.1.3.6.1.4.1.2021.55.5.1, 'integer', 5313)
>>add_oid_entry(.1.3.6.1.4.1.2021.55.8.1, 'integer', 1856)"
UCD-SNMP-MIB::ucdavis.55.3.1.3.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 13
UCD-SNMP-MIB::ucdavis.55.3.1.4.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.55.4.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108.1 = STRING: "add_oid_entry(.1.3.6.1.4.1.2021.55.1.1, 'integer', 1)"
UCD-SNMP-MIB::ucdavis.55.4.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108.2 = STRING: "add_oid_entry(.1.3.6.1.4.1.2021.55.2.1, 'integer', GLOBAL)"
UCD-SNMP-MIB::ucdavis.55.4.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108.3 = STRING: "add_oid_entry(.1.3.6.1.4.1.2021.55.3.1, 'integer', GLOBAL)"
UCD-SNMP-MIB::ucdavis.55.4.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108.4 = STRING: "add_oid_entry(.1.3.6.1.4.1.2021.55.4.1, 'integer', GLOBAL)"
UCD-SNMP-MIB::ucdavis.55.4.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108.5 = STRING: "add_oid_entry(.1.3.6.1.4.1.2021.55.5.1, 'integer', GLOBAL)"
UCD-SNMP-MIB::ucdavis.55.4.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108.6 = STRING: "add_oid_entry(.1.3.6.1.4.1.2021.55.6.1, 'integer', GLOBAL)"
UCD-SNMP-MIB::ucdavis.55.4.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108.7 = STRING: "add_oid_entry(.1.3.6.1.4.1.2021.55.7.1, 'integer', GLOBAL)"
UCD-SNMP-MIB::ucdavis.55.4.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108.8 = STRING: "add_oid_entry(.1.3.6.1.4.1.2021.55.8.1, 'integer', GLOBAL)"
UCD-SNMP-MIB::ucdavis.55.4.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108.9 = STRING: ">>add_oid_entry(.1.3.6.1.4.1.2021.55.3.1, 'integer', 1758)"
UCD-SNMP-MIB::ucdavis.55.4.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108.10 = STRING: ">>add_oid_entry(.1.3.6.1.4.1.2021.55.7.1, 'integer', 7075)"
UCD-SNMP-MIB::ucdavis.55.4.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108.11 = STRING: ">>add_oid_entry(.1.3.6.1.4.1.2021.55.6.1, 'integer', 4)"
UCD-SNMP-MIB::ucdavis.55.4.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108.12 = STRING: ">>add_oid_entry(.1.3.6.1.4.1.2021.55.5.1, 'integer', 5313)"
UCD-SNMP-MIB::ucdavis.55.4.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108.13 = STRING: ">>add_oid_entry(.1.3.6.1.4.1.2021.55.8.1, 'integer', 1856)"
ns1:/usr/bind9-snmp-20/snmp#


Data Source Debug

/usr/bin/rrdtool create \
/var/www/html/rra/srv_ns1_bind9_referral_1114.rrd \
--step 60 \
DS:referral:DERIVE:120:0:100 \
DS:nxrrset:DERIVE:120:0:100 \
DS:recursion:DERIVE:120:0:100 \
DS:nxdomain:DERIVE:120:0:100 \
DS:failure:DERIVE:120:0:100 \
DS:success:DERIVE:120:0:U \
RRA:AVERAGE:0.5:1:10080 \
RRA:AVERAGE:0.5:1:25920 \
RRA:AVERAGE:0.5:6:9000 \
RRA:AVERAGE:0.5:24:2250 \
RRA:AVERAGE:0.5:288:797 \
RRA:MIN:0.5:1:10080 \
RRA:MIN:0.5:1:25920 \
RRA:MIN:0.5:6:9000 \
RRA:MIN:0.5:24:2250 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:10080 \
RRA:MAX:0.5:1:25920 \
RRA:MAX:0.5:6:9000 \
RRA:MAX:0.5:24:2250 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:10080 \
RRA:LAST:0.5:1:25920 \
RRA:LAST:0.5:6:9000 \
RRA:LAST:0.5:24:2250 \
RRA:LAST:0.5:288:797 \



RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="SRV_NS1 | BIND9 - BIND 9 |query_bindName| Statistics" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="queries per 5 minutes" \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/www/html/rra/srv_ns1_bind9_referral_1114.rrd":success:AVERAGE \
DEF:b="/var/www/html/rra/srv_ns1_bind9_referral_1114.rrd":failure:AVERAGE \
DEF:c="/var/www/html/rra/srv_ns1_bind9_referral_1114.rrd":nxdomain:AVERAGE \
CDEF:cdefa=a,300,* \
CDEF:cdefe=b,300,* \
CDEF:cdefi=c,300,* \
LINE1:cdefa#00CF00FF:"Successful Queries" \
GPRINT:cdefa:LAST:"Current\:%8.2lf%s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf%s\n" \
LINE1:cdefe#FF0000FF:"Failed Queries" \
GPRINT:cdefe:LAST:" Current\:%8.2lf%s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf%s\n" \
LINE1:cdefi#FF6044FF:"NXDOMAIN Queries" \
GPRINT:cdefi:LAST:" Current\:%8.2lf%s" \
GPRINT:cdefi:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefi:MAX:"Maximum\:%8.2lf%s\n"

RRDTool Says:

OK

OS - CactiEZ 0.6

Help!!!! ))))
ari
Posts: 24
Joined: Fri Jan 08, 2010 10:29 am

Post by ari »

razvanu wrote:
Mike Adolphs wrote: This has not just something to do with increasing the amount of OIDs per snmpwalk but rather with the snmp timeout configuration variable. Simply increase the timeout value within your host configuration from 500ms to several seconds and you're set.
thanks....it's working now

i have bind 9.6.1 and cacti 0.8.7d
Anyone having the "No SNMP Data" problem with the "SNMP"-based configuration, running bind 9.6.1 on a solaris 10 box, and cacti on Linux, may want to take look at this post:

http://forums.cacti.net/viewtopic.php?t ... highlight=
T113
Posts: 1
Joined: Mon Jul 30, 2007 10:53 am

Post by T113 »

I was having a problem on Ubuntu Server 9.10, where the snmpd.conf line
pass .1.3.6.1.4.1.2021.55 /usr/bin/perl /usr/local/bind9-stats-snmpd.pl
didn't appear to add the .55 OIDs.

I corrected this by issuing the following command as root (This command is listed in the comments section of bind9-stats-snmpd.pl, on line 17)
cpan SNMP::Extension::PassPersist
I had to answer several questions, just hit (enter) for the defaults, and restarted snmpd.

I hope this helps someone.
basd
Posts: 5
Joined: Mon Aug 18, 2008 2:02 am

can't get it working :cry: :cry: :cry: :cry:

Post by basd »

Hello,

i can't get the graphs for bind working

in the loggin i see

Code: Select all

+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/bind9-stats-snmp.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.55.1'
+ No SNMP data returned
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/bind9-stats-snmp.xml'
the smpd.conf stuff

Code: Select all

com2sec readonly  default          hobbynet-ro

pass .1.3.6.1.4.1.2021.55 /usr/bin/perl /usr/local/bin/bind9-stats-snmpd.pl


when i run the the /bind9-stats-snmpd.pl script

Code: Select all

root@ns:/etc/snmp# /usr/local/bin/bind9-stats-snmpd.pl

NONE

NONE

When i run i get good output

Code: Select all

root@ns:~/bind9-stats/local# ./bind9-stats.pl index
GLOBAL
dikkenberg.name

does anyone have a idea how to fix this ?
duncan caldwell
Posts: 3
Joined: Tue Apr 06, 2010 9:55 pm
Location: Auckland, New Zealand

Problem installing on Debian

Post by duncan caldwell »

I am in the process of building an new Debian DNS server and I have installed Debian 5.0, BIND 6.5.1 and I am trying to set it up so Cacti can monitor BIND.

I have been using this script successfully on Debian 4.0 and BIND 6.4.3, but want to start using more up to date versions.

Everything works well except when I try to run the bind9-stats-snmpd.pl and I get the following error

Code: Select all

mg2:/bin# /usr/bin/perl /bin/bind9-stats-snmpd.pl
Can't locate SNMP/Extension/PassPersist.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /bin/bind9-stats-snmpd.pl line 48.
BEGIN failed--compilation aborted at /bin/bind9-stats-snmpd.pl line 48.
I understand that the CPAN SNMP::Extension::PassPersist is required but I can not see how to install it for Debian 5.0

Any assistance would be appreciated.

Thanks
locutus233
Posts: 14
Joined: Tue Mar 17, 2009 2:49 pm

Post by locutus233 »

How to install your missing module:

Shell# cpan SNMP::Extension::PassPersist

Follow the prompts.
arnotron
Posts: 1
Joined: Fri Apr 30, 2010 6:11 am

Errors with the script

Post by arnotron »

Hello,

I tried to set up version bind9-snmp_1.pre8 on my Debian GNU/Linux-Server, but get the following errors. The reason seems to be that my stats-file has a different formatting than the script expects.

Code: Select all

Argument "Incoming" isn't numeric in addition (+) at /usr/local/bin/bind9-snmp-stats.pl line 612, <DUMP> line 2.
Argument "Incoming" isn't numeric in addition (+) at /usr/local/bin/bind9-snmp-stats.pl line 612, <DUMP> line 4.
Argument "Outgoing" isn't numeric in addition (+) at /usr/local/bin/bind9-snmp-stats.pl line 612, <DUMP> line 16.
...
My stats-file begins as follows:

Code: Select all

+++ Statistics Dump +++ (1272626770)
++ Incoming Requests ++
                9113 QUERY
++ Incoming Queries ++
                3370 A
                  15 NS
                   8 SOA
                1385 PTR
                 965 MX
                 666 TXT
                2670 AAAA
                  16 SRV
                   5 A6
                  12 SPF
                   1 ANY
++ Outgoing Queries ++
[View: default]
                5441 A
                  15 NS
                1539 PTR
                 379 MX
                 631 TXT
                5371 AAAA
                   6 SRV
                   6 SPF
…
Was there a change in the file's format, or do I need to set some undocumented option?

I am using Bind Version 1:9.5.1.dfsg.P3-1.
DWAyotte
Posts: 32
Joined: Wed Mar 28, 2007 1:37 pm

Post by DWAyotte »

I am having a strange issue.
I seem be sharing the same issue as 100matolog.

snmpwalk

Code: Select all

snmpwalk -v 1 -c public x.x.x.x .1.3.6.1.4.1.2021.55
UCD-SNMP-MIB::ucdavis.55.1.0 = INTEGER: 0
Data Query Debug Information

Code: Select all

+ Running data query [16].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.55.1'
+ Index found at OID: '1.3.6.1.4.1.2021.55.1.0' value: '0'
+ Located input field 'bindIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.55.1'
+ Found item [bindIndex='0'] index: 0 [from value]
+ Located input field 'bindName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.55.2'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
Graph Debug

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='ns1 - BIND 9 |query_bindName| Statistics' \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label='queries per 5 minutes' \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/ns1_referral_183.rrd":success:AVERAGE \
DEF:b="/var/www/cacti/rra/ns1_referral_183.rrd":failure:AVERAGE \
DEF:c="/var/www/cacti/rra/ns1_referral_183.rrd":nxdomain:AVERAGE \
CDEF:cdefa=a,300,* \
CDEF:cdefe=b,300,* \
CDEF:cdefi=c,300,* \
LINE1:cdefa#00CF00FF:"Successful Queries"  \
GPRINT:cdefa:LAST:"Current\:%8.2lf%s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf%s\n"  \
LINE1:cdefe#FF0000FF:"Failed Queries"  \
GPRINT:cdefe:LAST:"    Current\:%8.2lf%s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf%s\n"  \
LINE1:cdefi#FF6044FF:"NXDOMAIN Queries"  \
GPRINT:cdefi:LAST:"  Current\:%8.2lf%s"  \
GPRINT:cdefi:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:cdefi:MAX:"Maximum\:%8.2lf%s\n" 

RRDTool Says:

OK
I am not sure what the problem is, it almost seems that my stats file isn't being parsed correctly, but I don't know, just a hunch.

my cron job is running every 5 minutes successfully and creating my named_stats.txt file. There is data in it and I only have 2 zones, but I am not sure what isn't working at this point.
I am running bind 9.3.3 in a chroot jail. I have suspicions that this could be causing some sort of issue, but I can't confirm that as I don't know enough about the permissions and other aspects of these scripts.
I am using the 2.0 version a few pages behind this one.
Any help would be greatly appreciated. It feels like I am really close. Thanks a ton.
cenil
Posts: 18
Joined: Tue Nov 13, 2007 4:05 am
Location: Jakarta, Indonesia
Contact:

Post by cenil »

Dear All,

I have a problem with bind 9 statistic query. I canot get the graphs, below the data query debug information :

+ Running data query [12].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/bind9-stats_domains.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.8767.2.1.4.1'
+ No SNMP data returned
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/bind9-stats_domains.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/bind9-stats_domains.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/bind9-stats_domains.xml'

What should i do ?
Thank you all.
Attachments
Picture 5.png
Picture 5.png (27.91 KiB) Viewed 23830 times
inkydjango
Posts: 1
Joined: Wed Jun 02, 2010 5:32 am

RNDC does not work

Post by inkydjango »

Hello,

I have the same problem that indicated to the third page of this post.

When I make 'rndc stats':
rndc: 'stats' failed: permission denied


My key-rndc is correct (no error messges) and my files /etc/named.conf:

options {
directory "/var/named";
version "No version info available";

#---cacti rndc ---
zone-statistics yes;
statistics-file "/var/named/named.stats";

#-----------


.......

The files in question indicate :


[root@x ~]# stat /var/named/named.stats
File: `/var/named/named.stats'
Size: 0 Blocks: 0 IO Block: 4096 fichier régulier vide
Device: 805h/2053d Inode: 2164554 Links: 1
Access: (0777/-rwxrwxrwx) Uid: ( 25/ named) Gid: ( 25/ named)
Access: 2010-06-17 12:02:19.000000000 +0200
Modify: 2010-06-16 20:21:34.000000000 +0200
Change: 2010-06-16 20:50:01.000000000 +0200



I have seen several post that indicate that I must change the grant of the file, but I church again how I must do.


I have seen this command but no setsebool installed on my centos.

[root@x ~]# setsebool -P named_disable_trans off
setsebool: SELinux is disabled.


Can you help me, i think that you have the response on your box.

Thanks, regards
chefchanyu
Cacti User
Posts: 153
Joined: Wed Aug 25, 2010 11:07 pm

Post by chefchanyu »

Mike Adolphs wrote:
aleu wrote:
Mike Adolphs wrote:This has not just something to do with increasing the amount of OIDs per snmpwalk but rather with the snmp timeout configuration variable. Simply increase the timeout value within your host configuration from 500ms to several seconds and you're set.
Can someone point me to the working template? I see plenty of posts on BIND 9.5 but none of them seems to work for me (I am getting a timeout when executing snmpwalk against the remote BIND server. When I do not specify the OID ".1.3.6.1.4.1.2021.55" I get the results, but no DNS information, of course.
I need to query a remote BIND server via SNMP. Please advise which template works for you (or upload the most recent version one more time).

Thanks a lot.
There you go. The attached version works just fine. Stick to the documentation which can be found within the archive.

Generally it works like this:
1.) Copy the bind9-genstats.sh and the bind9-stats-snmp.pl script on your BIND server.
2.) Alter the bind9-stats-snmp.pl script in line 52 to fit your named.stats file's location
3.) Same with bind9-genstats.sh in line 16.
4.) Create the cronjob which frequently runs bind9-genstats.sh every 5min
5.) Alter your /etc/snmp/snmpd.conf so that it's able to serve the BIND information via the perl script
6.) Restart the SNMP daemon
7.) Do a manual snmpwalk -v2c -c <whather community string you have put in here> IP .1.3.6.1.4.1.2021.55 and you should get results. Otherwise you've messed something up in the first place and Cacti won't be able to pull data either.
8.) Integrate the template into Cacti and configure your data sources, graphs and so on via the web-interface.

Possible downfalls could be file or directory permissions, not sufficient rights to run rndc stats or else, but these are the most common.

Best regards,
Mike Adolphs

Hi:
Will that work on Cacti 0.87e and Bind 9.6.1 on Solaris 10?
dj_seijin
Posts: 7
Joined: Tue Mar 15, 2005 9:25 am

Re: BIND 9 Statistics for Cacti

Post by dj_seijin »

where i can download the tar.gz,,,,,

link : http://uversaconsulting.net/download/bi ... 1.0.tar.gz ----- not working" =(
levonti
Posts: 1
Joined: Wed Dec 01, 2010 9:08 am

Re: BIND 9 Statistics for Cacti

Post by levonti »

FreeBSD
I have a problem whith bind9-stats-snmpd.pl

Code: Select all

snmpwalk -c {COM} -v2c {IP} .1.3.6.1.4.1.2021.55              
UCD-SNMP-MIB::ucdavis.55.1.0 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.2.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = STRING: "/var/named/var/cacti/bind9-stats-snmpd.pl"
UCD-SNMP-MIB::ucdavis.55.2.1.3.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = ""
UCD-SNMP-MIB::ucdavis.55.2.1.4.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = ""
UCD-SNMP-MIB::ucdavis.55.2.1.5.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 5
UCD-SNMP-MIB::ucdavis.55.2.1.6.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.2.1.7.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.2.1.20.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 4
UCD-SNMP-MIB::ucdavis.55.2.1.21.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.3.1.1.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = ""
UCD-SNMP-MIB::ucdavis.55.3.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = ""
UCD-SNMP-MIB::ucdavis.55.3.1.3.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.3.1.4.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.55.4.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108.1 = ""
Whith debug

Code: Select all

snmpwalk -c {COM} -v2c {IP} .1.3.6.1.4.1.2021.55 
UCD-SNMP-MIB::ucdavis.55.1.0 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.2.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = STRING: "/var/named/var/cacti/bind9-stats-snmpd.pl"
UCD-SNMP-MIB::ucdavis.55.2.1.3.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = ""
UCD-SNMP-MIB::ucdavis.55.2.1.4.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = ""
UCD-SNMP-MIB::ucdavis.55.2.1.5.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 5
UCD-SNMP-MIB::ucdavis.55.2.1.6.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.2.1.7.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.2.1.20.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 4
UCD-SNMP-MIB::ucdavis.55.2.1.21.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.3.1.1.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = STRING: "Adding stat .1.3.6.1.4.1.2021.55.3.1: 203213391"
UCD-SNMP-MIB::ucdavis.55.3.1.2.13.47.117.115.114.47.98.105.110.47.112.101.114.108 = STRING: "Adding stat .1.3.6.1.4.1.2021.55.3.1: 203213391
Adding stat .1.3.6.1.4.1.2021.55.7.1: 83656
Adding stat .1.3.6.1.4.1.2021.55.6.1: 7178228
Adding stat .1.3.6.1.4.1.2021.55.5.1: 11071512
Adding stat .1.3.6.1.4.1.2021.55.8.1: 45551758
Adding stat .1.3.6.1.4.1.2021.55.4.1: 11985625
Adding Index .1.3.6.1.4.1.2021.55.1.2: 2
Adding Name .1.3.6.1.4.1.2021.55.2.2: 0.0.127.IN-ADDR.ARPA
Adding stat .1.3.6.1.4.1.2021.55.3.2: 0
Adding stat .1.3.6.1.4.1.2021.55.7.2: 0
Adding stat .1.3.6.1.4.1.2021.55.6.2: 0
Adding stat .1.3.6.1.4.1.2021.55.5.2: 0
Adding stat .1.3.6.1.4.1.2021.55.8.2: 0
Adding stat .1.3.6.1.4.1.2021.55.4.2: 0
Cacti

Code: Select all

+ Running data query [12].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.55.1'
+ Index found at OID: '1.3.6.1.4.1.2021.55.1.0' value: '1'
+ Located input field 'bindIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.55.1'
+ Found item [bindIndex='1'] index: 0 [from value]
+ Located input field 'bindName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.55.2'
+ Found item [bindName='/var/named/var/cacti/bind9-stats-snmpd.pl'] index: 108 [from value]
+ Found item [bindName=''] index: 108 [from value]
+ Found item [bindName=''] index: 108 [from value]
+ Found item [bindName='5'] index: 108 [from value]
+ Found item [bindName='1'] index: 108 [from value]
+ Found item [bindName='1'] index: 108 [from value]
+ Found item [bindName='4'] index: 108 [from value]
+ Found item [bindName='1'] index: 108 [from value]
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/bind9-stats-snmp.xml'

Code: Select all

BIND 9 Statistics (SNMP) 	(Verbose Query) 	Uptime Goes Backwards 	Success [2 Items, 2 Rows] 
any ideas?
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests