BIND 9 Statistics for Cacti
Moderators: Developers, Moderators
RedHat AS3 - upgrade Perl
Running Redhat EL3? Upgrade Perl -- 5.8.0 doesn't play well with this script. I picked perl-5.8.3-16.i386.rpm from Fedora Core 3 and it works fine.
I had the same problem as some people in this thread, specifically:
- All graph values would show up as "nan".
- An snmpwalk would only show "index=1" and "name=GLOBAL"
- The script run locally would give no output other than "1 and GLOBAL"
upgrade and everything is happy.
cheers,
mark
I had the same problem as some people in this thread, specifically:
- All graph values would show up as "nan".
- An snmpwalk would only show "index=1" and "name=GLOBAL"
- The script run locally would give no output other than "1 and GLOBAL"
upgrade and everything is happy.
cheers,
mark
***
Please note: your dreams may vary from those of the Globex corporation, its subsidiaries and stockholders
***
Please note: your dreams may vary from those of the Globex corporation, its subsidiaries and stockholders
***
ok, I've got the scripts working and can query them remotely and I get output that looks like this:
I was looking at the graph template, though, and I noticed that a CDEF is applied which multiplies the DERIVE value by 300. it's almost as if this is a per/second value being converted to a 5 minute value, but if cacti is grabbing the value every 5 minutes already, wouldn't the difference in the two values already represent the queries per 5 minutes? this is important to me because I want to understand it and our cacti is set up to query every 15 minutes, so I'm wondering if I have to change this CDEF to multiply by 900.
Code: Select all
UCD-SNMP-MIB::ucdavis.55.1.1 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.55.2.1 = STRING: "/bin/bash"
UCD-SNMP-MIB::ucdavis.55.3.1 = STRING: "/usr/local/bin/bind9-stats-snmpd.sh"
UCD-SNMP-MIB::ucdavis.55.100.1 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.55.101.1 = STRING: "2726974"
UCD-SNMP-MIB::ucdavis.55.101.2 = STRING: "40507"
UCD-SNMP-MIB::ucdavis.55.101.3 = STRING: "245864"
UCD-SNMP-MIB::ucdavis.55.101.4 = STRING: "1366311"
UCD-SNMP-MIB::ucdavis.55.101.5 = STRING: "12738557"
UCD-SNMP-MIB::ucdavis.55.101.6 = STRING: "10508475"
UCD-SNMP-MIB::ucdavis.55.101.7 = STRING: "0"
UCD-SNMP-MIB::ucdavis.55.101.8 = STRING: "0"
UCD-SNMP-MIB::ucdavis.55.101.9 = STRING: "5"
UCD-SNMP-MIB::ucdavis.55.101.10 = STRING: "10"
UCD-SNMP-MIB::ucdavis.55.101.11 = STRING: "0"
UCD-SNMP-MIB::ucdavis.55.101.12 = STRING: "0"
UCD-SNMP-MIB::ucdavis.55.101.13 = STRING: "0"
UCD-SNMP-MIB::ucdavis.55.101.14 = STRING: "0"
UCD-SNMP-MIB::ucdavis.55.101.15 = STRING: "0"
UCD-SNMP-MIB::ucdavis.55.101.16 = STRING: "0"
UCD-SNMP-MIB::ucdavis.55.101.17 = STRING: "0"
UCD-SNMP-MIB::ucdavis.55.101.18 = STRING: "0"
UCD-SNMP-MIB::ucdavis.55.102.1 = INTEGER: 0
cacti 0.8.6h | cactid 0.8.6g
mysql 4.1.16 | net-snmp 5.1.2-11 | rrdtool 1.0.50 | apache 2.2.0 | php 5.1.2 | RHEL AS rel. 4 kernel 2.6.9-22.ELsmp
mysql 4.1.16 | net-snmp 5.1.2-11 | rrdtool 1.0.50 | apache 2.2.0 | php 5.1.2 | RHEL AS rel. 4 kernel 2.6.9-22.ELsmp
-
- Posts: 4
- Joined: Fri Dec 22, 2006 6:37 am
I've just installed the package, and my stats are all equal.his_royal_evilness wrote:does anybody know how to get different stats from each zone?
all my zones have the same output now :S
zone-statistics = yes; set in named.conf as recommended
bind9-genstats.sh is called up by cron and it seems to correctly operate on rndc and bind statsfile as it should do.
By manually invoking bind9-stats.pl getall domain.tld I get correctly separate readings for each specified zone, but on graph they're all the same.
Within log (MEDIUM), all bind9-stats.pl calls are as bind9-stats.pl getall GLOBAL. Therefore, I guess that the "zone" variable won't get updated during poll.
Any ideas?
Ubuntu 6.06, cacti 0.8.6i.
Cheers
Luca
-
- Posts: 4
- Joined: Fri Dec 22, 2006 6:37 am
Uhm ... solved.lucasasdelli wrote:
I've just installed the package, and my stats are all equal.
I've seen that, on same machine as Cacti, the perl script seems to stop updating RRDs after 4 graphs enabled. By using the SNMP technique it didn't work, because of the timeout error by the current cactid release, as seen on other thread here.
By using SNMP perl script and cmd.php poller now it's fine
Bye
Luca
NaN on graphics
Hi,
I've been trying to make bind9-stats-1.0 work, but I get NaN on all graphs, I'm working with the LOCAL installation.
When I execute: /usr/bin/perl /usr/share/cacti/site/scripts/bind9-stats.pl getall GLOBAL
I get:
recursion:143 success:1232 failure:0 nxrrset:0 referral:0 nxdomain:2259
It works with every domain on the index, but nothing on the graphs.
In the cacti log I see this entry:
1/29/2007 04:00:02 PM - CMDPHP: Poller[0] Host[3] DS[99] WARNING: Result from CMD not valid. Partial Result:
Any clue??????
Thanks
I've been trying to make bind9-stats-1.0 work, but I get NaN on all graphs, I'm working with the LOCAL installation.
When I execute: /usr/bin/perl /usr/share/cacti/site/scripts/bind9-stats.pl getall GLOBAL
I get:
recursion:143 success:1232 failure:0 nxrrset:0 referral:0 nxdomain:2259
It works with every domain on the index, but nothing on the graphs.
In the cacti log I see this entry:
1/29/2007 04:00:02 PM - CMDPHP: Poller[0] Host[3] DS[99] WARNING: Result from CMD not valid. Partial Result:
Any clue??????
Thanks
Poller not getting <zone>
Looking after the CMDPHP: Poller[0] Host[3] DS[99] WARNING: Result from CMD not valid. Partial Result
I finf out that the input parameter <zone> is empty and that is way there is no graph.
Any clue about why the <zone> is empty on the data input????
Thanks.
I finf out that the input parameter <zone> is empty and that is way there is no graph.
Any clue about why the <zone> is empty on the data input????
Thanks.
-
- Posts: 1
- Joined: Tue Mar 20, 2007 8:46 am
-
- Posts: 1
- Joined: Wed Apr 11, 2007 11:34 pm
Solved "all graphs the same" problem
I noticed that several people were having problems with all of their graphs (different zones) showing the same values (same as GLOBAL). I don't know if this has been 'solved' in this thread, but I'll post the solution anyway.
(Note, this is only for the local installation)
After adding several graphs for different zones, I simply went to the 'Data Sources' button, chose one of the Bind9 stat items, and changed the Custom Data 'zone' to match the zone you want that graph to represent. To get the exact syntax for the zone, just view the named.stats file that bind9 is generating.
-genius_at_work
(Note, this is only for the local installation)
After adding several graphs for different zones, I simply went to the 'Data Sources' button, chose one of the Bind9 stat items, and changed the Custom Data 'zone' to match the zone you want that graph to represent. To get the exact syntax for the zone, just view the named.stats file that bind9 is generating.
-genius_at_work
I have exactly the same problem as you. My results are high too and I don't know why since the first time I used them, everything works well.marcosalgeri wrote:Hi,
I'm try to use this template and i have success... but the graph generated are very strange... the numebers of queries are high!
See in image attached.
It's normal?
Thanks and sorry for my bad english!
Did you find something to solve it ?
polling speed
Hi
I've been using the bind9 stats scripts produced by Cory (here http://forums.cacti.net/viewtopic.php?t=3018&start=0) for sometime and it all works well - I had problems getting the Bayour scripts to return correct details, so gave up.
Recently I have increased the number of domains I graph, and the bind stats simply take too long to be polled. This seems mainly due to the overhead of invoking perl and parsing the stats file for each snmp get request.
I have made a few small alterations to Cory's script to enable it to use the "pass_persist" option(as the Bayour script does) in net-snmp, which avoids having to reinvoke perl each time and I have set it to re-read the stats file periodically (60 secs, but you can change it easily by editing the entry "my $stats_interval = 60; ").
This seems to improve performance dramatically and I now happily retrieve stats for over 200 domains.
The install details are identical as per Corys original instructions, except use the attached file and insert "pass_persist" instead of "pass" in snmpd.conf.
Cheers
Rossco
I've been using the bind9 stats scripts produced by Cory (here http://forums.cacti.net/viewtopic.php?t=3018&start=0) for sometime and it all works well - I had problems getting the Bayour scripts to return correct details, so gave up.
Recently I have increased the number of domains I graph, and the bind stats simply take too long to be polled. This seems mainly due to the overhead of invoking perl and parsing the stats file for each snmp get request.
I have made a few small alterations to Cory's script to enable it to use the "pass_persist" option(as the Bayour script does) in net-snmp, which avoids having to reinvoke perl each time and I have set it to re-read the stats file periodically (60 secs, but you can change it easily by editing the entry "my $stats_interval = 60; ").
This seems to improve performance dramatically and I now happily retrieve stats for over 200 domains.
The install details are identical as per Corys original instructions, except use the attached file and insert "pass_persist" instead of "pass" in snmpd.conf.
Cheers
Rossco
- Attachments
-
- bind9-stats-snmpd.pl
- (7.19 KiB) Downloaded 1124 times
Hi Tekk
I didnt produce any templates, the original ones worked fine for me.
I used the ones from the original post here -> http://forums.cacti.net/viewtopic.php?t=3018&start=0
All I did was modify the net-snmp script.
Cheers
Rossco
I didnt produce any templates, the original ones worked fine for me.
I used the ones from the original post here -> http://forums.cacti.net/viewtopic.php?t=3018&start=0
All I did was modify the net-snmp script.
Cheers
Rossco
oh wow.. I spent an entire day going through this and its so funny. I've gone from one symptom described here to another...
I have experienced things like..
1) graph showing Nan values
2) some graphs not created
3) funny values for Bind statistics
4) mib troubles
I just want to share my experience thus far. (Cacti 0.8.6j on CentOS4)
1. I've NEVER got the local version of the script to work. The script relied on rndc status to generate a statistic file and the perl script then later parse it. The script that grabbed the data worked, manually, I've tested. When it goes through Cacti, nothing comes out, it's like it's unable to find the items (but when you run it manually you get your indexes and stuff! It's just weird!) - running perl 5.8.8 btw. Anyone trying the local version beware!
2. even though i *think* i read somewhere in this forum that the snmp portion of this script calls 'rndc stats' - somehow I don't think it does. my snmp mibs value don't change unless I manually run it. (delete the old file and rndc stats again). if you're getting Nan, 0 values in your graph, this may be the problem. Make a script to automatically run rndc stats and refresh the statistic file.
3. graphs not created - is usually attributed to permission problem. so check, and recheck your permission.
4. Last but not least. I saw someone suggested this.
(/^([^\s]+) (\d+)\s*$/)
to
(/^([^\w]+) (\d+)\s*$/)
or something like that.
I did that but realized that after I did this, SOME of my MIBs subtree (like that of GLOBAL snmp) did not show! Even though I snmpwalked the entire .55 tree.. the GLOBAL portion was missing! I got as far as 55.1, then 55.2.. and that's it! (if i manually walked 55.3.2.. there was something there! but 55.3.1 was Blank!) - it stopped from there! And it created all sort of havoc for me till I reverted it back and found my missing 55.3, 55.4, 55.5 subtrees and so forth! It might work for some but it made things worse for me. So you have been warned! This too could have caused the NaN values showing up in your graph!
What a day! Hope this helped.. (not all of it is accurate! I'm just stumbling around this piece of plugin - someone need to make a much better one - but I am grateful to the original author for coming up with the initial script!)
thanks to evil_steve on irc for some inspiration and humour while i worked this out!
I have experienced things like..
1) graph showing Nan values
2) some graphs not created
3) funny values for Bind statistics
4) mib troubles
I just want to share my experience thus far. (Cacti 0.8.6j on CentOS4)
1. I've NEVER got the local version of the script to work. The script relied on rndc status to generate a statistic file and the perl script then later parse it. The script that grabbed the data worked, manually, I've tested. When it goes through Cacti, nothing comes out, it's like it's unable to find the items (but when you run it manually you get your indexes and stuff! It's just weird!) - running perl 5.8.8 btw. Anyone trying the local version beware!
2. even though i *think* i read somewhere in this forum that the snmp portion of this script calls 'rndc stats' - somehow I don't think it does. my snmp mibs value don't change unless I manually run it. (delete the old file and rndc stats again). if you're getting Nan, 0 values in your graph, this may be the problem. Make a script to automatically run rndc stats and refresh the statistic file.
3. graphs not created - is usually attributed to permission problem. so check, and recheck your permission.
4. Last but not least. I saw someone suggested this.
(/^([^\s]+) (\d+)\s*$/)
to
(/^([^\w]+) (\d+)\s*$/)
or something like that.
I did that but realized that after I did this, SOME of my MIBs subtree (like that of GLOBAL snmp) did not show! Even though I snmpwalked the entire .55 tree.. the GLOBAL portion was missing! I got as far as 55.1, then 55.2.. and that's it! (if i manually walked 55.3.2.. there was something there! but 55.3.1 was Blank!) - it stopped from there! And it created all sort of havoc for me till I reverted it back and found my missing 55.3, 55.4, 55.5 subtrees and so forth! It might work for some but it made things worse for me. So you have been warned! This too could have caused the NaN values showing up in your graph!
What a day! Hope this helped.. (not all of it is accurate! I'm just stumbling around this piece of plugin - someone need to make a much better one - but I am grateful to the original author for coming up with the initial script!)
thanks to evil_steve on irc for some inspiration and humour while i worked this out!
I hope someone is still looking here . I am getting the same error as some others and havent seen a solution yet. I am getting this when I do a snmpwalk:
UCD-SNMP-MIB::ucdavis.55 = No Such Instance currently exists at this OID
I have checked each file involved and cant see what i am doing wrong. Any ideas?
UCD-SNMP-MIB::ucdavis.55 = No Such Instance currently exists at this OID
I have checked each file involved and cant see what i am doing wrong. Any ideas?
Who is online
Users browsing this forum: No registered users and 6 guests