[collectd] bind9 nameserver plugin?

Claus Herwig lists at checon.de
Tue May 9 19:42:01 CEST 2006


Hi Florian,

> oops, I meant `rndc stats'.. This will cause bind to write the 
> `statistics file' which incldes the following keys: success,
> referral, nxrrset, nxdomain, recursion, failure

um, I didn't know about this one :) Seems like it gives nice counters
for success/failure/recursion, so the result would be some kind of
different graph than the one I proposed.

Unfortunately you'd have to do a "rndc stats" every minute or so,
because bind doesn't write the file automatically. And it seems that
every stats record can contain a different amount of lines, depending on
your views/zones configuration. Bind ARM says:

> Following that line are a series of lines containing a counter type,
> the value of the counter, optionally a zone name, and optionally a
> view name. The lines without view and zone listed are global
> statistics for the entire server.


> That's a clever idea.. Not as straight forward as the `mysql' plugin 
> (simply connect and read the values ;), but still the best idea I've 
> heard regarding bind statistics..

don't know how collectd works internally, but of course you could simply
stay connected to the fifo...

> No idea.. The only value I found was `PIPE_BUF' which is the size
> that can be written to the pipe atomically. My guess is that there's
> no hard limit.

> If `syslogd' tries to open the pipe non-blocking and noone has opened
>  the pipe for reading, the open returns with `errno' set to ENXIO. 
> syslogd should be prepared for this. If collectd exists after a while
>  and the reader detaches, the next write (to the still open fd) will 
> generate a `SIGPIPE' signal. syslog should be prepared for this, too.

hmm, I'm not sure of this, as I made a quick test: Just make the fifo as
I wrote, connect to it with cat, disconnect after a few lines. Then wait
10 minutes and connect again - and you'll get the whole backlog of 10
minutes syslogd querylog entries, which are about 3 MByte in my case.
Don't know where this buffer is stored internally. And what happens if
you wait 1 day instead of 10 minutes...

So I just fear, syslogd (or the fifo) could consume lots of memory, if
for some reason collectd don't connect to the fifo for a longer time.
All I could find about this is a short remark in the syslog readme:

> When logging into a fifo syslogd will stop loggin into this
> logfile if no process is reading it an thus the buffer is filled
> up. Buffer size can be adjusted through the kernel.

Thats a litte bit contradicting my test results :)


> P.S.: Nice graph ;) I want one of those, too ;)

err, yes, supported *g*

  Claus

-- 
CHECON   EDV-Consulting und Redaktion
         Claus Herwig * Barer Straße 70 * 80799 München
         +49 89 27826981 * Fax 27826982 * c.herwig at checon.de




More information about the collectd mailing list