|
Packit |
667938 |
# $Id: README,v 1.1.1.1 2002/02/26 10:16:37 oetiker Exp $
|
|
Packit |
667938 |
|
|
Packit |
667938 |
stat.pl
|
|
Packit |
667938 |
|
|
Packit |
667938 |
You could use this script to monitor youre DNS activities.
|
|
Packit |
667938 |
Its a very simple perl script and youre free to do any updates on
|
|
Packit |
667938 |
it, but please send a copy to me calle@volvo.se.
|
|
Packit |
667938 |
you have to do some small changes like hostname and path to named.stats.
|
|
Packit |
667938 |
if youre using it please let me know so i could send you updates.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|
|
Packit |
667938 |
INSTALLATION:
|
|
Packit |
667938 |
|
|
Packit |
667938 |
To get it to work do execute the script once before you make mrtg to do
|
|
Packit |
667938 |
it for you. This will make an OLD file with the last requested queries.
|
|
Packit |
667938 |
You might get an error messages , but the next time you execute it the
|
|
Packit |
667938 |
stats will come as you want it.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|
|
Packit |
667938 |
USAGE:
|
|
Packit |
667938 |
|
|
Packit |
667938 |
If you run this on a DNS server just add an script that will make a stat
|
|
Packit |
667938 |
file (Bind 4 (kill -ABRT `/var/run/named.pid`)),
|
|
Packit |
667938 |
(Bind 8.1. (kill -ILL `/var/run/named.pid)) and remove the old named.stats.
|
|
Packit |
667938 |
and put this into cron.
|
|
Packit |
667938 |
For Bind 8.2.1 you will need to be using ndc (ndc stats).
|
|
Packit |
667938 |
|
|
Packit |
667938 |
ex. script to run from cron
|
|
Packit |
667938 |
|
|
Packit |
667938 |
#!/bin/sh
|
|
Packit |
667938 |
rm /var/tmp/named.stats
|
|
Packit |
667938 |
kill -ABRT `cat /var/run/named.pid`
|
|
Packit |
667938 |
<PATH to MRTG>/mrtg <PATH to mrtg.cfg>
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|
|
Packit |
667938 |
MRTG:
|
|
Packit |
667938 |
|
|
Packit |
667938 |
To set up this in MRTG:
|
|
Packit |
667938 |
Target[dns]: `/<PATH to stat.pl>/stat.pl`
|
|
Packit |
667938 |
|
|
Packit |
667938 |
REMOTE:
|
|
Packit |
667938 |
I did a small script called dns.named that will collect named from a
|
|
Packit |
667938 |
remote DNS, but i strongly recomend to rewrite this so instead of using
|
|
Packit |
667938 |
FTP use scp.
|
|
Packit |
667938 |
this script requires expect.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|
|
Packit |
667938 |
UPDATES:
|
|
Packit |
667938 |
|
|
Packit |
667938 |
The new stat.pl you could use 2 diffrent graph in one session , that is lets say you want to
|
|
Packit |
667938 |
logg all Requested queries and maybe count of zone transfers.
|
|
Packit |
667938 |
all you have to do is to specify these in $OUTGOING and $INCOMING in stat.pl.
|
|
Packit |
667938 |
The script also looks how for how long the named have been runing without a reset.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|