File: README

package info (click to toggle)
bindgraph 0.2a-6
  • links: PTS
  • area: main
  • in suites: sid
  • size: 292 kB
  • sloc: perl: 975; sh: 189; makefile: 8
file content (49 lines) | stat: -rw-r--r-- 1,708 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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.