Quick install instructions:

Enable query logging by adding something like this to named.conf:

	logging {
	  channel "querylog" { file "/var/log/query.log"; print-time yes; };
	  category queries { querylog; };
	};

Start the collector program with a command like:

	nice -20 ./bindgraph.pl --daemon --logfile /var/log/query.log

It will create a bindgraph.rrd database in the current directory.
Use the --daemon_rrd option if you want to change the working directory.
Use --help for more options.

Edit the @query_t variable if you want to change the list of RR which
will be counted. Do not remove the "_other_" entry.
BEWARE: this cannot be changed after the RRD has been created.


Install bindgraph.cgi somewhere your web server can access it and
edit it to set the $host, $rrd and $tmp_dir variables. If needed,
edit @query_t too.
You must create the $tmp_dir writeable by the CGI process. Do not use
a world writeable directory like /tmp!
After you have run it once you can optionally check the size of the
images generated and set the $imgsize variable
(e.g. $imgsize = 'width=717 height=474').
The HTML page generated by the program is actually static and you could
as well save it as a normal HTML file.

The URL .../bindgraph.cgi/bindgraph_small.png will generate a special
graph without the text lines at the bottom.


BUGS

File::Tail likes to re-read files from the beginning for no apparent
reason. This is very painful for big log files.
Workaround (needs GNU tail):

	tail --follow=name --retry --lines=+1 /var/log/query.log \
	  | nice -20 ./bindgraph.pl --cat --logfile /dev/fd/0

The bindgraph.cgi configuration process could be improved. It should be
easier to generate custom graphs.

