[collectd] bind9 nameserver plugin?

Florian Forster octo at verplant.org
Sun May 7 18:10:52 CEST 2006


Hi Claus,

On Fri, May 05, 2006 at 01:02:22PM +0200, Claus Herwig wrote:
> thats not exactly what I had in mind ;-) "rndc status" shows almost no
> information, unfortunately. At least with my version, which is 9.3.2
> (debian backports).

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

> That said, my idea was to use syslogd to log the bind querylog to a
> named pipe. syslogd somehow writes to the pipe in nonblocking mode,
> i.e.  collectd could attach to the pipe, read and parse the lines and
> detach again. Nothing would be lost as long as collectd attaches every
> few minutes (or more often, of course).

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..

> But there are some problems: I do know nothing about the buffersizes
> of syslogd or of named pipes - how many lines will fit in the buffer?

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.

> What happens to the pipe buffer, if for some reason syslogd is
> running, but collectd is not?

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.

> Do named pipes behave the same way on different platforms? I only
> tried it with linux on i386...

Yes, named pipes are defined in POSIX.1..

So, all in all this sound like a very reasonable solution.. I'll
definitely think about it some more ;)

Regards,
-octo

P.S.: Nice graph ;) I want one of those, too ;)
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20060507/b266094d/attachment.pgp


More information about the collectd mailing list