BIND 9 Statistics for Cacti

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

Moderators: Developers, Moderators

Post Reply
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This tells you, that the target snmp daemon does not support the OID in question. You may have to configure it for this
Reinhard
shahzero
Posts: 12
Joined: Sun Jul 23, 2006 7:38 pm

Post by shahzero »

Hi everybody,

I think i follow all the step, but my graph still not showing any data.
I'm running cacti 0.8.6h.

My data query debug information:

+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/bind9-stats.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /var/www/localhost/htdocs/cacti/scripts/bind9-stats.pl index'
+ Executing script query 'perl /var/www/localhost/htdocs/cacti/scripts/bind9-stats.pl query zone'
+ Found item [bindName='GLOBAL'] index: GLOBAL
+ Found item [bindName='id.server__bind'] index: id.server__bind
+ Found item [bindName='hostname.bind__bind'] index: hostname.bind__bind
+ Found item [bindName='authors.bind__bind'] index: authors.bind__bind
+ Found item [bindName='version.bind__bind'] index: version.bind__bind
+ Found item [bindName='127.in-addr.arpa'] index: 127.in-addr.arpa
+ Found item [bindName='localhost'] index: localhost
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/bind9-stats.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/bind9-stats.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_queries/bind9-stats.xml'

My named.stats file always update every 5 minutes but all i get is zero:

+++ Statistics Dump +++ (1153198501)
success 0
referral 0
nxrrset 0
nxdomain 0
recursion 0
failure 0
success 0 localhost
referral 0 localhost
nxrrset 0 localhost
nxdomain 0 localhost
recursion 0 localhost
failure 0 localhost
success 0 127.in-addr.arpa
referral 0 127.in-addr.arpa
nxrrset 0 127.in-addr.arpa
nxdomain 0 127.in-addr.arpa
recursion 0 127.in-addr.arpa
failure 0 127.in-addr.arpa
success 0 version.bind _bind
referral 0 version.bind _bind
nxrrset 0 version.bind _bind
nxdomain 0 version.bind _bind
recursion 0 version.bind _bind
failure 0 version.bind _bind
success 0 hostname.bind _bind
referral 0 hostname.bind _bind
nxrrset 0 hostname.bind _bind
nxdomain 0 hostname.bind _bind
recursion 0 hostname.bind _bind
failure 0 hostname.bind _bind
success 0 authors.bind _bind
referral 0 authors.bind _bind
nxrrset 0 authors.bind _bind
nxdomain 0 authors.bind _bind
recursion 0 authors.bind _bind
failure 0 authors.bind _bind
success 0 id.server _bind
referral 0 id.server _bind
nxrrset 0 id.server _bind
nxdomain 0 id.server _bind
recursion 0 id.server _bind
failure 0 id.server _bind
--- Statistics Dump --- (1153198500)

My cacti log file:

07/24/2006 1:30:03 PM - CMDPHP: Poller[0] Host[1] DS[2] WARNING: Result from CMD not valid. Partial Result:

I think my problem is my CMD not valid. How i can fix this problem? Any help is appreciated.
User avatar
gninja
Cacti User
Posts: 371
Joined: Tue Aug 24, 2004 5:02 pm
Location: San Francisco, CA
Contact:

Post by gninja »

I'm trying to get this to work, and so far I can see that snmpd is calling the script. the stats file gets overwritten with a 0 byte file every time I run the script manually, or call it through snmp.

If I run it manually, I get a NONE reply for an index request. And if I try any get requests all I get is:

.1.3.6.1.4.1.8767.2.1.1.0
integer
6

If I run rndc stats, manually the stats file gets populated with everything I expect to see there. And if I enable debug in the bind-stats conf, it doesn't appear to do anything.
FreeBSD/RHEL
cacti-0.8.7i, spine 0.8.7i, PIA 3.1+boost 5.1
MySQL 5.5/InnoDB
RRDtool 1.2.27, PHP 5.1.6
shahzero
Posts: 12
Joined: Sun Jul 23, 2006 7:38 pm

Post by shahzero »

Hi Community,

