Xymon Mailing List Archive search

Ways to graph stats from BIND

4 messages in this thread

list John Thurston · Wed, 11 Mar 2015 11:23:04 -0800 ·
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    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Enterprise Technology Services
Department of Administration
State of Alaska
list Bruce Ferrell · Wed, 11 Mar 2015 14:34:45 -0700 ·
quoted from John Thurston
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.html

And still no dice.

named won't even start with the specified configuration stanza

pity... I like the new way
list Bruce Ferrell · Wed, 11 Mar 2015 14:42:31 -0700 ·
quoted from John Thurston
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
list Jeremy Laidman · Thu, 12 Mar 2015 12:14:32 +1100 ·
On 12 March 2015 at 08:34, Bruce Ferrell <user-24fbf1912cfe@xymon.invalid> 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