Pages

Showing posts with label MRTG. Show all posts
Showing posts with label MRTG. Show all posts

Multi Router Traffic Grapher -- squid Configuration File

######################################################################
# Multi Router Traffic Grapher -- squid Configuration File
######################################################################
# This file is for use with mrtg-2.0
#
# Customized for monitoring Squid Cache
# by Chris Miles http://chrismiles.info/
# http://chrismiles.info/unix/mrtg/
# To use:
# - change WorkDir and LoadMIBs settings
# - change all "hostname" occurrences to your squid host
# - change all "chris" occurrences to your name/address
# - change the community strings if required (eg: "public")
# - change the snmp port if required (eg: 3401)
#
# Note:
#
# * Keywords must start at the begin of a line.
#
# * Lines which follow a keyword line which do start
# with a blank are appended to the keyword line
#
# * Empty Lines are ignored
#
# * Lines starting with a # sign are comments.
# ####################
# Global Configuration
# ####################
# Where should the logfiles, and webpages be created?
WorkDir: /opt/mrtg/squid
# --------------------------
# Optional Global Parameters
# --------------------------
# How many seconds apart should the browser (Netscape) be
# instructed to reload the page? If this is not defined, the
# default is 300 seconds (5 minutes).
# Refresh: 600
# How often do you call mrtg? The default is 5 minutes. If
# you call it less often, you should specify it here. This
# does two things:
# a) the generated HTML page does contain the right
# information about the calling interval ...
# b) a META header in the generated HTML page will instruct
# caches about the time to live of this page .....
# In this example we tell mrtg that we will be calling it
# every 10 minutes. If you are calling mrtg every 5
# minutes, you can leave this line commented out.
# Interval: 10
# With this switch mrtg will generate .meta files for CERN
# and Apache servers which contain Expiration tags for the
# html and gif files. The *.meta files will be created in
# the same directory as the other files, so you might have
# to set "MetaDir ." in your srm.conf file for this to work
#
# NOTE: If you are running Apache-1.2 you can use the mod_expire
# to achieve the same effect ... see the file htaccess-dist
WriteExpires: Yes
# If you want to keep the mrtg icons in some place other than the
# working directory, use the IconDir varibale to give its url.
# IconDir: /mrtgicons/
IconDir: /images/
LoadMIBs: /opt/mrtg/squid/mib.txt
# #################################################
# Configuration for each Target you want to monitor
# #################################################
# The configuration keywords "Target" must be followed by a
# unique name. This will also be the name used for the
# webpages, logfiles and gifs created for that target.
# Note that the "Target" sections can be auto-generated with
# the cfgmaker tool. Check readme.html for instructions.
# ========
##
## Target ----------------------------------------
##
# With the "Target" keyword you tell mrtg what it should
# monitor. The "Target" keyword takes arguments in a wide
# range of formats:
# * The most basic format is "port:community@router"
# This will generate a traffic graph for port 'port'
# of the router 'router' and it will use the community
# 'community' for the snmp query.

# Target[ezwf]: 2:public@wellfleet-fddi.ethz.ch
# * Sometimes you are sitting on the wrong side of the
# link. And you would like to have mrtg report Incoming
# traffic as outgoing and visa versa. This can be achieved
# by adding the '-' sign in front of the "Target"
# description. It flips the in and outgoing traffic rates.
# Target[ezci]: -1:public@ezci-ether.ethz.ch
# * You can also explicitly define the OID to query by using the
# following syntax 'OID_1&OID_2:community@router'
# The following example will retrieve error input and output
# octets/sec on interface 1. MRTG needs to graph two values, so
# you need to specify two OID's such as temperature and humidity
# or error input and error output.
# Target[ezwf]: 1.3.6.1.2.1.2.2.1.14.1&1.3.6.1.2.1.2.2.1.20.1:public@myrouter
# * mrtg knows a number of symbolical SNMP variable
# names. See the file mibhelp.txt for a list of known
# names. One example are the ifInErrors and and ifOutErrors
# names. This means you can specify the above as:
# Target[ezwf]: ifInErrors.1&ifOutErrors.1:public@myrouter
# * if you want to monitor something which does not provide
# data via snmp you can use some external program to do
# the data gathering.
#
# The external command must return 4 lines of output:
# Line 1 : current state of the 'incoming bytes counter'
# Line 2 : current state of the 'outgoing bytes counter'
# Line 3 : string, telling the uptime of the target.
# Line 4 : string, telling the name of the target.
# Depending on the type of data your script returns you
# might want to use the 'gauge' or 'absolute' arguments
# for the "Options" keyword.
# Target[ezwf]: `/usr/local/bin/df2mrtg /dev/dsk/c0t2d0s0`
# * You can also use several statements in a mathematical
# expression. This could be used to aggregate both B channels
# in an ISDN connection or multiple T1's that are aggregated
# into a single channel for greater bandwidth.
# Note the whitespace arround the target definitions.
# Target[ezwf]: 2:public@wellfleetA + 1:public@wellfleetA
# * 4:public@ciscoF
##
## RouterUptime ---------------------------------------
##
#
# In cases where you calculate the used bandwidth from
# several interfaces you normaly don't get the routeruptime
# and routername displayed on the web page.
# If this interface are on the same router and the uptime and
# name should be displayed nevertheless you have to specify
# its community and address again with the RouterUptime keyword.
# Target[kacisco]: 1:public@194.64.66.250 + 2:public@194.64.66.250
# RouterUptime[kacisco]: public@194.64.66.250
##
## MaxBytes -------------------------------------------
##
# How many bytes per second can this port carry. Since most
# links are rated in bits per second, you need to divide
# their maximum bandwidth (in bits) by eight (8) in order to get
# bytes per second. This is very important to make your
# unscaled graphs display realistic information.
# T1 = 193000, 56K = 7000, Ethernet = 1250000. The "MaxBytes"
# value will be used by mrtg to decide whether it got a
# valid response from the router. If a number higher than
# "MaxBytes" is returned, it is ignored. Also read the section
# on AbsMax for further info.
# MaxBytes[ezwf]: 1250000
##
## Title -----------------------------------------------
##
# Title for the HTML page which gets generated for the graph.
# Title[ezwf]: Traffic Analysis for ETZ C 95.1
##
## PageTop ---------------------------------------------
##
# Things to add to the top of the generated HTML page. Note
# that you can have several lines of text as long as the
# first column is empty.
# Note that the continuation lines will all end up on the same
# line in the html page. If you want linebreaks in the generated
# html use the '\n' sequence.
# PageTop[ezwf]:

