Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DNS monitoring with MRTG - script is funny

Status
Not open for further replies.

StarTAC

ISP
Jun 23, 2000
424
GH
hi all..

i am running this script to gather stats for my MRTG MIB so i know my DNS performance.. i got it off the web, so i am guessing some of u use it too..

#!/bin/sh
#
# bindstats -- dump bind stats for MRTG
#

#Verify location!
STATSFILE="/var/lib/named/named.stats";

#Clear stats file first...
cat /dev/null > $STATSFILE;

#Dump stats...
# Use ndc for BIND8, rndc for BIND9
/usr/sbin/rndc stats

cat $STATSFILE;


it gathers stats fine and feeds them to MRTG.. my only problem is that MRTG caps at 60 requests per minute, for all my name servers..

my Maxbytes MIB is set to 32000 and AbsMax set to 64000 .. why are the records capping out at 60 only, and yet i am sure there could be a variation, upward mostly, as it's not dropping..

all help appreciated..

 
You probably have the reporting boundaries set too narrowly in the actual MRTG config for the display. There is nothing in this script you've shown that limits anything. Check your X and Y axis limits in the MRTG profile for your report.

Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.
 
well, i thought this was the case and i adjusted the axes accordingly, but what i realised was that the actual counters were fixed at 60, never changing..

i think if the problem was with the png, then at least the values below it would change some.. u think..?..

all help appreciated..
 
i have to am working with... but i am mostly using the second one for this example..

----------

Target[mydomain_DNS]: `/etc/mrtg/dnsstats.pl`
Options[mydomain_DNS]: gauge,growright,nopercent,integer,unknaszero
Title[mydomain_DNS]: DNS Server
RouterUptime[mydomain_DNS]: public@localhost
MaxBytes[mydomain_DNS]: 32000
AbsMax[mydomain_DNS]: 64000
WithPeak[mydomain_DNS]: wmy
Colours[mydomain_DNS]: YELLOW #F9C000,RED #F90000,LIGHT YELLOW #FFFFBB,LIGTH RED #FF8080
ShortLegend[mydomain_DNS]:queries/m
YLegend[mydomain_DNS]: Qs per Minute
Legend1[mydomain_DNS]: Queries received over 1 minute
Legend2[mydomain_DNS]: Failed Queries received over 1 minute
Legend3[mydomain_DNS]: Maximal Queries over 5 minutes
Legend4[mydomain_DNS]: Maximal Failed Queries over 5 minutes
LegendI[mydomain_DNS]: Queries:
LegendO[mydomain_DNS]: Failures:
PageTop[mydomain_DNS]: <H1>DNS Info</H1>

-----------------

Target[SERVERNAME_total]: `/usr/local/mrtg/bindstats.pl SERVERNAME RQ`
MaxBytes[SERVERNAME_total]: 1000
Options[SERVERNAME_total]: growright,nopercent,perminute,noo
Directory[SERVERNAME_total]: SERVERNAME
Title[SERVERNAME_total]: SERVERNAME BIND statistics
PageTop[SERVERNAME_total]: SERVERNAME BIND stats
XSize[SERVERNAME_total]: 500
YSize[SERVERNAME_total]: 200
WithPeak[SERVERNAME_total]: dwmy
YLegend[SERVERNAME_total]: No. of queries/minute
ShortLegend[SERVERNAME_total]: queries/minute
LegendI[SERVERNAME_total]: &nbsp;queries/minute:
LegendO[SERVERNAME_total]: &nbsp;total:

-----------------

all help appreciated..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top