[mrtg] Help for MRTG Newbies - Hints from my config file.

GundW at BELL.CO.ZA GundW at BELL.CO.ZA
Wed Sep 18 12:42:24 MEST 2002


Hi

We have a policy in place that says something like: "setup your part of the
computer system in such a way that if you get hit by a bus on the day the
computer room bursts into flames, make sure your colleague, (please travel
seperately), can setup the servers in your place." But in not so many
words, you get the picture.

So I started my config file like this and it works well. You can help
yourself to whatever you need, I would suggest you copy and paste the first
bit at least to help with the script as you go along.

#MRTG.CFG
#
#     Line Descriptions (use this for a template, I have created unique
variable names for fast
#     search and replace), beware the file doesn't get too big or it
becomes impossible to
#     maintain.
#
#
#Global settings
#
#RunAsDaemon: yes #Cause the mrtg to daemonise - use in conjunction with
Firedaemon from www.firedaemon.com
#Htmldir: c:\inetpub\wwwroot\mrtg #Where all the html content should go
#Imagedir: c:\inetpub\wwwroot\mrtg\images #Where the MRTG images are (for
graphing) - see docs
#Logdir: c:\inetpub\wwwroot\mrtg\logs #Where the logs are kept (good idea
to seperate, because experimentation requires much deleting of other files
and these you want to keep and backup, the other stuff is constantly
recreated)
#Icondir: c:\inetpub\wwwroot\mrtg\icons #Where the MRTG icons are kept
(this seems to only work as a relative path, see my config below)
#WorkDir: c:\inetpub\wwwroot\mrtg #Overwrites above dir parms above and
makes all one dir which can be a nightmare to maintain
#Refresh: 300 #Browser refresh command in seconds
#Interval: 5 #How often mrtg collects data in minutes
#WriteExpires: yes #For meta pages for apache servers only
#LoadMIBs: <loadMIBpath> #Copies the spec mibs to WorkDir and caches them
for better name resolution
#
#
#Graph settings
#
#Target[htmlname]: <instance>:<community>@<device> #The target to be
monitored see docs
#RouterUptime [htmlname]: <instance>:<community>@<device> #Used to
calculate mean uptimes - see docs
#MaxBytes[htmlname]: <maxbytespeedvalue> #Maximum legal returned variable
for both variables. Anything above is ignored
#MaxBytes1[htmlname]: <max1bytespeedvalue> #Maximum legal returned variable
for variable 1. Anything above is ignored
#MaxBytes2[htmlname]: <max2bytespeedvalue> #Maximum legal returned variable
for variables 2. Anything above is ignored
#Title[htmlname]:  <htmltitle> #Title of the generated HTML page
#PageTop[htmlname]: <Pagetopcontent> #Anything you want to add to te top of
the page, first column must be empty seperate lines with \n
# example </H1>
# example <TABLE>
#   example <TR><TD>System:</TD><TD> in </TD></TR>
#   example <TR><TD>Maintainer:</TD><TD></TD></TR>
#   example <TR><TD>Interface:</TD><TD><font color="#6B238E"> <B> Aggregate
Traffic: Ethernet 1 </B> </font> (1)</TD></TR>
#   example <TR><TD>IP:</TD><TD> ()</TD></TR>
#   example <TR><TD>Max Speed:</TD><TD>1.25 MBytes/s
(propVirtual)</TD></TR>
#  example </TABLE>
#PageFoot[htmlname]: <pagefootcontent> #Anything you want to have added
just before the </Body> tag
#AddHead[htmlname]: <addheadcontent> #Anything to add between </Title> and
</Head> tags
#BodyTag[htmlname]: <bodytagcontent> #Lets you supply your very own
<body...> tag for pages ? (I dunno, see the docs)
#AbsMax[htmlname]: <absmaxbytespeedvalue> #Allows a higher value than
MaxBytes if MaxBytes is compressed for example then AbsMax bytes becomes
the legal maximum ? - See docs
#Unscaled[htmlname]: <unscaledstring> #Removes maximum scale for graphs and
makes the graph relative to the data (d)ay, (w)eek, (m)onth, (y)ear
#WithPeak[htmlname]: <withpeakstring> #Display peak values for (d)ay,
(w)eek, (m)onth and (y)ear as opposed to the average values
#Suppress[htmlname]: <supressstring> #Supresses any of the default 4 graphs
by using (d)ay, (w)eek, (m)onth or (y)ear
#Extension[htmlname]: <pageextension> #By default, mrtg ceates file.html
here, you can spec a different extension
#Directory[htmlname]: <subdir> #Where all the files for this block go under
your WorkDir
#XSize[htmlname]: <xsize> #Default is all graphs are 100x400 pixels more or
less. Use this to change that. X must be 20-600
#YSize[htmlname]: <ysize> #See above except Y must be >20
#XZoom[htmlname]: <XMag> #Magnification ratio of x-scale
#YZoom[htmlname]: <YMag #See above
#XScale[htmlname]: <xscale> #Sets scale to graphs (is acknowledged by the
author to make the graphs ugly)
#YScale[htmlname]: <yscale> #As above
#YTics[htmlname]: <ytics> #The number of divisions shown on graphs
#YTicsFactor[htmlname]: <yticsfactor> #A factor of the default of hundreds,
i.e if you require 1 2 3 4 then make this 0.01
#Factor[htmlname]: <factor> #Multiply the values below the graph by this
value
#Options[htmlname]: <options> #Lots of options, see docs
#kilo[htmlname]: <kilovalue> #Use this as a multiplier for prefixes,
default is 1000 (you may need it to be 1024)
#kMG[htmlname]: <kMGvalues> #Use this to change multiplier prefixes default
is (k)ilo, (M)ega, (G)iga, (T)era, (P)eta displayed as ,k,M,G,T,P - see
docs
#Colours[htmlname]: <coloursvalues> #See docs
#Background[htmlname]: <background> #Change the background colour - See
docs
#YLegend[htmlname]: <ylegend> #Change the Y legend text on the graphs,
values too long are ignored
#ShortLegend[htmlname]: <Shortlegend> #Unit of easure string used - default
is 'b/s'
#Legend1[htmlname]: <Legend1> #These are all the corresponding legends for
the colours - normally input or whatever the first variable is
#Legend2[htmlname]: <Legend2> #As above except normally output or whatever
the second variable is if there is one or nothing
#Legend3[htmlname]: <Legend3> #As above except normally max first variable
#Legend4[htmlname]: <Legend4> #As above except normally max second variable
#LegendI[htmlname]: <LegendI> #Usually 'in' (looks bad if the line must
wrap, so experiment here)normally preceeded with &nbsp (look up your old
printer codes)
#LegendO[htmlname]: <LegendO> #Usually 'out'
#Timezone[htmlname]: <timezone> #Use the timezone name and if you have an
intelligent O/S (probably not windows) then the times are calculated as
required
#Weekformat[htmlname]: <weekformat> #See docs, use this if the weeknumbers
in your graphs are out
#SetEnv[htmlname]: <setenv> #Use this to set environments for the threshold
commands see docs for examples
#ThreshDir[htmlname]: <threshdir> #This is the subdir where all the
threshold stuff is dumped
#ThreshMinI[htmlname]: <threshminI> #If values fall below this min amount,
threshprogI will be executed
#ThreshMaxI[htmlname]: <threshmaxI> #If values exceed this amount,
threshprogI will be executed
#ThreshProgI[htmlname]: <threshprogI.bat> #Program to be executed (see
above)
#ThreshProgOKI[htmlname]: <threshprogOKI.bat> #Will be run while everything
is ok (based on content of ThreshDir)
#ThreshMinO[htmlname]: <threshminO> #As above except for output
#ThreshMaxO[htmlname]: <threshmaxO> #As above except for output
#ThreshProgO[htmlname]: <threshprogO.bat> #As above except for output
#ThreshProgOKO[htmlname]: <threshprogOKO.bat> #As above except for output
#ThreshDesc[htmlname]: <threshdesc> #Used as an environment variable to add
user friendly output before the progs are called
#
#     For automatic prepend and append characters and scripts, see docs it
is also possible
#     to set global options that apply to everything except explicitly
otherwise stated.
#
#     Best way to do his is to setup NT workstation and experiment
(remember to delete html
#     files between changes, not log files, otherwise you won't see a
change, then wait for next
#     event, the html files are re-created.
#
#     Also, the best tool to investigate anything is GetIF, this will
verify any MIB and OID stuff
#     and help confirm your info.
#
#     WARNING: OIDs can change when systems are rebooted, GetIf will help
confirm if you have
#     a change or not, try use names instead of OIDs.


RunAsDaemon: yes
Htmldir: c:\mrtg-2.9.22\web\html
Imagedir: c:\mrtg-2.9.22\web\images
Logdir: c:\mrtg-2.9.22\web\logs
#Icondir: c:\mrtg-2.9.22\web\icons
Refresh: 300
Interval: 5


#Global Modifications from here till next change:

#Global prepends and appends which will change the fonts of all graphs to
Arial
PageTop[^]: <font face="Arial">
PageFoot[_]: </font>
#Unscaled[_]: ymwd
#kilo[_]: 1024
Options[_]: growright, bits
#YLegend[_]: Bits Per Second
#ShortLegend[_]: b/s
#LegendI[_]: &nbsp;Bits/s:
#LegendO[_]: &nbsp;Bits/s:


###########################################################################################
#
#       BELL EQUIPMENT NETWARE SERVERS
#       BELL_<location>
#       e.g. BELL_RBAY - Server at Richards Bay
#
#     The NetWare section does not quite apply to above because it relies
on the data
#     generated by the MRTGEXT.NLM loaded at the server (third party stuff)
see the docs
#     that came with the nlm, you also require the nwstat.pl to be in the
mrtg\bin dir or
#     wherever as per the target line, obviously perl.exe is located using
the path statement
#     Everything else is a result of DNS entries, so no IP addresses for
me, this is a better
#     way to do everything in case of changes by design or disaster.
#
###########################################################################################


###########################################################################################
#
#     BELL_RBAY
#
#     Netware 5
#
###########################################################################################

Title[BELL_RBAY_SU]: BELL_RBAY Server Utilization
Target[BELL_RBAY_SU]: `perl c:\mrtg-2.9.22\bin\nwstat.pl bell_rbay util5
util15`
Options[BELL_RBAY_SU]: growright, gauge
MaxBytes[BELL_RBAY_SU]: 100
Unscaled[BELL_RBAY_SU]: dwmy
YLegend[BELL_RBAY_SU]: Utilization
ShortLEgend[BELL_RBAY_SU]: %
Legend1[BELL_RBAY_SU]: 5 min
Legend2[BELL_RBAY_SU]: 15 min
Legend3[BELL_RBAY_SU]: 5 min peak
Legend4[BELL_RBAY_SU]: 15 min peak
LegendI[BELL_RBAY_SU]: &nbsp;5min:
LegendO[BELL_RBAY_SU]: &nbsp;15min:
PageTop[BELL_RBAY_SU]: <H1>Server Utilization for BELL_RBAY</H1>
  <p> These graphs track the 5 minute and 15 minute server utilization


###########################################################################################
#
#     B-SERVICES
#     Windows 2000 SP2
#     Backup / DNS / Antivrus Server in Computer Room
#
###########################################################################################

Title[B-SERVICES_SMP]: B-SERVICES Processor Utilization
Target[B-SERVICES_SMP]:
.1.3.6.1.2.1.25.3.3.1.2.2&.1.3.6.1.2.1.25.3.3.1.2.2:public at b-services
Options[B-SERVICES_SMP]: growright,gauge
MaxBytes[B-SERVICES_SMP]: 100
Unscaled[B-SERVICES_SMP]: dwmy
YLegend[B-SERVICES_SMP]: Utilization
ShortLEgend[B-SERVICES_SMP]: %
Legend1[B-SERVICES_SMP]: 5 min
Legend2[B-SERVICES_SMP]: 15 min
Legend3[B-SERVICES_SMP]: 5 min peak
Legend4[B-SERVICES_SMP]: 15 min peak
LegendI[B-SERVICES_SMP]: &nbsp;5min:
LegendO[B-SERVICES_SMP]: &nbsp;15min:
PageTop[B-SERVICES_SMP]: <H1>SMP Utilization for B-SERVICES</H1>
  <p> These graphs track the 5 minute processor utilization for B_SERVICES

Title[B-SERVICES_LAN1]: B-SERVICES Ethernet Traffic for 196.34.175.6
Target[B-SERVICES_LAN1]: /196.34.175.6:public at b-services
MaxBytes[B-SERVICES_LAN1]: 125000000
Options[B-SERVICES_LAN1]: growright, bits
PageTop[B-SERVICES_LAN1]: <H1>Ethernet Traffic for B-SERVICES</H1>
  <p> This graph tracks the ethernet traffic on 196.34.175.6 on B-SERVICES.

###########################################################################################
#
#     rtr_dp_c4500
#
#     Router at DP - Cisco 4500
#
###########################################################################################

#Global Modifications from here till next change:
#Unscaled[_]: ymwd
#kilo[_]: 1024
#Options[_]: growright, bits
#YLegend[_]: Bits Per Second
#ShortLegend[_]: b/s
#LegendI[_]: &nbsp;Bits/s:
#LegendO[_]: &nbsp;Bits/s:

Title[rtr_dp_c4500_cpu]: DP Cisco 4500 CPU Utilization
PageTop[rtr_dp_c4500_cpu]: DP Cisco 4500 CPU Utilization </H1>
Target[rtr_dp_c4500_cpu]:1.3.6.1.4.1.9.2.1.56.0&1.3.6.1.4.1.9.2.1.56.0:public at rtr_dp_c4500
MaxBytes[rtr_dp_c4500_cpu]: 100
Options[rtr_dp_c4500_cpu]: absolute, gauge, growright
YLegend[rtr_dp_c4500_cpu]: CPU Percent Busy
ShortLegend[rtr_dp_c4500_cpu]:
Legend1[rtr_dp_c4500_cpu]:Router CPU Busy Percentage
Legend2[rtr_dp_c4500_cpu]:
LegendI[rtr_dp_c4500_cpu]: CPU Busy
LegendO[rtr_dp_c4500_cpu]:

Title[rtr_dp_c4500_mem]: DP C4500 Memory Utilisation
Target[rtr_dp_c4500_mem]:
1.3.6.1.4.1.9.2.1.8.0&1.3.6.1.4.1.9.2.1.8.0:public at rtr_dp_c4500
MaxBytes[rtr_dp_c4500_mem]: 32000
PageTop[rtr_dp_c4500_mem]: <H1>Memory Utilisation on DP C4500</H1>
Options[rtr_dp_c4500_mem]: gauge, growright, unknaszero
YLegend[rtr_dp_c4500_mem]: Mem (KB)
ShortLegend[rtr_dp_c4500_mem]: Memory
Legend1[rtr_dp_c4500_mem]: Memory Utilisation
Legend2[rtr_dp_c4500_mem]:
LegendI[rtr_dp_c4500_mem]: Memory
LegendO[rtr_dp_c4500_mem]:

Title[rtr_dp_c4500_FE0]: DP C4500 Traffic for FastEthernet0
Target[rtr_dp_c4500_FE0]: \FastEthernet0:public at rtr_dp_c4500
MaxBytes[rtr_dp_c4500_FE0]: 12500000
PageTop[rtr_dp_c4500_FE0]: <H1>Ethernet Traffic for FastEthernet0</H1>
  <p> This graph tracks the ethernet traffic for local (fastethernet0
196.34.175.1).


Plas note the windows OIDs change with hardware changes, so these may not
work with your Win2k box, please don't ask me that. What I can tell you is
that the OID above is a std MIB-II OID and not any third party stuff. Use
GetIF to find this OID and there will be one nearby, possibly ending in a
close by number that is YOUR CPU OID. Check this againt the Task Manager
windows to track the trend and correct the graph.

Have fun.

I hope this helps.



Gund

gundw at bell.co.za


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list