Traffic Analysis for ETZ C95.1


# Our Campus Backbone runs over an FDDI line\n
# with a maximum transfer rate of 12.5 Mega Bytes per
# Second.
##
## PageFoot ---------------------------------------------
##
# Things to add at the very end of the mrtg generated html page
# PageFoot[ezwf]:
This page is managed by Blubber
# --------------------------------------------------
# Optional Target Configuration Tags
# --------------------------------------------------
##
## AddHead -----------------------------------------
##
# Use this tag like the PageTop header, but its contents
# will be added between and .
# AddHead[ezwf]:
##
## AbsMax ------------------------------------------
##
# If you are monitoring a link which can handle more traffic
# than the MaxBytes value. Eg, a line which uses compression
# or some frame relay link, you can use the AbsMax keyword
# to give the absolute maximum value ever to be reached. We
# need to know this in order to sort out unrealistic values
# returned by the routers. If you do not set absmax, rateup
# will ignore values higher then MaxBytes.
# AbsMax[ezwf]: 2500000
##
## Unscaled ------------------------------------------
##
# By default each graph is scaled vertically to make the
# actual data visible even when it is much lower than
# MaxBytes. With the "Unscaled" variable you can suppress
# this. It's argument is a string, containing one letter
# for each graph you don't want to be scaled: d=day w=week
# m=month y=year. In the example I suppress scaling for the
# yearly and the monthly graph.
# Unscaled[ezwf]: ym
##
## WithPeak ------------------------------------------
##
# By default the graphs only contain the average transfer
# rates for incoming and outgoing traffic. The
# following option instructs mrtg to display the peak
# 5 minute transfer rates in the [w]eekly, [m]onthly and
# [y]early graph. In the example we define the monthly
# and the yearly graph to contain peak as well as average
# values.
# WithPeak[ezwf]: ym
##
## Supress ------------------------------------------
##
# By Default mrtg produces 4 graphs. With this option you
# can suppress the generation of selected graphs. The format
# is analog to the above option. In this example we suppress
# the yearly graph as it is quite empty in the beginning.
# Suppress[ezwf]: y
##
## Directory
##
# By default, mrtg puts all the files that it generates for each
# router (the GIFs, the HTML page, the log file, etc.) in WorkDir.
# If the "Directory" option is specified, the files are instead put
# into a directory under WorkDir. (For example, given the options in
# this mrtg.cfg-dist file, the "Directory" option below would cause all
# the ezwf files to be put into /usr/tardis/pub/www/stats/mrtg/ezwf .)
#
# The directory must already exist; mrtg will not create it.
# Directory[ezwf]: ezwf
##
## XSize and YSize ------------------------------------------
##
# By Default mrtgs graphs are 100 by 400 pixels wide (plus
# some more for the labels. In the example we get almost
# square graphs ...
# Note: XSize must be between 20 and 600
# YSize must be larger than 20
# XSize[ezwf]: 300
# YSize[ezwf]: 300
##
## XZoom YZoom -------------------------------------------------
##
# If you want your graphs to have larger pixels, you can
# "Zoom" them.
#XZoom[ezwf]: 2.0
#YZoom[ezwf]: 2.0
##
## XScale YScale -------------------------------------------------
##
# If you want your graphs to be actually scaled use XScale
# and YScale. (Beware while this works, the results look ugly
# (to be frank) so if someone wants fix this: patches are
# welcome.
# XScale[ezwf]: 1.5
# YScale[ezwf]: 1.5
##
## Step -----------------------------------------------------------
##
# Change the default step with from 5 * 60 seconds to
# something else I have not tested this well ...
# Step[ezwf]: 60
##
## Options ------------------------------------------
##
# The "Options" Keyword allows you to set some boolean
# switches:
#
# growright - The graph grows to the left by default.
#
# bits - All the numbers printed are in bits instead
# of bytes ... looks much more impressive :-)
#
# noinfo - Supress the information about uptime and
# device name in the generated webpage.
#
# absolute - This is for data sources which reset their
# value when they are read. This means that
# rateup has not to build the difference between
# this and the last value read from the data
# source. Useful for external data gatherers.
#
# gauge - Treat the values gathered from target as absolute
# and not as counters. This would be useful to
# monitor things like diskspace, load and so
# on ....
#
# nopercent Don't print usage percentages
#
# integer Don't print only integers in the summary ...
#
# Options[ezwf]: growright, bits
##
## Colours ------------------------------------------
##
# The "Colours" tag allows you to override the default colour
# scheme. Note: All 4 of the required colours must be
# specified here The colour name ('Colourx' below) is the
# legend name displayed, while the RGB value is the real
# colour used for the display, both on the graph and n the
# html doc.
# Format is: Colour1#RRGGBB,Colour2#RRGGBB,Colour3#RRGGBB,Colour4#RRGGBB
# where: Colour1 = Input on default graph
# Colour2 = Output on default graph
# Colour3 = Max input
# Colour4 = Max output
# RRGGBB = 2 digit hex values for Red, Green and Blue
# Colours[ezwf]: GREEN#00eb0c,BLUE#1000ff,DARK GREEN#006600,VIOLET#ff00ff
##
## Background ------------------------------------------
##
# With the "Background" tag you can configure the background
# colour of the generated HTML page
# Background[ezwf]: #a0a0a0a
##
## YLegend, ShortLegend, Legend[1234] ------------------
##
# The following keywords allow you to override the text
# displayed for the various legends of the graph and in the
# HTML document
#
# * YLegend : The Y-Axis of the graph
# * ShortLegend: The 'b/s' string used for Max, Average and Current
# * Legend[1234IO]: The strings for the colour legend
#
#YLegend[ezwf]: Bits per Second
#ShortLegend[ezwf]: b/s
#Legend1[ezwf]: Incoming Traffic in Bits per Second
#Legend2[ezwf]: Outgoing Traffic in Bits per Second
#Legend3[ezwf]: Maximal 5 Minute Incoming Traffic
#Legend4[ezwf]: Maximal 5 Minute Outgoing Traffic
#LegendI[ezwf]: In:
#LegendO[ezwf]: Out:
# Note, if LegendI or LegendO are set to an empty string with
# LegendO[ezwf]:
# The corresponding line below the graph will not be printed at all.
# If you live in an international world, you might want to
# generate the graphs in different timezones. This is set in the
# TZ variable. Under certain operating systems like Solaris,
# this will provoke the localtime call to giv the time in
# the selected timezone ...
# Timezone[ezwf]: Japan
# The Timezone is the standard Solaris timezone, ie Japan, Hongkong,
# GMT, GMT+1 etc etc.
# By default, mrtg (actually rateup) uses the strftime(3) '%W' option
# to format week numbers in the monthly graphs. The exact semantics
# of this format option vary between systems. If you find that the
# week numbers are wrong, and your system's strftime(3) routine
# supports it, you can try another format option. The POSIX '%V'
# option seems to correspond to a widely used week numbering
# convention. The week format character should be specified as a
# single letter; either W, V, or U.
# Weekformat[ezwf]: V

# #############################
# Two very special Target names
# #############################
# To save yourself some typing you can define a target
# called '^'. The text of every Keyword you define for this
# target will be PREPENDED to the corresponding Keyword of
# all the targets defined below this line. The same goes for
# a Target called '$' but its options will be APPENDED.
#
# The example will make mrtg use a common header and a
# common contact person in all the pages generated from
# targets defined later in this file.
#
#PageTop[^]:

NoWhere Unis Traffic Stats



#PageTop[$]: Contact Peter Norton if you have any questions

PageFoot[^]: Page managed by Chris Miles
Target[cacheServerRequests]: cacheServerRequests&cacheServerRequests:public@hostname:3401
MaxBytes[cacheServerRequests]: 10000000
Title[cacheServerRequests]: Server Requests @ hostname
Options[cacheServerRequests]: growright, nopercent
PageTop[cacheServerRequests]:

Server Requests @ hostname


YLegend[cacheServerRequests]: requests/sec
ShortLegend[cacheServerRequests]: req/s
LegendI[cacheServerRequests]: Requests
LegendO[cacheServerRequests]:
Legend1[cacheServerRequests]: Requests
Legend2[cacheServerRequests]:
Target[cacheServerErrors]: cacheServerErrors&cacheServerErrors:public@hostname:3401
MaxBytes[cacheServerErrors]: 10000000
Title[cacheServerErrors]: Server Errors @ hostname
Options[cacheServerErrors]: growright, nopercent
PageTop[cacheServerErrors]:

Server Errors @ hostname


YLegend[cacheServerErrors]: errors/sec
ShortLegend[cacheServerErrors]: err/s
LegendI[cacheServerErrors]: Errors
LegendO[cacheServerErrors]:
Legend1[cacheServerErrors]: Errors
Legend2[cacheServerErrors]:
Target[cacheServerInOutKb]: cacheServerInKb&cacheServerOutKb:public@hostname:3401 * 1024
MaxBytes[cacheServerInOutKb]: 1000000000
Title[cacheServerInOutKb]: Server In/Out Traffic @ hostname
Options[cacheServerInOutKb]: growright, nopercent
PageTop[cacheServerInOutKb]:

Server In/Out Traffic @ hostname


YLegend[cacheServerInOutKb]: Bytes/sec
ShortLegend[cacheServerInOutKb]: Bytes/s
LegendI[cacheServerInOutKb]: Server In
LegendO[cacheServerInOutKb]: Server Out
Legend1[cacheServerInOutKb]: Server In
Legend2[cacheServerInOutKb]: Server Out
Target[cacheClientHttpRequests]: cacheClientHttpRequests&cacheClientHttpRequests:public@hostname:3401
MaxBytes[cacheClientHttpRequests]: 10000000
Title[cacheClientHttpRequests]: Client Http Requests @ hostname
Options[cacheClientHttpRequests]: growright, nopercent
PageTop[cacheClientHttpRequests]:

Client Http Requests @ hostname


YLegend[cacheClientHttpRequests]: requests/sec
ShortLegend[cacheClientHttpRequests]: req/s
LegendI[cacheClientHttpRequests]: Requests
LegendO[cacheClientHttpRequests]:
Legend1[cacheClientHttpRequests]: Requests
Legend2[cacheClientHttpRequests]:
Target[cacheHttpHits]: cacheHttpHits&cacheHttpHits:public@hostname:3401
MaxBytes[cacheHttpHits]: 10000000
Title[cacheHttpHits]: HTTP Hits @ hostname
Options[cacheHttpHits]: growright, nopercent
PageTop[cacheHttpHits]:

HTTP Hits @ hostname


YLegend[cacheHttpHits]: hits/sec
ShortLegend[cacheHttpHits]: hits/s
LegendI[cacheHttpHits]: Hits
LegendO[cacheHttpHits]:
Legend1[cacheHttpHits]: Hits
Legend2[cacheHttpHits]:
Target[cacheHttpErrors]: cacheHttpErrors&cacheHttpErrors:public@hostname:3401
MaxBytes[cacheHttpErrors]: 10000000
Title[cacheHttpErrors]: HTTP Errors @ hostname
Options[cacheHttpErrors]: growright, nopercent
PageTop[cacheHttpErrors]:

HTTP Errors @ hostname


YLegend[cacheHttpErrors]: errors/sec
ShortLegend[cacheHttpErrors]: err/s
LegendI[cacheHttpErrors]: Errors
LegendO[cacheHttpErrors]:
Legend1[cacheHttpErrors]: Errors
Legend2[cacheHttpErrors]:
Target[cacheIcpPktsSentRecv]: cacheIcpPktsSent&cacheIcpPktsRecv:public@hostname:3401
MaxBytes[cacheIcpPktsSentRecv]: 10000000
Title[cacheIcpPktsSentRecv]: ICP Packets Sent/Received
Options[cacheIcpPktsSentRecv]: growright, nopercent
PageTop[cacheIcpPktsSentRecv]:

ICP Packets Sent/Recieved @ hostname


YLegend[cacheIcpPktsSentRecv]: packets/sec
ShortLegend[cacheIcpPktsSentRecv]: pkts/s
LegendI[cacheIcpPktsSentRecv]: Pkts Sent
LegendO[cacheIcpPktsSentRecv]: Pkts Received
Legend1[cacheIcpPktsSentRecv]: Pkts Sent
Legend2[cacheIcpPktsSentRecv]: Pkts Received
Target[cacheIcpKbSentRecv]: cacheIcpKbSent&cacheIcpKbRecv:public@hostname:3401 * 1024
MaxBytes[cacheIcpKbSentRecv]: 1000000000
Title[cacheIcpKbSentRecv]: ICP Bytes Sent/Received
Options[cacheIcpKbSentRecv]: growright, nopercent
PageTop[cacheIcpKbSentRecv]:

