[mrtg] configure DNS SERVER on mrtg
Niall O'Reilly
Niall.oReilly at ucd.ie
Wed Oct 12 12:18:49 CEST 2011
On 12 Oct 2011, at 09:11, Divya wrote:
> I am using Redhat Linux and chcek how much query are coming on Primary DNS server though MRTG
Fine.
You'll need:
1. some tool to probe your name server and present the counts
of interest in the format required by MRTG,
2. nameserver configuration to allow this tool to do its job,
3. MRTG configuration to activate the tool periodically.
I use BIND, and have a script which uses the rndc interface to
cause named to write to its statistics file, then parses the
most recent block of statistics to extract counts of interest
and present them as MRTG requires. There may be equivalent
or better scripts bundled as unsupported third-party
contributions with either BIND or MRTG. I didn't check, as
I was interested in the learning experience at the time.
I can send it on, but only on request, and on the understanding
that neither I nor my employer offers any warranty or support
whatsoever.
If you're also using BIND, I think you'll find that the BIND
reference manual (ARM) has all the information needed for
configuring named and rndc to work together. You may find
the bind-users list helpful.
Here is the relevant fragment of our MRTG configuration:
Target[scarr-named-stats]: `/usr/local/mrtg/scripts/mrtg-named-stats`
Options[scarr-named-stats]: growright,nopercent
Directory[scarr-named-stats]: servers/scarr
MaxBytes[scarr-named-stats]: 10000
Title[scarr-named-stats]: Server scarr: named query rate
PageTop[scarr-named-stats]: <H1>Named query rate on server <cite> scarr </cite> </H1>
Legend1[scarr-named-stats]: Total query rate (queries/s)
Legend2[scarr-named-stats]: Recursive query rate (queries/s)
Legend3[scarr-named-stats]: Maximal 5 minute query rate
Legend4[scarr-named-stats]: Maximal 5 minute recursion rate
LegendI[scarr-named-stats]: Total queries
LegendO[scarr-named-stats]: Recursive queries
YLegend[scarr-named-stats]: Queries/s
ShortLegend[scarr-named-stats]: queries/s
WithPeak[scarr-named-stats]: ymw
For the time being (although we may have to block access at some stage)
you may be able to see the result here:
http://scarr.ucd.ie/mrtg/bf/servers/scarr/scarr-named-stats.html
I hope this helps.
Niall O'Reilly
More information about the mrtg
mailing list