BIND 9 Statistics for Cacti

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

Moderators: Developers, Moderators

Post Reply
his_royal_evilness
Posts: 2
Joined: Sun Mar 06, 2005 3:44 pm

Post by his_royal_evilness »

does anybody know how to get different stats from each zone?
all my zones have the same output now :S
X-Frog
Posts: 1
Joined: Tue Mar 16, 2004 10:19 pm
Location: Montreal, Qc, Canada
Contact:

Post by X-Frog »

just put this in your named.conf in the options:
zone-statistics yes;

restart bind, and here we go ;)
turbo
Posts: 2
Joined: Tue Apr 12, 2005 8:26 am
Location: Gothenburg
Contact:

Indexed Bind9 SNMP Statistics

Post by turbo »

I've been rewriting a perl script by Dobrica Pavlinusic (which used 'rndc stats\
') to output a indexed SNMP table.
With this came some serious thinking on how a MIB is written and how Cacti (v0.\
8.6c) should be setup to utilize this.

I can finaly release what I did (I'm waiting for confirmation on the subscripti\
on of the cacti user list so I can announce it there to).

I'm not perfectly happy about the actuall graph output. I'm not sure if that's \
how it should look, so take the XML template with a bucket of salt

http://www.bayour.com/bind9-snmp/


(also see the reply on the other thread: http://forums.cacti.net/viewtopic.php?p=29054#29054)
rayvd
Posts: 6
Joined: Mon Apr 18, 2005 6:22 pm
Location: Chico, CA

Post by rayvd »

Having some problems with your script, turbo... confused initially by the presence of multiple bind9-stats.* files in the tgz file... ended up just using the one in the directory listing at the URL.

When importing cacti_data_query_snmp_local_bind9_statistics.xml, I get dependency errors:

+ Unmet Dependency: (Data Input Method) Get SNMP Data (Indexed)
+ Unmet Dependency: (Data Input Field) Output Type ID
+ Unmet Dependency: (Data Input Field) Index Value
+ Unmet Dependency: (Data Input Field) Index Type
+ Unmet Dependency: (Data Input Field) SNMP Version (1, 2, or 3)
+ Unmet Dependency: (Data Input Field) SNMP Password (v3)
+ Unmet Dependency: (Data Input Field) SNMP Username (v3)
+ Unmet Dependency: (Data Input Field) SNMP Community
+ Unmet Dependency: (Data Input Field) SNMP IP Address

I tried both the xml file in the directory listing at the URL above, as well as the one in the .tgz file at the URL above (v1.1).
cactus_jack
Posts: 29
Joined: Mon Apr 11, 2005 9:31 am

Post by cactus_jack »

Can anyone tell me what the Global graph represents, is it a total number queries for you DNS server? Thanks everyone in advance
cactus_jack
Posts: 29
Joined: Mon Apr 11, 2005 9:31 am

Post by cactus_jack »

Also, My recurrsion and refferal queries aren't showing up. Can anyone give me hint as to why?
havok1977
Posts: 49
Joined: Fri Apr 08, 2005 1:41 pm

rndc works, but rndc stats doesnt

Post by havok1977 »

Hey every1,

Im having a little trouble getting statistics from my BIND 9.2.4rc5 running on a Debian Testing server, i got rndc to work:

metrolinux:/etc/bind# rndc status
number of zones: 7
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
server is up and running

But when i try to get the stats i get this:

metrolinux:/etc/bind# rndc stats
rndc: 'stats' failed: permission denied


Here are the named.conf and rndc.conf extracts:

# Start of named.conf

options {
directory "/var/cache/bind";
zone-statistics yes;
statistics-file "/var/cache/bind/named.stats";
auth-nxdomain no; # conform to RFC1035
}

key "rndc-key" {
algorithm hmac-md5;
secret "XXXXXXXXXXXXXXXXXX";
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
# End of named.conf

# Start of rndc.conf
key "rndc-key" {
algorithm hmac-md5;
secret "XXXXXXXXXXXXXXXXX";
};

options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port 953;
};
# End of rndc.conf

I have searched the web with google for a while, but to no avail, any ideas?
User avatar
bleearg
Cacti User
Posts: 55
Joined: Wed Apr 27, 2005 9:37 am

Post by bleearg »

So does anyone know what's up with the bayour.com bind9 stats package?The .tgz file does not contain all the files that are mentioned in the README and the imports of the .xml files elicit "Unset Dependency" errors.
hapklaar
Posts: 38
Joined: Tue May 31, 2005 10:06 am

Post by hapklaar »

bumping up

Having the same unmet dependecies.

Here

Cacti has imported the following items:

Data Template

[success] SNMP - Local - Bind9 Statistics [new]
+ Unmet Dependency: (Data Input Method) Get SNMP Data (Indexed)
+ Unmet Dependency: (Data Input Field) Output Type ID
+ Unmet Dependency: (Data Input Field) Index Value
+ Unmet Dependency: (Data Input Field) Index Type
+ Unmet Dependency: (Data Input Field) SNMP Version (1, 2, or 3)
+ Unmet Dependency: (Data Input Field) SNMP Password (v3)
+ Unmet Dependency: (Data Input Field) SNMP Username (v3)
+ Unmet Dependency: (Data Input Field) SNMP Community
+ Unmet Dependency: (Data Input Field) SNMP IP Address

Graph Template

[success] SNMP - Local - Bind9 Statistics [update]
+ Found Dependency: (Data Template Item) bind9_total
+ Unmet Dependency: (GPRINT Preset) Normal
+ Found Dependency: (Data Template Item) bind9_forward
+ Found Dependency: (Data Template Item) bind9_reverse

Data Query

[success] SNMP - Local - Bind9 Statistics [update]
+ Unmet Dependency: (Data Input Method) Get SNMP Data (Indexed)
+ Found Dependency: (Graph Template) SNMP - Local - Bind9 Statistics
+ Found Dependency: (Data Template) SNMP - Local - Bind9 Statistics
+ Found Dependency: (Data Template Item) bind9_total
+ Found Dependency: (Data Template Item) bind9_forward
+ Found Dependency: (Data Template Item) bind9_reverse
bitpusher
Posts: 29
Joined: Tue Jan 18, 2005 8:02 pm
Contact:

Broken?

Post by bitpusher »

I too am atempting to get these scripts working, and am failing miserably.

Any help would be appreciated.
-------------------
BitPusher, LLC
http://www.bitpusher.com/
1.888.9PUSHER
yuzan
Posts: 2
Joined: Mon Jul 11, 2005 5:32 am

Post by yuzan »

I also have some problem.

Who can help me?

cacti 0.8.6f

import below file
cacti_data_query_snmp_local_bind9_statistics_domains.xml
cacti_data_query_snmp_local_bind9_statistics_totals.xml

Code: Select all

Data Template
[success] SNMP - Local - Bind9 Statistics [new]
+ Unmet Dependency: (Data Input Method) Get SNMP Data (Indexed)
+ Unmet Dependency: (Data Input Field) Output Type ID
+ Unmet Dependency: (Data Input Field) Index Value
+ Unmet Dependency: (Data Input Field) Index Type
+ Unmet Dependency: (Data Input Field) SNMP Version (1, 2, or 3)
+ Unmet Dependency: (Data Input Field) SNMP Password (v3)
+ Unmet Dependency: (Data Input Field) SNMP Username (v3)
+ Unmet Dependency: (Data Input Field) SNMP Community
+ Unmet Dependency: (Data Input Field) SNMP IP Address

Graph Template
[success] SNMP - Local - Bind9 Statistics [update]
+ Found Dependency: (Data Template Item) bind9_total
+ Unmet Dependency: (GPRINT Preset) Normal
+ Found Dependency: (Data Template Item) bind9_forward
+ Found Dependency: (Data Template Item) bind9_reverse

Data Query
[success] SNMP - Local - Bind9 Statistics [update]
+ Unmet Dependency: (Data Input Method) Get SNMP Data (Indexed)
+ Found Dependency: (Graph Template) SNMP - Local - Bind9 Statistics
+ Found Dependency: (Data Template) SNMP - Local - Bind9 Statistics
+ Found Dependency: (Data Template Item) bind9_total
+ Found Dependency: (Data Template Item) bind9_forward
+ Found Dependency: (Data Template Item) bind9_reverse

Code: Select all

Data Query Debug Information
+ Running data query [15].
+ Unknown type = ''
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/bind9-stats_domains.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/bind9-stats_domains.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/bind9-stats_domains.xml'
yuzan
Posts: 2
Joined: Mon Jul 11, 2005 5:32 am

[SOLVE]

Post by yuzan »

Hi.

I found the below post.

It describe this problem and solve it.

http://sourceforge.net/mailarchive/mess ... d=12222263


[/url]
RattleSn@ke
Posts: 17
Joined: Tue Aug 10, 2004 5:44 pm

Re: rndc works, but rndc stats doesnt

Post by RattleSn@ke »

havok1977 wrote: (...)
But when i try to get the stats i get this:

metrolinux:/etc/bind# rndc stats
rndc: 'stats' failed: permission denied
(...)
statistics-file "/var/cache/bind/named.stats";
(...)
I have searched the web with google for a while, but to no avail, any ideas?
I first did get the error 'stats' failed: file not found.
This was due the fact that I pointed the statistics-file to a directory that didn't exist. So your problem is with the permissions on /var/cache/bind/ !!
My stats dir is owned by named, group root: permissions are 775

I would suggest that you take a close look at your directory permissions.

Greetz!
RattleSn@ke
RattleSn@ke
Posts: 17
Joined: Tue Aug 10, 2004 5:44 pm

Post by RattleSn@ke »

Hello,

Ok, I tried again to get the scripts working!
First I'm trying to get the local version to work. So I did everything according to the INSTALL file.

Now I added the datasource to a device and then I get this:

Code: Select all

Data Query Debug Information 
 
+ Running data query [13].
+ Found type = '4 '[script query].
+ Found data query XML file at '/www/cacti/resource/script_queries/bind9-stats.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /www/cacti/scripts/bind9-stats.pl index'
+ Executing script query 'perl /www/cacti/scripts/bind9-stats.pl query zone'
+ Found data query XML file at '/www/cacti/resource/script_queries/bind9-stats.xml'
+ Found data query XML file at '/www/cacti/resource/script_queries/bind9-stats.xml'
+ Found data query XML file at '/www/cacti/resource/script_queries/bind9-stats.xml' 
And I get this as data query status: Success [0 Items, 0 Rows]

So when I try to create a graphic, it won't let me because there is no data!

Code: Select all

This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information
Manually running the bind9-stats.pl index and bind9-stats.pl guery zone commands do return results.
First command returns things like:
GLOBAL
domain_1.ext
domain_2.ext
domain_3.ext

and the second command returns:
GLOBAL:GLOBAL
domain_1.ext:domain_1.ext
domain_2.ext:domain_2.ext
domain_3.ext:domain_3.ext

Is this ok??

Any help is welcome!
mmille57
Posts: 1
Joined: Mon Aug 15, 2005 11:04 am

Post by mmille57 »

Anonymous wrote:I'm having some strange issues with SNMP..

once in a while i'll get the full read out with snmpwalk, but most of the time i just get an abbreviated one:

oberon:/usr/bin# snmpwalk -Os -v 1 -c community localhost .1.3.6.1.4.1.2021.55
ucdavis.55.1.1 = INTEGER: 1
ucdavis.55.2.1 = STRING: "GLOBAL"
ucdavis.55.3.1 = INTEGER: 109
ucdavis.55.4.1 = INTEGER: 0
ucdavis.55.5.1 = INTEGER: 15

any idea why this could be happening?
is this an issue with my snmpd setup?
-d

Did you ever get a reply. I've got the same issue.

running netsnmp 5.1.1 perl 5.8.7 sol 9.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests