Ways to graph stats from BIND
In an effort to get some performance and utilization information from our BIND servers, I've been exploring ways to get that data into rrds and graphed in Xymon.
I am aware of two mechanisms for extracting statistical data from BIND.
A) In the "old" way, BIND appends lines to a statically named text file. This is done by inserting lines like the following into the BIND configuration file:
zone-statistics yes; statistics-file "/var/log/named.stats"; And then asking BIND to add new information to that file by using the "rndc stats" command.
B) The "new" way is to publish statistics in an XML file over HTTP on a specific network port. This is done by inserting lines like the following into the BIND configuration file:
statistics-channels { inet * port 8888 ; }; And then querying http://localhost:8888/xml/v2 to receive a whole bunch of information in an XML file.
Jeremy Laidman shared his script "xymon-rnamedstats" (thank you for sharing, Jeremy!) http://tools.rebel-it.com.au/xymon-rnamedstats/xymon-rnamedstats.sh which depends on Method-A. I've adjusted his script just enough to get it running on Solaris, and I'm pretty sure I'll be able to adjust it further to handle the counters and fields I want to have graphed. But before I invest more time customizing a solution dependent on Method-A, I'd like to explore Method-B.
Has anyone already explored parsing the BIND-statistics XML file into RRDs? Do you have any comments or suggestions?
How about generically parsing and selecting data from XML files and using it to add information to RRDs? Do you have suggestions of tools or techniques?
-- Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Enterprise Technology Services Department of Administration State of Alaska
On 03/11/2015 12:23 PM, John Thurston wrote:
In an effort to get some performance and utilization information from our BIND servers, I've been exploring ways to get that data into rrds and graphed in Xymon.
I am aware of two mechanisms for extracting statistical data from BIND.
A) In the "old" way, BIND appends lines to a statically named text file. This is done by inserting lines like the following into the BIND configuration file:
zone-statistics yes; statistics-file "/var/log/named.stats"; And then asking BIND to add new information to that file by using the "rndc stats" command.
B) The "new" way is to publish statistics in an XML file over HTTP on a specific network port. This is done by inserting lines like the following into the BIND configuration file:
statistics-channels { inet * port 8888 ; }; And then querying http://localhost:8888/xml/v2 to receive a whole bunch of information in an XML file.
Jeremy Laidman shared his script "xymon-rnamedstats" (thank you for sharing, Jeremy!) http://tools.rebel-it.com.au/xymon-rnamedstats/xymon-rnamedstats.sh which depends on Method-A. I've adjusted his script just enough to get it running on Solaris, and I'm pretty sure I'll be able to adjust it further to handle the counters and fields I want to have graphed. But before I invest more time customizing a solution dependent on Method-A, I'd like to explore Method-B.
Has anyone already explored parsing the BIND-statistics XML file into RRDs? Do you have any comments or suggestions?
How about generically parsing and selecting data from XML files and using it to add information to RRDs? Do you have suggestions of tools or techniques?
I see the new way published on the ISC web site. I find it doesn't work with bind 9.9 on open suse, nor with 9.8 on RHEL/Centos/Scientific Linux... so I grabbed 9.10.2 and built that per this entry in the ISC kb:
https://kb.isc.org/article/AA-00769/0/Using-BINDs-XML-statistics-channels.ht...
And still no dice.
named won't even start with the specified configuration stanza
pity... I like the new way
On 12 March 2015 at 08:34, Bruce Ferrell <bferrell at baywinds.org> wrote:
named won't even start with the specified configuration stanza
I couldn't get it to work either, because I didn't have libxlm2 installed.
What is the output of "named -V"? Does it show "--with-libxml2"?
Newer versions of BIND (I think 9.10) can also provide stats in JSON format. This is probably going to be easier to parse for injection into Xymon.
The XML format appears to be designed (or at least useful) for displaying in a browser, as it includes style sheets for human consumption.
J
On 03/11/2015 12:23 PM, John Thurston wrote:
In an effort to get some performance and utilization information from our BIND servers, I've been exploring ways to get that data into rrds and graphed in Xymon.
I am aware of two mechanisms for extracting statistical data from BIND.
A) In the "old" way, BIND appends lines to a statically named text file. This is done by inserting lines like the following into the BIND configuration file:
zone-statistics yes; statistics-file "/var/log/named.stats"; And then asking BIND to add new information to that file by using the "rndc stats" command.
B) The "new" way is to publish statistics in an XML file over HTTP on a specific network port. This is done by inserting lines like the following into the BIND configuration file:
statistics-channels { inet * port 8888 ; }; And then querying http://localhost:8888/xml/v2 to receive a whole bunch of information in an XML file.
Jeremy Laidman shared his script "xymon-rnamedstats" (thank you for sharing, Jeremy!) http://tools.rebel-it.com.au/xymon-rnamedstats/xymon-rnamedstats.sh which depends on Method-A. I've adjusted his script just enough to get it running on Solaris, and I'm pretty sure I'll be able to adjust it further to handle the counters and fields I want to have graphed. But before I invest more time customizing a solution dependent on Method-A, I'd like to explore Method-B.
Has anyone already explored parsing the BIND-statistics XML file into RRDs? Do you have any comments or suggestions?
How about generically parsing and selecting data from XML files and using it to add information to RRDs? Do you have suggestions of tools or techniques?
never mind my last comment... configuration error
participants (3)
-
bferrell@baywinds.org
-
jlaidman@rebel-it.com.au
-
john.thurston@alaska.gov