|
|
Multi Router Traffic Grapher (MRTG) is a free performance management application for Unix; it monitors SNMP statistics from any SNMP-capable device on your network and:
MRTG Polls for OIDs; OID Values that Are Returned to MRTG
For each OID referenced in the configuration file, MRTG creates the following graphs:
To quickly create images by using the GD graphics library, go to http://www.boutell.com/gd
To select which dial OIDs to query when monitoring dial-up activity, see the OIDs listed in the following tables:
![]() |
Caution Be cautious when polling network elements. Polling OIDs that retrieve large amounts of data can cause CPU problems on a Cisco IOS device. For example, do not get the ARP table, walk large portions of a MIB tree, poll the wrong OID too frequently, or get statistics that have an entry for every interface. For example, a Cisco 7200 may have 10 interfaces; whereas, a Cisco AS5800 may have 3,000 interfaces. |
In this case study, the tools UCD-SNMP and SNMP Commander were used to inspect and understand the MIBs. Based on this research, the network engineers at THEnet identified the OIDs in the following tables to program in to MRTG.
To see the complete structure of the CISCO-POP-MGMT-MIB and CISCO-MODEM-MGMT-MIB, go to the following URLs:
Variable | Base MIB and OID | Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Variable | Base MIB and OID | Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Variable | Base MIB and OID | Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Internet users spend approximately 80 percent of their time reading informationnot downloading data. Modem traffic is very limited on a per user basis. People cannot read as fast as modems can download. Therefore, watch for the following types of trends and performance data on the access servers:
The Connection Success Rate (CSR) is an important metric for tracking and measuring the stability of a dial service. The CSR is defined by the number of modems that successfully train up and go in to connected state. In addition to the CSR, you must track and analyze additional areas. For example, SNMP MIBs can be used to measure the success rate for items such as PPP, AAA, and IP negotiation.
To collect the CSR service level counters, inspect the connection success and failure rate by using modem OIDs or the show modem Cisco IOS command. SNMP, rather than the Cisco IOS CLI, is the preferred method to collect these counters. SNMP can scale to support large numbers of access servers.
The following graphs show the DS0s and PPP sessions in use for 70,000 modem users calling in to a dial-up service at a large university. The graphs are taken from one Cisco AS5300 in a large dial-up modem pool.
The jagged saw-tooth pattern at the top of the graph indicates a telephone-switch hunt group for the dial lines passing by the access servers. A "jump up" occurs each time the hunt group passes by a different T1 line. For a hunt group that rotates in a round-robin fashion, a jagged saw-tooth pattern is normal.
Weekly Graph: DS0s and PPP Sessions in Use
Monthly Graph: DS0s and PPP Sessions in Use
MRTG efficiently compresses and archives data to create graphs. For example, you can keep information for an entire year on a server without using much disk space.
Yearly Graph: DS0s and PPP Sessions in Use
The configuration file used to create these graphs is posted at http://www.cisco.com/univercd/cc/td/doc/cisintwk/intsolns/dialnms/mrtg53.txt
Note the numeric OIDs in the configuration file.
Because dial interfaces normally go up and down as calls connect and disconnect, monitor counters such as:
Depending on how the dial interfaces are used on a access server, different types of counters may not be valuable to monitor, such as byte-packet counters on the interfaces in Table 17.
Interface Type | Syntax Example |
|---|---|
|
|
|
|
|
|
|
|
|
|
To enable MRTG to locate a device and poll it for network statistics, follow these steps:
Step 2 Download, compile, and install MRTG on to a Solaris workstation:
Step 3 Create a configuration file.
There are two basic ways to create the file:
./cfgmaker communitystring@hostname-or-ipaddress >> outputfilename.cfg
./cfgmaker 5urf5h0p@travis-nas-01 >> travis-nas-01.cfg
![]() |
Note If the domain name server (DNS) is not working, MRTG cannot use a hostname. You must use an IP address instead. |
Step 4 By using a text editor, edit the configuration file (.cfg) to enable polling of dial variables and OIDs. For a complete list of OIDs to poll, see the "About Selecting Dial OIDs" section.
The following configuration file is from a Cisco AS5300. This file can be used as a configuration template for your environment, but use your own community string, work directory, and device name.
The following definitions are used in the example:
An electronic copy of this template is available at http://www.cisco.com/univercd/cc/td/doc/cisintwk/intsolns/dialnms/dialmrtg.txt
WorkDir: /export/home/www/mrtg/travis-nas-01/dial # set defaults Options[_]: growright # make legends reflect these are call counters YLegend[_]: Active Calls ShortLegend[_]: calls LegendI[_]: calls: LegendO[_]: calls: ###################################################################### #---------------------------------------------------------------------------------------- ------ # purpose: DS0s and PPP Sessions. #---------------------------------------------------------------------------------------- ------ Target[travis-nas-01_DS0PPP]: 1.3.6.1.4.1.9.10.19.1.1.4.0&1.3.6.1.4.1.9.10.19.1.1.5.0:5urf5h0p@travis-nas-01 MaxBytes1[travis-nas-01_DS0PPP]: 200 MaxBytes2[travis-nas-01_DS0PPP]: 200 Title[travis-nas-01_DS0PPP]: DS0s and PPP sessions in Use PageTop[travis-nas-01_DS0PPP]: <H2>DS0s and PPP sessions in Use</H2> <TABLE> <TR><TD>Device:</TD><TD>travis-nas-01</TD></TR> <TR><TD><a href="/mrtg/mrtg.html">HOME</a></TD></TR> </TABLE> Options[travis-nas-01_DS0PPP]: gauge #--------------------------------------------------------------------------------------- # purpose: DS0s and Analog #--------------------------------------------------------------------------------------- Target[travis-nas-01_DS0ANALOG]: 1.3.6.1.4.1.9.10.19.1.1.4.0&1.3.6.1.4.1.9.10.19.1.1.2.0:5urf5h0p@travis-nas-01 MaxBytes1[travis-nas-01_DS0ANALOG]: 200 MaxBytes2[travis-nas-01_DS0ANALOG]: 200 Title[travis-nas-01_DS0ANALOG]: DS0s and Analog in Use PageTop[travis-nas-01_DS0ANALOG]: <H2>DS0s and Analog in Use</H2> <TABLE> <TR><TD>Device:</TD><TD>travis-nas-01</TD></TR> <TR><TD><a href="/mrtg/mrtg.html">HOME</a></TD></TR> </TABLE> Options[travis-nas-01_DS0ANALOG]: gauge #---------------------------------------------------------------------------------------- ------ # purpose: DS0s and SerialX:Y #---------------------------------------------------------------------------------------- ------ Target[travis-nas-01_DS0SERIAL]: 1.3.6.1.4.1.9.10.19.1.1.4.0&1.3.6.1.4.1.9.10.19.1.1.3.0:5urf5h0p@travis-nas-01 MaxBytes1[travis-nas-01_DS0SERIAL]: 200 MaxBytes2[travis-nas-01_DS0SERIAL]: 200 Title[travis-nas-01_DS0SERIAL]: DS0s and SerialX:Y in Use PageTop[travis-nas-01_DS0SERIAL]: <H2>DS0s and SerialX:Y in Use</H2> <TABLE> <TR><TD>Device:</TD><TD>travis-nas-01</TD></TR> <TR><TD><a href="/mrtg/mrtg.html">HOME</a></TD></TR> </TABLE> Options[travis-nas-01_DS0SERIAL]: gauge #---------------------------------------------------------------------------------------- ------ # purpose: DS0s and Sw56 #---------------------------------------------------------------------------------------- ------ Target[travis-nas-01_DS0Sw56]: 1.3.6.1.4.1.9.10.19.1.1.4.0&1.3.6.1.4.1.9.10.19.1.1.10.0:5urf5h0p@travis-nas-01 MaxBytes1[travis-nas-01_DS0Sw56]: 200 MaxBytes2[travis-nas-01_DS0Sw56]: 200 Title[travis-nas-01_DS0Sw56]: DS0s and Sw56 in Use PageTop[travis-nas-01_DS0Sw56]: <H2>DS0s and Sw56 in Use</H2> <TABLE> <TR><TD>Device:</TD><TD>travis-nas-01</TD></TR> <TR><TD><a href="/mrtg/mrtg.html">HOME</a></TD></TR> </TABLE> Options[travis-nas-01_DS0Sw56]: gauge #---------------------------------------------------------------------------------------- ------ # purpose: cpmISDNCallsRejected and cpmModemCallsRejected #---------------------------------------------------------------------------------------- ------ Target[travis-nas-01_callrejects]: 1.3.6.1.4.1.9.10.19.1.2.1.0&1.3.6.1.4.1.9.10.19.1.2.2.0:5urf5h0p@travis-nas-01 MaxBytes1[travis-nas-01_callrejects]: 200 MaxBytes2[travis-nas-01_callrejects]: 200 Title[travis-nas-01_callrejects]: travis-nas-01 cpmISDNCallsRejected and cpmModemCallsRejected PageTop[travis-nas-01_callrejects]: <H2>cpmISDNCallsRejected and cpmModemCallsRejected</H2> <TABLE> <TR><TD>Device:</TD><TD>travis-nas-01</TD></TR> <TR><TD><a href="/mrtg/mrtg.html">HOME</a></TD></TR> </TABLE> #---------------------------------------------------------------------------------------- ------ # purpose: cpmISDNCallsClearedAbnormally and cpmModemCallsClearedAbnormally #---------------------------------------------------------------------------------------- ------ Target[travis-nas-01_clearAbnormal]: 1.3.6.1.4.1.9.10.19.1.2.3.0&1.3.6.1.4.1.9.10.19.1.2.4.0:5urf5h0p@travis-nas-01 MaxBytes1[travis-nas-01_clearAbnormal]: 200 MaxBytes2[travis-nas-01_clearAbnormal]: 200 Title[travis-nas-01_clearAbnormal]: travis-nas-01 cpmISDNCallsClearedAbnormally and cpmModemCallsClearedAbnormally PageTop[travis-nas-01_clearAbnormal]: <H2>cpmISDNCallsClearedAbnormally and cpmModemCallsClearedAbnormally</H2> <TABLE> <TR><TD>Device:</TD><TD>travis-nas-01</TD></TR> <TR><TD><a href="/mrtg/mrtg.html">HOME</a></TD></TR> </TABLE> #---------------------------------------------------------------------------------------- ------ # purpose: cpmISDNNoResource and cpmModemNoResource #---------------------------------------------------------------------------------------- ------ Target[travis-nas-01_callNoResource]: 1.3.6.1.4.1.9.10.19.1.2.5.0&1.3.6.1.4.1.9.10.19.1.2.6.0:5urf5h0p@travis-nas-01 MaxBytes1[travis-nas-01_callNoResource]: 200 MaxBytes2[travis-nas-01_callNoResource]: 200 Title[travis-nas-01_callNoResource]: travis-nas-01 cpmISDNNoResource and cpmModemNoResource PageTop[travis-nas-01_callNoResource]: <H2>cpmISDNNoResource and cpmModemNoResource</H2> <TABLE> <TR><TD>Device:</TD><TD>travis-nas-01</TD></TR> <TR><TD><a href="/mrtg/mrtg.html">HOME</a></TD></TR> </TABLE> #---------------------------------------------------------------------------------------- ------ # purpose: cmSystemModemsInUse and cmSystemModemsAvailable #---------------------------------------------------------------------------------------- ------ Target[travis-nas-01_modemcount]: 1.3.6.1.4.1.9.9.47.1.1.6.0&1.3.6.1.4.1.9.9.47.1.1.7.0:5urf5h0p@travis-nas-01 MaxBytes1[travis-nas-01_modemcount]: 200 MaxBytes2[travis-nas-01_modemcount]: 200 Title[travis-nas-01_modemcount]: cmSystemModemsInUse and cmSystemModemsAvailable PageTop[travis-nas-01_modemcount]: <H2>cmSystemModemsInUse and cmSystemModemsAvailable</H2> <TABLE> <TR><TD>Device:</TD><TD>travis-nas-01</TD></TR> <TR><TD><a href="/mrtg/mrtg.html">HOME</a></TD></TR> </TABLE> Options[travis-nas-01_modemcount]: gauge #---------------------------------------------------------------------------------------- ------ # purpose: cvpdnTunnelTotal and cvpdnDeniedUsersTotal #---------------------------------------------------------------------------------------- ------ Target[travis-nas-01_vpdn_tunnelanddenied]: 1.3.6.1.4.1.9.10.24.1.1.1.0&1.3.6.1.4.1.9.10.24.1.1.3.0:5urf5h0p@travis-nas-01 MaxBytes1[travis-nas-01_vpdn_tunnelanddenied]: 200 MaxBytes2[travis-nas-01_vpdn_tunnelanddenied]: 200 Title[travis-nas-01_vpdn_tunnelanddenied]: cvpdnTunnelTotal and cvpdnDeniedUsersTotal PageTop[travis-nas-01_vpdn_tunnelanddenied]: <H2>cvpdnTunnelTotal and cvpdnDeniedUsersTotal</H2> <TABLE> <TR><TD>Device:</TD><TD>travis-nas-01</TD></TR> <TR><TD><a href="/mrtg/mrtg.html">HOME</a></TD></TR> </TABLE> Options[travis-nas-01_vpdn_tunnelanddenied]: gauge #---------------------------------------------------------------------------------------- ------ # purpose: activeDS0s and cvpdnSessionTotal #---------------------------------------------------------------------------------------- ------ Target[travis-nas-01_activeDS0vpdnSession]: 1.3.6.1.4.1.9.10.19.1.1.4.0&1.3.6.1.4.1.9.10.24.1.1.2.0:5urf5h0p@travis-nas-01 MaxBytes1[travis-nas-01_activeDS0vpdnSession]: 200 MaxBytes2[travis-nas-01_activeDS0vpdnSession]: 200 Title[travis-nas-01_activeDS0vpdnSession]: activeDS0s and cvpdnSessionTotal PageTop[travis-nas-01_activeDS0vpdnSession]: <H2>activeDS0s and cvpdnSessionTotal</H2> <TABLE> <TR><TD>Device:</TD><TD>travis-nas-01</TD></TR> <TR><TD><a href="/mrtg/mrtg.html">HOME</a></TD></TR> </TABLE> Options[travis-nas-01_activeDS0vpdnSession]: gauge
Step 5 Open the crontab file in your system by entering crontab -e. The -e enables edit mode. You can run crontab from any directory.
igloo:/ ->crontab -e "/tmp/crontabmMaqZd" 14 lines, 610 characters #ident "@(#)root 1.19 98/07/06 SMI" /* SVr4.0 1.1.3.1 */ # # The root crontab should be used to perform accounting data collection. # # The rtc command is run to adjust the real time clock if and when # daylight savings time changes. # 10 3 * * 0,4 /etc/cron.d/logchecker 10 3 * * 0 /usr/lib/newsyslog 15 3 * * 0 /usr/lib/fs/nfs/nfsfind 1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1 30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
![]() |
Caution Although the crontab file is a flat text file, do not manually edit it by using vi crontab. vi can corrupt the crontab, which causes all cron jobs to stop working. You must use the crontab -e command, which synchronizes and updates all the crontab daemons accordingly. |
Step 6 Insert the directory path for the MRTG configuration file (.cfg) you created. At the bottom of the file, enter a line similar to this one:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /opt/mrtg/run/mrtg /opt/mrtg/run/conf/travis-nas-01.cfg
![]() |
Note Do not forget to include a space between /mrtg and /opt |
"/tmp/crontabmMaqZd" 14 lines, 610 characters #ident "@(#)root 1.19 98/07/06 SMI" /* SVr4.0 1.1.3.1 */ # # The root crontab should be used to perform accounting data collection. # # The rtc command is run to adjust the real time clock if and when # daylight savings time changes. # 10 3 * * 0,4 /etc/cron.d/logchecker 10 3 * * 0 /usr/lib/newsyslog 15 3 * * 0 /usr/lib/fs/nfs/nfsfind 1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1 30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /opt/downloads/mrtg/mrtg-2.8.8/run/mrtg /opt/downloads/mrtg/mrtg-2.8.8/run/travis-nas-01.cfg On a 5-minute time interval, MRTG will start up, read the configuration file, and re-generate performance graphs.
MRTG builds all the graphs and web pages.
To browse and view the graphs produced by MRTG, make sure the web server is running. For information on how to set up a web server, go to http://www.apache.org/
To send MRTG graphs to a web server, follow these steps:
igloo:/opt/downloads/mrtg/mrtg-2.8.8/run ->more travis-nas-01.cfg WorkDir: /export/home/www/mrtg/travis-nas-01/dial # set defaults Options[_]: growright # make legends reflect these are call counters YLegend[_]: Active Calls ShortLegend[_]: calls LegendI[_]: calls: LegendO[_]: calls: . . .
Step 2 To send the web pages and graphs to the web-server directory, enter the following command:
igloo:/opt/downloads/mrtg/mrtg-2.8.8/run ->./mrtg travis-nas-01.cfg igloo:/opt/downloads/mrtg/mrtg-2.8.8/run ->
Now, the crontab will automatically perform this function every five minutes.
Ignore any Rateup WARNING errors, which means that crontab is working in the background.
Rateup WARNING: .//rateup The backup log file for 172.21.101.20.178 was invalidl Rateup WARNING: .//rateup Can't remove 172.21.101.20.178.old updating log file Rateup WARNING: .//rateup Can't rename 172.21.101.20.178.log to 172.21.101.20.1e Rateup WARNING: .//rateup could not read the primary log file for 172.21.101.209
Step 3 Use a web browser to view the MRTG output files in the web page directory.
![]() |
Note If the domain name server (DNS) is not working, a hostname cannot be used by MRTG. Use the IP address instead. |
MRTG Graphs Viewed by Using a Web Browser
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Sun Oct 1 18:59:06 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.