ICP Bytes Sent/Received @ hostname


YLegend[cacheIcpKbSentRecv]: Bytes/sec
ShortLegend[cacheIcpKbSentRecv]: Bytes/s
LegendI[cacheIcpKbSentRecv]: Sent
LegendO[cacheIcpKbSentRecv]: Received
Legend1[cacheIcpKbSentRecv]: Sent
Legend2[cacheIcpKbSentRecv]: Received
Target[cacheHttpInOutKb]: cacheHttpInKb&cacheHttpOutKb:public@hostname:3401 * 1024
MaxBytes[cacheHttpInOutKb]: 1000000000
Title[cacheHttpInOutKb]: HTTP In/Out Traffic @ hostname
Options[cacheHttpInOutKb]: growright, nopercent
PageTop[cacheHttpInOutKb]:

HTTP In/Out Traffic @ hostname


YLegend[cacheHttpInOutKb]: Bytes/second
ShortLegend[cacheHttpInOutKb]: Bytes/s
LegendI[cacheHttpInOutKb]: HTTP In
LegendO[cacheHttpInOutKb]: HTTP Out
Legend1[cacheHttpInOutKb]: HTTP In
Legend2[cacheHttpInOutKb]: HTTP Out
Target[cacheCurrentSwapSize]: cacheCurrentSwapSize&cacheCurrentSwapSize:public@hostname:3401
MaxBytes[cacheCurrentSwapSize]: 1000000000
Title[cacheCurrentSwapSize]: Current Swap Size @ hostname
Options[cacheCurrentSwapSize]: gauge, growright, nopercent
PageTop[cacheCurrentSwapSize]:

Current Swap Size @ hostname


YLegend[cacheCurrentSwapSize]: swap size
ShortLegend[cacheCurrentSwapSize]: Bytes
LegendI[cacheCurrentSwapSize]: Swap Size
LegendO[cacheCurrentSwapSize]:
Legend1[cacheCurrentSwapSize]: Swap Size
Legend2[cacheCurrentSwapSize]:
Target[cacheNumObjCount]: cacheNumObjCount&cacheNumObjCount:public@hostname:3401
MaxBytes[cacheNumObjCount]: 10000000
Title[cacheNumObjCount]: Num Object Count @ hostname
Options[cacheNumObjCount]: gauge, growright, nopercent
PageTop[cacheNumObjCount]:

Num Object Count @ hostname


YLegend[cacheNumObjCount]: # of objects
ShortLegend[cacheNumObjCount]: objects
LegendI[cacheNumObjCount]: Num Objects
LegendO[cacheNumObjCount]:
Legend1[cacheNumObjCount]: Num Objects
Legend2[cacheNumObjCount]:
Target[cacheCpuUsage]: cacheCpuUsage&cacheCpuUsage:public@hostname:3401
MaxBytes[cacheCpuUsage]: 100
AbsMax[cacheCpuUsage]: 100
Title[cacheCpuUsage]: CPU Usage @ hostname
Options[cacheCpuUsage]: absolute, gauge, noinfo, growright, nopercent
Unscaled[cacheCpuUsage]: dwmy
PageTop[cacheCpuUsage]:

CPU Usage @ hostname


YLegend[cacheCpuUsage]: usage %
ShortLegend[cacheCpuUsage]:%
LegendI[cacheCpuUsage]: CPU Usage
LegendO[cacheCpuUsage]:
Legend1[cacheCpuUsage]: CPU Usage
Legend2[cacheCpuUsage]:
Target[cacheMemUsage]: cacheMemUsage&cacheMemUsage:public@hostname:3401 * 1024
MaxBytes[cacheMemUsage]: 2000000000
Title[cacheMemUsage]: Memory Usage
Options[cacheMemUsage]: gauge, growright, nopercent
PageTop[cacheMemUsage]:

Total memory accounted for @ hostname


YLegend[cacheMemUsage]: Bytes
ShortLegend[cacheMemUsage]: Bytes
LegendI[cacheMemUsage]: Mem Usage
LegendO[cacheMemUsage]:
Legend1[cacheMemUsage]: Mem Usage
Legend2[cacheMemUsage]:
Target[cacheSysPageFaults]: cacheSysPageFaults&cacheSysPageFaults:public@hostname:3401
MaxBytes[cacheSysPageFaults]: 10000000
Title[cacheSysPageFaults]: Sys Page Faults @ hostname
Options[cacheSysPageFaults]: growright, nopercent
PageTop[cacheSysPageFaults]:

Sys Page Faults @ hostname


YLegend[cacheSysPageFaults]: page faults/sec
ShortLegend[cacheSysPageFaults]: PF/s
LegendI[cacheSysPageFaults]: Page Faults
LegendO[cacheSysPageFaults]:
Legend1[cacheSysPageFaults]: Page Faults
Legend2[cacheSysPageFaults]:
Target[cacheSysVMsize]: cacheSysVMsize&cacheSysVMsize:public@hostname:3401 * 1024
MaxBytes[cacheSysVMsize]: 1000000000
Title[cacheSysVMsize]: Storage Mem Size @ hostname
Options[cacheSysVMsize]: gauge, growright, nopercent
PageTop[cacheSysVMsize]:

Storage Mem Size @ hostname


YLegend[cacheSysVMsize]: mem size
ShortLegend[cacheSysVMsize]: Bytes
LegendI[cacheSysVMsize]: Mem Size
LegendO[cacheSysVMsize]:
Legend1[cacheSysVMsize]: Mem Size
Legend2[cacheSysVMsize]:
Target[cacheSysStorage]: cacheSysStorage&cacheSysStorage:public@hostname:3401
MaxBytes[cacheSysStorage]: 1000000000
Title[cacheSysStorage]: Storage Swap Size @ hostname
Options[cacheSysStorage]: gauge, growright, nopercent
PageTop[cacheSysStorage]:

Storage Swap Size @ hostname


YLegend[cacheSysStorage]: swap size (KB)
ShortLegend[cacheSysStorage]: KBytes
LegendI[cacheSysStorage]: Swap Size
LegendO[cacheSysStorage]:
Legend1[cacheSysStorage]: Swap Size
Legend2[cacheSysStorage]:
Target[cacheSysNumReads]: cacheSysNumReads&cacheSysNumReads:public@hostname:3401
MaxBytes[cacheSysNumReads]: 10000000
Title[cacheSysNumReads]: HTTP I/O number of reads @ hostname
Options[cacheSysNumReads]: growright, nopercent
PageTop[cacheSysNumReads]:

