BIND 9 Statistics for Cacti
Moderators: Developers, Moderators
debian lenny
Hi I have problem to execute Your script on Debian Lenny OS.
I have the foloowing error:
ns:~# /usr/bin/perl /usr/local/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 /usr/local/bin/bind9-stats-snmpd.pl line 48.
BEGIN failed--compilation aborted at /usr/local/bin/bind9-stats-snmpd.pl line 48.
ns:~#
I cant find PassPersist.pm lib in repsository
I have the foloowing error:
ns:~# /usr/bin/perl /usr/local/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 /usr/local/bin/bind9-stats-snmpd.pl line 48.
BEGIN failed--compilation aborted at /usr/local/bin/bind9-stats-snmpd.pl line 48.
ns:~#
I cant find PassPersist.pm lib in repsository
Ok
I resolved the problem. I had to compile by myself SNMP PassPersist MOdule form http://search.cpan.org/~saper/SNMP-Exte ... sist-0.03/
I have one more question about CACTI aplication.
Before Debian update in old version of bind9 statistic, I had counted NXDomain Queries. But now after update I have only Success and Failure Queries.
Is it correct?
I resolved the problem. I had to compile by myself SNMP PassPersist MOdule form http://search.cpan.org/~saper/SNMP-Exte ... sist-0.03/
I have one more question about CACTI aplication.
Before Debian update in old version of bind9 statistic, I had counted NXDomain Queries. But now after update I have only Success and Failure Queries.
Is it correct?
-
- Posts: 9
- Joined: Tue Jul 14, 2009 2:47 am
I'm trying to local setup version of this thing, and even though the scripts seem to run fine, it still doesn't seem to work from within cacti.
the cacti 'run verbose query' feature says:
while from the command line, I get:
still, in the data queries line in cacti, I get:
what am I doing wrong?
the cacti 'run verbose query' feature says:
Code: Select all
+ Running data query [13].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/bind9-stats.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /usr/share/cacti/site/scripts/bind9-stats.pl index'
+ Executing script query 'perl /usr/share/cacti/site/scripts/bind9-stats.pl query zone'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/bind9-stats.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/bind9-stats.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_queries/bind9-stats.xml'
Code: Select all
# perl /usr/share/cacti/site/scripts/bind9-stats.pl index
GLOBAL
kormanybeszerzo.hu
maroy.hu
# perl /usr/share/cacti/site/scripts/bind9-stats.pl query zone
GLOBAL:GLOBAL
kormanybeszerzo.hu:kormanybeszerzo.hu
maroy.hu:maroy.hu
Code: Select all
1) BIND 9 Statistics (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows]
For those who has
Just increase maximum OID number for snmp-walk. Globaly or in host settings
Code: Select all
+ No SNMP data returned
-
- Posts: 9
- Joined: Tue Jul 14, 2009 2:47 am
how would I do that? can you be a bit more specific?ursal wrote:For those who hasJust increase maximum OID number for snmp-walk. Globaly or in host settingsCode: Select all
+ No SNMP data returned
Well, I have somehow similar results, yet different:akos.maroy wrote:I'm trying to local setup version of this thing, and even though the scripts seem to run fine, it still doesn't seem to work from within cacti.
the cacti 'run verbose query' feature says:
while from the command line, I get:Code: Select all
+ Running data query [13]. + Found type = '4 '[script query]. + Found data query XML file at '/usr/share/cacti/site/resource/script_queries/bind9-stats.xml' + XML file parsed ok. + Executing script for list of indexes 'perl /usr/share/cacti/site/scripts/bind9-stats.pl index' + Executing script query 'perl /usr/share/cacti/site/scripts/bind9-stats.pl query zone' + Found data query XML file at '/usr/share/cacti/site/resource/script_queries/bind9-stats.xml' + Found data query XML file at '/usr/share/cacti/site/resource/script_queries/bind9-stats.xml' + Found data query XML file at '/usr/share/cacti/site/resource/script_queries/bind9-stats.xml'
still, in the data queries line in cacti, I get:Code: Select all
# perl /usr/share/cacti/site/scripts/bind9-stats.pl index GLOBAL kormanybeszerzo.hu maroy.hu # perl /usr/share/cacti/site/scripts/bind9-stats.pl query zone GLOBAL:GLOBAL kormanybeszerzo.hu:kormanybeszerzo.hu maroy.hu:maroy.hu
what am I doing wrong?Code: Select all
1) BIND 9 Statistics (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows]
Code: Select all
+ Running data query [13].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/cacti/resource/script_queries/bind9-stats.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /var/www/cacti/scripts/bind9-stats.pl index'
+ Executing script query 'perl /var/www/cacti/scripts/bind9-stats.pl query zone'
+ Found item [bindName='GLOBAL'] index: GLOBAL
+ Found item [bindName=xxx.xxx'] index: xxx.xxx
...
+ Found item [bindName='yyy.yyy'] index: yyy.yyy
+ Found data query XML file at '/var/www/cacti/resource/script_queries/bind9-stats.xml'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/bind9-stats.xml'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/bind9-stats.xml'
Code: Select all
1) BIND 9 Statistics (Verbose Query) Uptime Goes Backwards Success [30 Items, 30 Rows]
If I run the script from the command line, I get correct results:
Code: Select all
perl bind9-stats.pl getall xxx.xxx
recursion:22 success:48877 nxrrset:36637 referral:101494 nxdomain:5373 name:90874
BIND 9.6 stats
Hi!
I,am testing to make some cacti stats,
The GLOBAL stats constantly disappear.
Does somebody know why?
I,am testing to make some cacti stats,
The GLOBAL stats constantly disappear.
Does somebody know why?
-
- Posts: 3
- Joined: Wed Nov 04, 2009 6:04 am
- Location: Berlin, Germany
Hi guys,
it seems a lot of people have the following issue with the 'no snmp data returned' error message:
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.
Best regards,
Mike Adolphs
it seems a lot of people have the following issue with the 'no snmp data returned' error message:
Code: Select all
+ Running data query [15].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/opt/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'
+ No SNMP data returned
+ Found data query XML file at '/opt/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/opt/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
+ Found data query XML file at '/opt/cacti/resource/snmp_queries/bind9-stats-snmp.xml'
Best regards,
Mike Adolphs
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.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.
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.
-
- Posts: 3
- Joined: Wed Nov 04, 2009 6:04 am
- Location: Berlin, Germany
There you go. The attached version works just fine. Stick to the documentation which can be found within the archive.aleu wrote: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.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.
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.
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
- Attachments
-
- bind9-stats-2.0.tar
- (80 KiB) Downloaded 5689 times
Hmm, this is the one I have. It used to work just fine for me, but recently I did perform the OS upgrade on my BIND server and since then the graphs stopped rendering. I am sure it must have to do with the permissions, but I do not know what could be causing this. Generally speaking my stats file is being created correctly every 5 minutes. It's permissions are 644 so everyone can read them. I have not changed the snmp settings at all and in the past all used to work just fine. Now when I snmpwalk the BIND server for the stats OID I get timeout which kind of implies that the perl script does not retrieve/parse the data correctly or my snmp daemon does not export this data correctly (if I snmpwalk the BIND server on .1 I am getting some other data like system name, uptime, disk usage etc. So this is not caused by an access control list or something like this. BTW. with the recent system upgrade my perl base has been upgraded as well. At first I have noticed that "SNMP::Extension::PassPersist" module was missing so I have downloaded it from CPAN and installed it. I am not sure what else I could check. If anyone has an idea, I would appreciate.Mike Adolphs wrote:There you go. The attached version works just fine. Stick to the documentation which can be found within the archive.
Thanks,
AL
-
- Posts: 3
- Joined: Wed Nov 04, 2009 6:04 am
- Location: Berlin, Germany
Which BIND version are you running and did you implement "zone statistics yes;" in your named.conf (under options) or named.conf.options?aleu wrote:Hmm, this is the one I have. It used to work just fine for me, but recently I did perform the OS upgrade on my BIND server and since then the graphs stopped rendering. I am sure it must have to do with the permissions, but I do not know what could be causing this. Generally speaking my stats file is being created correctly every 5 minutes. It's permissions are 644 so everyone can read them. I have not changed the snmp settings at all and in the past all used to work just fine. Now when I snmpwalk the BIND server for the stats OID I get timeout which kind of implies that the perl script does not retrieve/parse the data correctly or my snmp daemon does not export this data correctly (if I snmpwalk the BIND server on .1 I am getting some other data like system name, uptime, disk usage etc. So this is not caused by an access control list or something like this. BTW. with the recent system upgrade my perl base has been upgraded as well. At first I have noticed that "SNMP::Extension::PassPersist" module was missing so I have downloaded it from CPAN and installed it. I am not sure what else I could check. If anyone has an idea, I would appreciate.Mike Adolphs wrote:There you go. The attached version works just fine. Stick to the documentation which can be found within the archive.
Thanks,
AL
I'm running 9.4 and 9.5 with the new named.stats output and it works just fine. There was a major change to the output from BIND 9.3 to 9.4, keep that in mind.
Different dibstributions bring along different BIND versions. Gentoo for example only provides 9.3.xx if you don't unmask BIND via /etc/portage/package.keywords.
I assume it only works with BIND 9.4 or higher, but that's just a quick guess. I haven't looked into it.
Best regards,
Mike Adolphs
I am running BIND 9.5. As I have mentioned earlier, it used to work just fine for me. During the latest upgrade perl got upgraded, as well as some permission could have changed. Unfortunately, I am at lost right now and cannot figure out how to debug this further.Mike Adolphs wrote:Which BIND version are you running and did you implement "zone statistics yes;" in your named.conf (under options) or named.conf.options?
Who is online
Users browsing this forum: No registered users and 3 guests