BIND 8/9 based DNS monitoring
Moderators: Developers, Moderators
Re: try this
I've run that command, without any output. But when I ran it in Cacti (after setting the SNMP version in "device" to 1), I'd got this:egarnel wrote:snmpwalk -v 1 -c COMM HOST .1.3.6.1.4.1.2021.55
use version 1 instead of 2
Code: Select all
+ Running data query [11].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/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'
+ Located input field 'bindIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.55.1'
+ Located input field 'bindName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.55.2'
Code: Select all
+ Running data query [11].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/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'
+ No SNMP data returned
I'll start all over again, and let it know if something has changed...
Greetz.
-
- Posts: 17
- Joined: Tue Aug 10, 2004 5:44 pm
Sorry
Sorry, forgot my name in the message above ...
It was my message.
Greetz,
RattleSn@ke.
It was my message.
Greetz,
RattleSn@ke.
-
- Posts: 17
- Joined: Tue Aug 10, 2004 5:44 pm
Local works
Ok, i've finally got the 'local' version working.
Now i need to try the 'remote' (snmp) version get working.
Any help is really appriciated !!
Greetz.
RattleSn@ke.
Now i need to try the 'remote' (snmp) version get working.
Any help is really appriciated !!
Greetz.
RattleSn@ke.
I have a similar problem. I cannot, for the life of me get snmp to return values even though all the scripts run fine independently.RattleSn@ke wrote:Damn ... I still can't figure out why it won't work ...
I placed this in snmpd.confAnd when I then restart snmpd and run this command:Code: Select all
pass .1.3.6.1.4.1.2021.55 /usr/bin/perl /custom/bin/bind9-stats-snmpd.pl
I get this as result ...:Code: Select all
snmpwalk -v 2c -c COMM HOST .1.3.6.1.4.1.2021.55
Somebody any idea whats going wrong?Code: Select all
UCD-SNMP-MIB::ucdavis.55 = No Such Instance currently exists at this OID
Thanks.
Greetz.
Code: Select all
pass .1.3.6.1.4.1.2021.55 /usr/bin/perl /var/named/scripts/bind9-stats-snmpd.pl
Code: Select all
[root@ns1 scripts]# snmpwalk -v2c -c myRoCommunity 127.0.0.1 .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"
that was me :/
here's the v1 output just to show it makes no diff
snmpwalk -v1 -c toto 127.0.0.1 .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"
here's the v1 output just to show it makes no diff
snmpwalk -v1 -c toto 127.0.0.1 .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"
Last edited by Morgan on Tue Aug 29, 2006 8:42 am, edited 1 time in total.
-
- Posts: 17
- Joined: Tue Aug 10, 2004 5:44 pm
Hi Morgan,
It's almost funny, since you already get more info out of snmp than me!
In my earlier post I said that the local version worked ... well, didn't think so ... I even can't get the damn local version to work ....
lists the domains nicely, but when I run:
it displays things like this:
is that correct?
When I manually run for example:
it returns the right data:
So has ANYone ANY idea whats going wrong?
Thank you.
It's almost funny, since you already get more info out of snmp than me!
In my earlier post I said that the local version worked ... well, didn't think so ... I even can't get the damn local version to work ....
Code: Select all
perl /www/cacti/scripts/bind9-stats.pl index
Code: Select all
perl /www/cacti/scripts/bind9-stats.pl query zone
Code: Select all
GLOBAL:GLOBAL
domainA:domainA
domainB:domainB
When I manually run for example:
Code: Select all
perl /www/cacti/scripts/bind9-stats.pl getall GLOBAL
Code: Select all
recursion:2214 success:29570 failure:13 nxrrset:1020 referral:0 nxdomain:6100
Thank you.
ok enough complicated scripts.
bash is your friend
step 1
add the following to your snmpd.conf
replace with your path to bash and your path to the script you're goign to create below.
step 2
create the script!!!
again, change the paths for your stats file, your and your rndc
step 3
kill -HUP of your snmpd process
step 4
over and done with, now on to doing the cacti work.
ps: bash, grep and awk = friends
Morgan
bash is your friend
step 1
add the following to your snmpd.conf
Code: Select all
exec .1.3.6.1.4.1.2021.50 /bin/bash /var/named/scripts/test.sh
step 2
create the script!!!
Code: Select all
#!/bin/sh
#
#
rm /var/named/stats/named.stats
/usr/sbin/rndc stats
cat /var/named/stats/named.stats | grep -v Statistics | awk '{ print $2 }'
step 3
kill -HUP of your snmpd process
step 4
Code: Select all
snmpwalk -v2c -c community serverip .1.3.6.1.4.1.2021.50
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: "/var/named/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
over and done with, now on to doing the cacti work.
ps: bash, grep and awk = friends
Morgan
Greetings All
This script is running fine on Fedora Core2 and is in my crontab as:
*/5 * * * * /usr/local/bind9-genstats.sh > /dev/null 2>&1
I get this from running the local script, everything seems ok...
[root@host bin]# /root/bind9-stats.pl index
GLOBAL
my-domain.com
1.168.192.in-addr.arpa
localhost
But, I get nada from the snmp version of the script run locally... (I am wanting to check this server via snmp - remote)
[root@host bin]# ./bind9-stats-snmpd.pl .1.3.6.1.4.1.2021.55
[root@host bin]#
Anybody care to point me in a reasonable direction?
Thanks in advance. Forgive my ignorance please.
Kind Regards,
Randy Gordey
This script is running fine on Fedora Core2 and is in my crontab as:
*/5 * * * * /usr/local/bind9-genstats.sh > /dev/null 2>&1
I get this from running the local script, everything seems ok...
[root@host bin]# /root/bind9-stats.pl index
GLOBAL
my-domain.com
1.168.192.in-addr.arpa
localhost
But, I get nada from the snmp version of the script run locally... (I am wanting to check this server via snmp - remote)
[root@host bin]# ./bind9-stats-snmpd.pl .1.3.6.1.4.1.2021.55
[root@host bin]#
Anybody care to point me in a reasonable direction?
Thanks in advance. Forgive my ignorance please.
Kind Regards,
Randy Gordey
I had this problem last night on two Solaris 8 servers. The solution was to upgrade to the latest version of net-snmp.RattleSn@ke wrote:Damn ... I still can't figure out why it won't work ...
....Somebody any idea whats going wrong?Code: Select all
UCD-SNMP-MIB::ucdavis.55 = No Such Instance currently exists at this OID
Thanks.
Adrian Goins - President / CEO
Arces Network, LLC
http://www.arces.net
Arces Network, LLC
http://www.arces.net
net-snmp 5.1.1 pass timeout
Hi,
Apparently, net-snmp 5.1.1 has problems with pass timeout.
I was able to reproduce this timeout problem by adding a simple "sleep 1" to my pass script.
Ilja
Apparently, net-snmp 5.1.1 has problems with pass timeout.
I was able to reproduce this timeout problem by adding a simple "sleep 1" to my pass script.
Ilja
I've managed to get the display-bindstats.pl and dns_stats.pl scripts to work and pull DNS stats from a remote box running BIND 9 on RedHat 5. However when I try to run the same thing to another box also running BIND 9 on RedHat 5 i just get End of MIB returned.
Any ideas why this might be happening?????
Any ideas why this might be happening?????
I know this is a slightly old thread, but I'm having some problems with the script as well.
The data seems to return fine when using the bind9-stats.pl script manually, and the stat generation script is running perfectly in crontab, and the poller seems to be working (all my other graphs are fine.)
But my bind graphs continue to show nothing but nan as values.
Any suggestions or insight?
The data seems to return fine when using the bind9-stats.pl script manually, and the stat generation script is running perfectly in crontab, and the poller seems to be working (all my other graphs are fine.)
But my bind graphs continue to show nothing but nan as values.
Any suggestions or insight?
Who is online
Users browsing this forum: No registered users and 4 guests