HTTP I/O number of reads @ hostname


YLegend[cacheSysNumReads]: reads/sec
ShortLegend[cacheSysNumReads]: reads/s
LegendI[cacheSysNumReads]: I/O
LegendO[cacheSysNumReads]:
Legend1[cacheSysNumReads]: I/O
Legend2[cacheSysNumReads]:
Target[cacheCpuTime]: cacheCpuTime&cacheCpuTime:public@hostname:3401
MaxBytes[cacheCpuTime]: 1000000000
Title[cacheCpuTime]: Cpu Time
Options[cacheCpuTime]: gauge, growright, nopercent
PageTop[cacheCpuTime]:

Amount of cpu seconds consumed @ hostname


YLegend[cacheCpuTime]: cpu seconds
ShortLegend[cacheCpuTime]: cpu seconds
LegendI[cacheCpuTime]: Mem Time
LegendO[cacheCpuTime]:
Legend1[cacheCpuTime]: Mem Time
Legend2[cacheCpuTime]:
Target[cacheMaxResSize]: cacheMaxResSize&cacheMaxResSize:public@hostname:3401 * 1024
MaxBytes[cacheMaxResSize]: 1000000000
Title[cacheMaxResSize]: Max Resident Size
Options[cacheMaxResSize]: gauge, growright, nopercent
PageTop[cacheMaxResSize]:

Maximum Resident Size @ hostname


YLegend[cacheMaxResSize]: Bytes
ShortLegend[cacheMaxResSize]: Bytes
LegendI[cacheMaxResSize]: Size
LegendO[cacheMaxResSize]:
Legend1[cacheMaxResSize]: Size
Legend2[cacheMaxResSize]:
Target[cacheCurrentLRUExpiration]: cacheCurrentLRUExpiration&cacheCurrentLRUExpiration:public@hostname:3401
MaxBytes[cacheCurrentLRUExpiration]: 1000000000
Title[cacheCurrentLRUExpiration]: LRU Expiration Age
Options[cacheCurrentLRUExpiration]: gauge, growright, nopercent
PageTop[cacheCurrentLRUExpiration]:

Storage LRU Expiration Age @ hostname


YLegend[cacheCurrentLRUExpiration]: expir (days)
ShortLegend[cacheCurrentLRUExpiration]: days
LegendI[cacheCurrentLRUExpiration]: Age
LegendO[cacheCurrentLRUExpiration]:
Legend1[cacheCurrentLRUExpiration]: Age
Legend2[cacheCurrentLRUExpiration]:
Target[cacheCurrentUnlinkRequests]: cacheCurrentUnlinkRequests&cacheCurrentUnlinkRequests:public@hostname:3401
MaxBytes[cacheCurrentUnlinkRequests]: 1000000000
Title[cacheCurrentUnlinkRequests]: Unlinkd Requests
Options[cacheCurrentUnlinkRequests]: growright, nopercent
PageTop[cacheCurrentUnlinkRequests]:

Requests given to unlinkd @ hostname


YLegend[cacheCurrentUnlinkRequests]: requests/sec
ShortLegend[cacheCurrentUnlinkRequests]: reqs/s
LegendI[cacheCurrentUnlinkRequests]: Unlinkd requests
LegendO[cacheCurrentUnlinkRequests]:
Legend1[cacheCurrentUnlinkRequests]: Unlinkd requests
Legend2[cacheCurrentUnlinkRequests]:
Target[cacheCurrentUnusedFileDescrCount]: cacheCurrentUnusedFileDescrCount&cacheCurrentUnusedFileDescrCount:public@hostname:3401
MaxBytes[cacheCurrentUnusedFileDescrCount]: 1000000000
Title[cacheCurrentUnusedFileDescrCount]: Available File Descriptors
Options[cacheCurrentUnusedFileDescrCount]: gauge, growright, nopercent
PageTop[cacheCurrentUnusedFileDescrCount]:

Available number of file descriptors @ hostname


YLegend[cacheCurrentUnusedFileDescrCount]: # of FDs
ShortLegend[cacheCurrentUnusedFileDescrCount]: FDs
LegendI[cacheCurrentUnusedFileDescrCount]: File Descriptors
LegendO[cacheCurrentUnusedFileDescrCount]:
Legend1[cacheCurrentUnusedFileDescrCount]: File Descriptors
Legend2[cacheCurrentUnusedFileDescrCount]:
Target[cacheCurrentReservedFileDescrCount]: cacheCurrentReservedFileDescrCount&cacheCurrentReservedFileDescrCount:public@hostname:3401
MaxBytes[cacheCurrentReservedFileDescrCount]: 1000000000
Title[cacheCurrentReservedFileDescrCount]: Reserved File Descriptors
Options[cacheCurrentReservedFileDescrCount]: gauge, growright, nopercent
PageTop[cacheCurrentReservedFileDescrCount]:

Reserved number of file descriptors @ hostname


YLegend[cacheCurrentReservedFileDescrCount]: # of FDs
ShortLegend[cacheCurrentReservedFileDescrCount]: FDs
LegendI[cacheCurrentReservedFileDescrCount]: File Descriptors
LegendO[cacheCurrentReservedFileDescrCount]:
Legend1[cacheCurrentReservedFileDescrCount]: File Descriptors
Legend2[cacheCurrentReservedFileDescrCount]:
Target[cacheClients]: cacheClients&cacheClients:public@hostname:3401
MaxBytes[cacheClients]: 1000000000
Title[cacheClients]: Number of Clients
Options[cacheClients]: growright, nopercent
PageTop[cacheClients]:

Number of clients accessing cache @ hostname


YLegend[cacheClients]: clients/sec
ShortLegend[cacheClients]: clients/s
LegendI[cacheClients]: Num Clients
LegendO[cacheClients]:
Legend1[cacheClients]: Num Clients
Legend2[cacheClients]:
Target[cacheHttpAllSvcTime]: cacheHttpAllSvcTime.5&cacheHttpAllSvcTime.60:public@hostname:3401
MaxBytes[cacheHttpAllSvcTime]: 1000000000
Title[cacheHttpAllSvcTime]: HTTP All Service Time
Options[cacheHttpAllSvcTime]: gauge, growright, nopercent
PageTop[cacheHttpAllSvcTime]:

HTTP all service time @ hostname


YLegend[cacheHttpAllSvcTime]: svc time (ms)
ShortLegend[cacheHttpAllSvcTime]: ms
LegendI[cacheHttpAllSvcTime]: Median Svc Time (5min)
LegendO[cacheHttpAllSvcTime]: Median Svc Time (60min)
Legend1[cacheHttpAllSvcTime]: Median Svc Time
Legend2[cacheHttpAllSvcTime]: Median Svc Time
Target[cacheHttpMissSvcTime]: cacheHttpMissSvcTime.5&cacheHttpMissSvcTime.60:public@hostname:3401
MaxBytes[cacheHttpMissSvcTime]: 1000000000
Title[cacheHttpMissSvcTime]: HTTP Miss Service Time
Options[cacheHttpMissSvcTime]: gauge, growright, nopercent
PageTop[cacheHttpMissSvcTime]:

HTTP miss service time @ hostname


YLegend[cacheHttpMissSvcTime]: svc time (ms)
ShortLegend[cacheHttpMissSvcTime]: ms
LegendI[cacheHttpMissSvcTime]: Median Svc Time (5min)
LegendO[cacheHttpMissSvcTime]: Median Svc Time (60min)
Legend1[cacheHttpMissSvcTime]: Median Svc Time
Legend2[cacheHttpMissSvcTime]: Median Svc Time
Target[cacheHttpNmSvcTime]: cacheHttpNmSvcTime.5&cacheHttpNmSvcTime.60:public@hostname:3401
MaxBytes[cacheHttpNmSvcTime]: 1000000000
Title[cacheHttpNmSvcTime]: HTTP Near Miss Service Time
Options[cacheHttpNmSvcTime]: gauge, growright, nopercent
PageTop[cacheHttpNmSvcTime]:

HTTP near miss service time @ hostname


YLegend[cacheHttpNmSvcTime]: svc time (ms)
ShortLegend[cacheHttpNmSvcTime]: ms
LegendI[cacheHttpNmSvcTime]: Median Svc Time (5min)
LegendO[cacheHttpNmSvcTime]: Median Svc Time (60min)
Legend1[cacheHttpNmSvcTime]: Median Svc Time
Legend2[cacheHttpNmSvcTime]: Median Svc Time
Target[cacheHttpHitSvcTime]: cacheHttpHitSvcTime.5&cacheHttpHitSvcTime.60:public@hostname:3401
MaxBytes[cacheHttpHitSvcTime]: 1000000000
Title[cacheHttpHitSvcTime]: HTTP Hit Service Time
Options[cacheHttpHitSvcTime]: gauge, growright, nopercent
PageTop[cacheHttpHitSvcTime]:

HTTP hit service time @ hostname


YLegend[cacheHttpHitSvcTime]: svc time (ms)
ShortLegend[cacheHttpHitSvcTime]: ms
LegendI[cacheHttpHitSvcTime]: Median Svc Time (5min)
LegendO[cacheHttpHitSvcTime]: Median Svc Time (60min)
Legend1[cacheHttpHitSvcTime]: Median Svc Time
Legend2[cacheHttpHitSvcTime]: Median Svc Time
Target[cacheIcpQuerySvcTime]: cacheIcpQuerySvcTime.5&cacheIcpQuerySvcTime.60:public@hostname:3401
MaxBytes[cacheIcpQuerySvcTime]: 1000000000
Title[cacheIcpQuerySvcTime]: ICP Query Service Time
Options[cacheIcpQuerySvcTime]: gauge, growright, nopercent
PageTop[cacheIcpQuerySvcTime]:

ICP query service time @ hostname


YLegend[cacheIcpQuerySvcTime]: svc time (ms)
ShortLegend[cacheIcpQuerySvcTime]: ms
LegendI[cacheIcpQuerySvcTime]: Median Svc Time (5min)
LegendO[cacheIcpQuerySvcTime]: Median Svc Time (60min)
Legend1[cacheIcpQuerySvcTime]: Median Svc Time
Legend2[cacheIcpQuerySvcTime]: Median Svc Time
Target[cacheIcpReplySvcTime]: cacheIcpReplySvcTime.5&cacheIcpReplySvcTime.60:public@hostname:3401
MaxBytes[cacheIcpReplySvcTime]: 1000000000
Title[cacheIcpReplySvcTime]: ICP Reply Service Time
Options[cacheIcpReplySvcTime]: gauge, growright, nopercent
PageTop[cacheIcpReplySvcTime]:

ICP reply service time @ hostname


YLegend[cacheIcpReplySvcTime]: svc time (ms)
ShortLegend[cacheIcpReplySvcTime]: ms
LegendI[cacheIcpReplySvcTime]: Median Svc Time (5min)
LegendO[cacheIcpReplySvcTime]: Median Svc Time (60min)
Legend1[cacheIcpReplySvcTime]: Median Svc Time
Legend2[cacheIcpReplySvcTime]: Median Svc Time
Target[cacheDnsSvcTime]: cacheDnsSvcTime.5&cacheDnsSvcTime.60:public@hostname:3401
MaxBytes[cacheDnsSvcTime]: 1000000000
Title[cacheDnsSvcTime]: DNS Service Time
Options[cacheDnsSvcTime]: gauge, growright, nopercent
PageTop[cacheDnsSvcTime]:

DNS service time @ hostname


YLegend[cacheDnsSvcTime]: svc time (ms)
ShortLegend[cacheDnsSvcTime]: ms
LegendI[cacheDnsSvcTime]: Median Svc Time (5min)
LegendO[cacheDnsSvcTime]: Median Svc Time (60min)
Legend1[cacheDnsSvcTime]: Median Svc Time
Legend2[cacheDnsSvcTime]: Median Svc Time
Target[cacheRequestHitRatio]: cacheRequestHitRatio.5&cacheRequestHitRatio.60:public@hostname:3401
MaxBytes[cacheRequestHitRatio]: 100
AbsMax[cacheRequestHitRatio]: 100
Title[cacheRequestHitRatio]: Request Hit Ratio @ hostname
Options[cacheRequestHitRatio]: absolute, gauge, noinfo, growright, nopercent
Unscaled[cacheRequestHitRatio]: dwmy
PageTop[cacheRequestHitRatio]:

Request Hit Ratio @ hostname


YLegend[cacheRequestHitRatio]: %
ShortLegend[cacheRequestHitRatio]: %
LegendI[cacheRequestHitRatio]: Median Hit Ratio (5min)
LegendO[cacheRequestHitRatio]: Median Hit Ratio (60min)
Legend1[cacheRequestHitRatio]: Median Hit Ratio
Legend2[cacheRequestHitRatio]: Median Hit Ratio
Target[cacheRequestByteRatio]: cacheRequestByteRatio.5&cacheRequestByteRatio.60:public@hostname:3401
MaxBytes[cacheRequestByteRatio]: 100
AbsMax[cacheRequestByteRatio]: 100
Title[cacheRequestByteRatio]: Byte Hit Ratio @ hostname
Options[cacheRequestByteRatio]: absolute, gauge, noinfo, growright, nopercent
Unscaled[cacheRequestByteRatio]: dwmy
PageTop[cacheRequestByteRatio]:

Byte Hit Ratio @ hostname


YLegend[cacheRequestByteRatio]: %
ShortLegend[cacheRequestByteRatio]:%
LegendI[cacheRequestByteRatio]: Median Hit Ratio (5min)
LegendO[cacheRequestByteRatio]: Median Hit Ratio (60min)
Legend1[cacheRequestByteRatio]: Median Hit Ratio
Legend2[cacheRequestByteRatio]: Median Hit Ratio
Target[cacheBlockingGetHostByAddr]: cacheBlockingGetHostByAddr&cacheBlockingGetHostByAddr:public@hostname:3401
MaxBytes[cacheBlockingGetHostByAddr]: 1000000000
Title[cacheBlockingGetHostByAddr]: Blocking gethostbyaddr
Options[cacheBlockingGetHostByAddr]: growright, nopercent
PageTop[cacheBlockingGetHostByAddr]:

Blocking gethostbyaddr count @ hostname


YLegend[cacheBlockingGetHostByAddr]: blocks/sec
ShortLegend[cacheBlockingGetHostByAddr]: blocks/s
LegendI[cacheBlockingGetHostByAddr]: Blocking
LegendO[cacheBlockingGetHostByAddr]:
Legend1[cacheBlockingGetHostByAddr]: Blocking
Legend2[cacheBlockingGetHostByAddr]:

Configuring SNMP to work with MRTG on a Linux machine

Configuring SNMP to work with MRTG on a Linux machine
(A very basic, example setup)

All steps in this example are based on the following system / network :-
RedHat 9.0 (Full) running on a P-II Celeron 800 Mhz, 128MB RAM acting as server
One 100Mbps network card connected to a 100Mbps HUB
One 56Kbps external modem (connected to a local ISP of-course)
Two wintendo clients running wintendo ver 2000 and wintendo ver XP
All computers are on a network of 192.168.1.0/24. Server has IP: 192.168.1.254, wintendo computers have IP 192.168.1.1 and 192.168.1.2 respectively


(Note : it is needless to say that Server has all packages installed during installation. If you think you do not have some of the packages, see the MRTG HomePage for a list of what do you need. Also all steps were performed as root on the machine mainserver.kbsoft.local which is server)
Step 1:
Edit the /etc/snmp/snmpd.conf file and change things to make it look like :-


# vi /etc/snmp/snmpd.conf


###############################################################################
#
# snmpd.conf:
# An example configuration file for configuring the ucd-snmp snmpd agent.
#
###############################################################################
#
# This file is intended to only be as a starting point. Many more
# configuration directives exist than are mentioned in this file. For
# full details, see the snmpd.conf(5) manual page.
#
# All lines beginning with a '#' are comments and are intended for you
# to read. All other lines are configuration commands for the agent.


###############################################################################
# Access Control
###############################################################################


# As shipped, the snmpd demon will only respond to queries on the
# system mib group until this file is replaced or modified for
# security purposes. Examples are shown below about how to increase the
# level of access.


# By far, the most common question I get about the agent is "why won't
# it work?", when really it should be "how do I configure the agent to
# allow me to access it?"
#
# By default, the agent responds to the "public" community for read
# only access, if run out of the box without any configuration file in
# place. The following examples show you other ways of configuring
# the agent so that you can change the community names, and give
# yourself write access to the mib tree as well.
#
# For more information, read the FAQ as well as the snmpd.conf(5)
# manual page.


####
# First, map the community name "public" into a "security name"
# sec.name source community
com2sec local localhost KBComputersSNMP
com2sec mynet 192.168.1.0/24 KBComputersSNMP
####
# Second, map the security name into a group name:
# groupName securityModel securityName
group myrwgroup any local
group myrogroup any mynet


####
# Third, create a view for us to let the group have rights to:
# Make at least snmpwalk -v 1 localhost -c public system fast again.
# name incl/excl subtree mask(optional)
view all included .1 80
####
# Finally, grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write notif
access myrwgroup "" any noauth exact all all none
access myrogroup "" any noauth exact all none none
# -----------------------------------------------------------------------------
syslocation KBMainOffice (edit /etc/snmp/snmpd.conf)
syscontact Kamran <root@localhost> (configure /etc/snmp/snmp.local.conf)
sysDescr RedHat_Linux


##########################
# Irrelevant lines removed
##########################


# Added for support of bcm5820 cards.
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat


#############################################################################
# Further Information
# See the snmpd.conf manual page, and the output of "snmpd -H".
##############################################################################




Step 2:
Now start SNMP service by :-
# service snmpd start


Step 3:
Now run cfgmaker on this config file by :-
# cfgmaker KBComputersSNMP@192.168.1.254 > /etc/mrtg/mrtgkbsoft.cfg
And you should get output as :-
--base: Get Device Info on KBComputersSNMP@192.168.1.254:
--base: Vendor Id:
--base: Populating confcache
--snpo: confcache KBComputersSNMP@192.168.1.254: Descr -->
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 1.0 --> 1
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 2.0 --> 64
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 3.0 --> 115822
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 4.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 5.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 6.0 --> 5881
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 7.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 8.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 9.0 --> 108906
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 10.0 --> 70094
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 11.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 12.0 --> 26
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 13.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 14.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 15.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 16.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 17.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 18.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 19.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 20.1.1.127.0.0.1 --> 127.0.0.1
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 20.1.1.192.168.1.254 --> 192.168.1.254
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 20.1.1.210.56.9.144 --> 210.56.9.144
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 20.1.2.127.0.0.1 --> 1
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 20.1.2.192.168.1.254 --> 2
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 20.1.2.210.56.9.144 --> 3
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 20.1.3.127.0.0.1 --> 255.0.0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 20.1.3.192.168.1.254 --> 255.255.255.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 20.1.3.210.56.9.144 --> 255.255.255.255
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 20.1.4.127.0.0.1 --> 1
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 20.1.4.192.168.1.254 --> 1
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 20.1.4.210.56.9.144 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.1.0.0.0.0 --> 0.0.0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.1.127.0.0.0 --> 127.0.0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.1.169.254.0.0 --> 169.254.0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.1.192.168.1.0 --> 192.168.1.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.1.210.56.8.143 --> 210.56.8.143
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.2.0.0.0.0 --> 3
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.2.127.0.0.0 --> 3
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.2.169.254.0.0 --> 2
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.2.192.168.1.0 --> 2
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.2.210.56.8.143 --> 3
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.3.0.0.0.0 --> 1
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.3.127.0.0.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.3.169.254.0.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.3.192.168.1.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.3.210.56.8.143 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.7.0.0.0.0 --> 210.56.8.143
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.7.127.0.0.0 --> 0.0.0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.7.169.254.0.0 --> 0.0.0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.7.192.168.1.0 --> 0.0.0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.7.210.56.8.143 --> 0.0.0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.8.0.0.0.0 --> 4
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.8.127.0.0.0 --> 3
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.8.169.254.0.0 --> 3
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.8.192.168.1.0 --> 3
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.8.210.56.8.143 --> 3
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.9.0.0.0.0 --> 2
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.9.127.0.0.0 --> 2
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.9.169.254.0.0 --> 2
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.9.192.168.1.0 --> 2
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.9.210.56.8.143 --> 2
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.11.0.0.0.0 --> 0.0.0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.11.127.0.0.0 --> 255.0.0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.11.169.254.0.0 --> 255.255.0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.11.192.168.1.0 --> 255.255.255.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.11.210.56.8.143 --> 255.255.255.255
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.13.0.0.0.0 --> 0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.13.127.0.0.0 --> 0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.13.169.254.0.0 --> 0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.13.192.168.1.0 --> 0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 21.1.13.210.56.8.143 --> 0.0
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 22.1.1.2.192.168.1.1 --> 2
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 22.1.2.2.192.168.1.1 --> �\
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 22.1.3.2.192.168.1.1 --> 192.168.1.1
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 22.1.4.2.192.168.1.1 --> 3
--snpo: confcache KBComputersSNMP@192.168.1.254: Ip 23.0 --> 0
--snpo: confcache KBComputersSNMP@192.168.1.254: Name -->
--snpo: confcache KBComputersSNMP@192.168.1.254: Type -->
--snpo: confcache KBComputersSNMP@192.168.1.254: Eth --> 1
--snpo: confcache KBComputersSNMP@192.168.1.254: Eth 00-c0-26-69-95-cb --> 2
--snpo: confcache KBComputersSNMP@192.168.1.254: Eth --> 3 (duplicate)
--base: Get Interface Info
--base: Walking ifIndex
--base: Walking ifType
--base: Walking ifSpeed
--base: Walking ifAdminStatus
--base: Walking ifOperStatus
#


If you get errors like 'SNMP Error' , etc then check your config file again, also check if the SNMP service is running or not.


Step 4:
Once the mrtg config file (/etc/mrtg/mrtgkbsoft.cfg) is generated, you have to edit it to change the WorkDir directive in it to the directory under your Webserver's DocumentRoot directory. In my case it is /var/www/html/mrtg. Below is just the starting part of this file:
# vi /etc/mrtg/mrtgkbsoft.cfg
# Created by
# /usr/bin/cfgmaker KBComputersSNMP@192.168.1.254
### Global Config Options


# for UNIX
WorkDir: /var/www/html/mrtg


# or for NT
# WorkDir: c:\mrtgdata


### Global Defaults


# to get bits instead of bytes and graphs growing to the right
# Options[_]: growright, bits


######################################################################


Step 5:
Once the file is edited, run indexmaker on it to generate the web pages for MRTG by:-
# indexmaker /etc/mrtg/mrtgkbsoft.cfg > /var/www/html/mrtg/index.html
You will see an output like the following, but do not worry, it will work :-


Possible precedence problem on bitwise operator at /usr/bin/../lib/mrtg2/BER.pm line 601.
Can't locate package $VERSION for @MRTG_lib::ISA at /usr/bin/indexmaker line 49
main::BEGIN() called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
eval {...} called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
#
Step 6:
Now that your index page is also made, you need to get data from the snmp daemon and fill the graphs of the index.html web page. Do this by:-
# mrtg /etc/mrtg/mrtgkbsoft.cfg
You will see a lot of error messages on RedHat8 and RedHat9 systems like :-
Malformed UTF-8 character (unexpected non-continuation byte 0x20, immediately after start byte 0xe2) at /usr/bin/../lib/mrtg2/locales_mrtg.pm line 3107.
Malformed UTF-8 character (unexpected non-continuation byte 0xcf, immediately after start byte 0xc0) at /usr/bin/../lib/mrtg2/locales_mrtg.pm line 3107.
But again nothing to worry about. This will work anyway. Just look for the missing file errors at the end, they are normal and you need to issue this command thrice to eliminate those errors.
Step 7:
Now is the time to check your web page. Direct your favorite web-browser to the URL /var/www/html/index.html
You should be able to see a graph (like the one shown below), possibly without any activity in it. If you can see this, then congragulations , you have setup SNMP and MRTG correctly on this machine.




You should be able to see more detailed graphs (child graphs of this graph) by clicking on it.
Now you need to feed data to this graph on a regular basis, let's say an interval of 5 minutes. What you need to do is in Step 8.
Step 8:
Edit crontab and put the entry in it as shown below.
# crontab -e
*/5 * * * * mrtg /etc/mrtg/mrtgkbsoft.cfg


Optional steps:-
The above scenario will allow you to view this graph only from the mainserver.kbsoft.local machine. If you want to view it from the rest of your network, then you may use the power of your web server. You got that right, the idea to put mrtg files in such a long complicated path was to be able to use the power of the web server in future. In order to achieve this, configure your webserver's ServerName directive accordingly and start your webserver by:-
# service httpd start
Now any machine on this network can access these graphs by directing their URL to http://mainserver.kbsoft.local/mrtg/index.html


Important note: Treat your community string as passwords and DO NOT reveal them to others.










Forex Trading