At last, i get my BIND9 statistic graph. Very2 Happy :D But i think my graph not really2 correct. Because all the data show the same value.

my named.stats file not show the same value.

+++ Statistics Dump +++ (1153985100)
success 1676
referral 7818152
nxrrset 0
nxdomain 21
recursion 0
failure 0

How can i fix it?
Attachments
My weird graph
My weird graph
data2.png (18.82 KiB) Viewed 11972 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

gninja wrote:I'm trying to get this to work, and so far I can see that snmpd is calling the script. the stats file gets overwritten with a 0 byte file every time I run the script manually, or call it through snmp.

If I run it manually, I get a NONE reply for an index request. And if I try any get requests all I get is:

.1.3.6.1.4.1.8767.2.1.1.0
integer
6

If I run rndc stats, manually the stats file gets populated with everything I expect to see there. And if I enable debug in the bind-stats conf, it doesn't appear to do anything.
Do you call the rndc directly from snmpd.conf? On our installation, we decided to perform "rndc" (well, AIX has it's own "idea") on the traget machine on regular intervals and do only the parsing stuff via snmp. In this case, time slips are cruical. Would you throw a look at this, please?
Reinhard
User avatar
gninja
Cacti User
Posts: 371
Joined: Tue Aug 24, 2004 5:02 pm
Location: San Francisco, CA
Contact:

Post by gninja »

lvm wrote:Do you call the rndc directly from snmpd.conf? On our installation, we decided to perform "rndc" (well, AIX has it's own "idea") on the traget machine on regular intervals and do only the parsing stuff via snmp. In this case, time slips are cruical. Would you throw a look at this, please?
Reinhard
I call /usr/bin/perl /var/named/data/bind9-snmp-stats.pl from snmpd.conf, the perl script calls rndc. I'll look into running rndc from cron (Well, by hand for testing at least) and remove that functionality from the script and see how it does.
FreeBSD/RHEL
cacti-0.8.7i, spine 0.8.7i, PIA 3.1+boost 5.1
MySQL 5.5/InnoDB
RRDtool 1.2.27, PHP 5.1.6
User avatar
gninja
Cacti User
Posts: 371
Joined: Tue Aug 24, 2004 5:02 pm
Location: San Francisco, CA
Contact:

Post by gninja »

I'm still getting the same errors and lack of data. The stats file is no longer being zeroed out, but I'm not getting anything out of the queries, and the script is completely ignoring the debug file
FreeBSD/RHEL
cacti-0.8.7i, spine 0.8.7i, PIA 3.1+boost 5.1
MySQL 5.5/InnoDB
RRDtool 1.2.27, PHP 5.1.6
scubabri
Posts: 32
Joined: Thu Jul 13, 2006 3:11 pm

Post by scubabri »

lvm wrote:This tells you, that the target snmp daemon does not support the OID in question. You may have to configure it for this
Reinhard
What does that mean "configure it" I'm kinda a snmp newbie.. this is in response to this error

snmpget -c public -v 2c -r 3 ns2 .1.3.6.1.4.1.>
BAYOUR-COM-MIB::bind9Stats = No Such Instance currently exists at this OID


Running data query [11].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti-0.8.6h/resource/snmp_queries/bind9-stats_totals.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.8767.2.1.3.1'
+ Located input field 'b9stCounterName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.8767.2.1.3.1.2'
+ Found item [b9stCounterName='No Such Instance currently exists at this OID'] index: 2 [from value]
+ Found data query XML file at '/var/www/cacti-0.8.6h/resource/snmp_queries/bind9-stats_totals.xml'
+ Found data query XML file at '/var/www/cacti-0.8.6h/resource/snmp_queries/bind9-stats_totals.xml'
+ Found data query XML file at '/var/www/cacti-0.8.6h/resource/snmp_queries/bind9-stats_totals.xml'
SeJo
Posts: 1
Joined: Wed Aug 16, 2006 3:52 am

Post by SeJo »

I'm using the local script, and it outputs the data correct.
but i get NaN everywhere on the graph.
Thus i did a rrdtool info on the graph and this is the output. http://www.sejo.be/tmp/rrdtool.txt

can someone help me please
scubabri
Posts: 32
Joined: Thu Jul 13, 2006 3:11 pm

Post by scubabri »

after some tweeking, now I get this

Running data query [11].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti-0.8.6h/resource/snmp_queries/bind9-stats_totals.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.8767.2.1.3.1'
+ Located input field 'b9stCounterName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.8767.2.1.3.1.2'
+ Found item [b9stCounterName='No more variables left in this MIB View (It is past the end of the MIB tree)'] index: 2 [from value]
+ Found data query XML file at '/var/www/cacti-0.8.6h/resource/snmp_queries/bind9-stats_totals.xml'
+ Found data query XML file at '/var/www/cacti-0.8.6h/resource/snmp_queries/bind9-stats_totals.xml'
+ Found data query XML file at '/var/www/cacti-0.8.6h/resource/snmp_queries/bind9-stats_totals.xml'
+ Found data query XML file at '/var/www/cacti-0.8.6h/resource/snmp_queries/bind9-stats_totals.xml'

If anyone could help me get this working, I'd appriciate it

sb
Tekk
Posts: 34
Joined: Wed Aug 16, 2006 11:01 am
Location: France

Post by Tekk »

Hi,

I'm trying to use the BIND 9 script and template with SNMP on FreeBSD (bind9-stats-1[1].0.tar.gz which contains bind9-genstats.sh, bind9-stats-snmp.xml, bind9-stats-snmpd.pl, cacti_data_query_bind_9_statistics_snmp.xml).

I had a problem dumping the named.stats file but with Morgan's script bash (instead of the perl script), it works. Executing snmpwalk command, my results look like :

Code: Select all

snmpwalk -v 2c -c community serverip  .1.3.6.1.4.1.2021.55
UCD-SNMP-MIB::ucdavis.50.1.1 = INTEGER: 1 
UCD-SNMP-MIB::ucdavis.50.2.1 = STRING: "/bin/bash" 
UCD-SNMP-MIB::ucdavis.50.3.1 = STRING: "/usr/local/scripts/test.sh" 
UCD-SNMP-MIB::ucdavis.50.100.1 = INTEGER: 0 
UCD-SNMP-MIB::ucdavis.50.101.1 = STRING: "64273" 
UCD-SNMP-MIB::ucdavis.50.101.2 = STRING: "67" 
UCD-SNMP-MIB::ucdavis.50.101.3 = STRING: "2541" 
UCD-SNMP-MIB::ucdavis.50.101.4 = STRING: "22163" 
UCD-SNMP-MIB::ucdavis.50.101.5 = STRING: "1814" 
UCD-SNMP-MIB::ucdavis.50.101.6 = STRING: "589471" 
UCD-SNMP-MIB::ucdavis.50.102.1 = INTEGER: 0 
I'm wondering if somebody find a way to display the results in a graph on Cacti 0.8.6h which runs on FreeBSD with poller cactid. I think I just need a template for Cacti but I don't know how to make it... :(

Thanks

EDIT : It's OK for me now. I create data template which needs "Get SNMP data" as data input methods.
turiddu
Posts: 2
Joined: Mon Sep 04, 2006 10:08 am

Re: BIND 9 Statistics for Catci

Post by turiddu »

cpowers wrote:I have created an addon that will enable Cacti to create graphs on BIND 9 statistics. This package can be setup to retrieve the statistics remotely via SNMP or locally via a script.

I have provided complete instructions and Cacti templates in the package so installation is very easy.

You can download the package at http://uversaconsulting.net/download/bi ... 1.0.tar.gz

Please provide any feedback to me directly at cory@uversaconsulting.net

Hello cpower, I've installed your package in "local" version but, even if executed manually the pl script work, in the CACTI environment it doesn't return any data. This is the result of the Data Query Debug Information:

+ Running data query [12].
+ Found type = '4 '[script query].
+ Found data query XML file at 'C:/Inetpub/wwwroot/Cacti/resource/script_queries/bind9-stats.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl C:\Inetpub\wwwroot\Cacti\scripts\bind9-stats.pl index'
+ Executing script query 'perl C:\Inetpub\wwwroot\Cacti\scripts\bind9-stats.pl query zone'
+ Found data query XML file at 'C:/Inetpub/wwwroot/Cacti/resource/script_queries/bind9-stats.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/Cacti/resource/script_queries/bind9-stats.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/Cacti/resource/script_queries/bind9-stats.xml'

I have only changed the path of the named.stats file. Any idea?

Thanks anyway for your effort.
Stefano.


P.S. I'm using PERL 5.8.8.819, Cacti 0.8.6h w/ patches
theooze
Posts: 2
Joined: Tue Oct 10, 2006 10:53 am

No Data in graphs - missing zone parameter?

Post by theooze »

I setup and installed the Bind 9 stats from the tarball, added the queries to a device and created graphs for the zones i want to check using the 'local' method.

I checked the scripts output - i get data back if i run the bind9-stats.pl script:

#./bind9-stats.pl getall name.tld_public
recursion:0 success:416 failure:0 nxrrset:17 referral:0 nxdomain:8

however, my graphs show nothing.

if i run the poller.php script (as the cacti user) - i get:
...
OK u:0.00 s:0.00 r:1.25
OK u:0.00 s:0.00 r:1.25
OK u:0.00 s:0.00 r:1.25
OK u:0.00 s:0.00 r:1.25
ERROR: Not enough arguments
ERROR: Not enough arguments
ERROR: Not enough arguments
ERROR: Not enough arguments
ERROR: Not enough arguments
ERROR: Not enough arguments
ERROR: Not enough arguments
ERROR: Not enough arguments
OK u:0.00 s:0.00 r:1.25
OK u:0.00 s:0.00 r:1.25
...

those eight ERROR statements would seem to correspond to the 8 zones i'm trying to graph. my idea is that the bind9-stats.pl script is not getting the "zone" input, but i can't figure out how/where to check or specify that properly ?
m10
Posts: 7
Joined: Wed Feb 15, 2006 6:19 am
Location: HK, China

Post by m10 »

After I setup the snmp and crontab, get snmpwalk working
[root@cacti snmp_queries]# snmpwalk -v1 -c itteam 172.16.0.10 .1.3.6.1.4.1.2021.55
UCD-SNMP-MIB::ucdavis.55.1.1 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.2.1 = STRING: "GLOBAL"
UCD-SNMP-MIB::ucdavis.55.3.1 = INTEGER: 6
UCD-SNMP-MIB::ucdavis.55.4.1 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.55.5.1 = INTEGER: 14
UCD-SNMP-MIB::ucdavis.55.6.1 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.55.7.1 = INTEGER: 8
UCD-SNMP-MIB::ucdavis.55.8.1 = INTEGER: 6
When running query inside cacti, i got the following error :cry:
+ Running data query [31].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Error parsing XML file into an array.
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
Running on FC3 with Perl 5.8.5-24 + net-snmp-5.2.1.2-FC3
m10
Posts: 7
Joined: Wed Feb 15, 2006 6:19 am
Location: HK, China

Post by m10 »

m10 wrote:After I setup the snmp and crontab, get snmpwalk working
[root@cacti snmp_queries]# snmpwalk -v1 -c itteam 172.16.0.10 .1.3.6.1.4.1.2021.55
UCD-SNMP-MIB::ucdavis.55.1.1 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.2.1 = STRING: "GLOBAL"
UCD-SNMP-MIB::ucdavis.55.3.1 = INTEGER: 6
UCD-SNMP-MIB::ucdavis.55.4.1 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.55.5.1 = INTEGER: 14
UCD-SNMP-MIB::ucdavis.55.6.1 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.55.7.1 = INTEGER: 8
UCD-SNMP-MIB::ucdavis.55.8.1 = INTEGER: 6
When running query inside cacti, i got the following error :cry:
+ Running data query [31].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Error parsing XML file into an array.
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
Running on FC3 with Perl 5.8.5-24 + net-snmp-5.2.1.2-FC3
Fixed, permission of /var/www/html/cacti/resource/snmp_queries/bind9-stats-snmp.xml no-readable by cacti
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests