cc/td/doc/cisintwk/intsolns
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Task 3—Using MRTG to Monitor and Graph Traffic Loads

Task 3—Using MRTG to Monitor and Graph Traffic Loads

About MRTG

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:


Figure 10:
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

About Selecting Dial OIDs

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:

  http://www.cisco.com/univercd/cc/td/doc/cisintwk/intsolns/dialnms/popmgt.txt
  http://www.cisco.com/univercd/cc/td/doc/cisintwk/intsolns/dialnms/modemmgt.txt


Table 14: Circuit Utilization OIDs
Variable
Base MIB and OID
Description

Analog calls

CISCO-POP-MGMT-MIB

1.3.6.1.4.1.9.10.19.1.1.2

The number of analog calls connected.

Active DS0s

CISCO-POP-MGMT-MIB

1.3.6.1.4.1.9.10.19.1.1.4

The total number of calls connected.

Call count

CISCO-POP-MGMT-MIB

1.3.6.1.4.1.9.10.19.1.1.1.1.7

The number of calls that have occupied a specific DS0.

Time in use

CISCO-POP-MGMT-MIB

1.3.6.1.4.1.9.10.19.1.1.1.1.8

The time for each DS0.

PPP calls

CISCO-POP-MGMT-MIB

1.3.6.1.4.1.9.10.19.1.1.5

The number of active PPP calls.

DS0 high water mark

CISCO-POP-MGMT-MIB

1.3.6.1.4.1.9.10.19.1.1.8

The maximum number of DS0s ever used simultaneously.


Table 15: Modem Information OIDs
Variable
Base MIB and OID
Description

Modems available

CISCO-MODEM-MGMT-MIB

1.3.6.1.4.1.9.9.47.1.1.7

The number of modems currently available to take calls.

Average call duration

CISCO-MODEM-MGMT-MIB

1.3.6.1.4.1.9.9.47.1.3.1.1.9

The average call duration for each modem in the NAS.

No answers

CISCO-MODEM-MGMT-MIB

1.3.6.1.4.1.9.9.47.1.3.3.1.1

The number of calls not answered by a modem.

Failed Train

CISCO-MODEM-MGMT-MIB

1.3.6.1.4.1.9.9.47.1.3.3.1.2

The number of modem calls that failed to train up.

It's normal behavior for most modems to not have a 100 percent success rate.

Successful train

CISCO-MODEM-MGMT-MIB

1.3.6.1.4.1.9.9.47.1.3.3.1.3

The number of modem calls that successfully trained up.

It's normal for most modems to not have a 100 percent success rate.

TX speed

CISCO-MODEM-MGMT-MIB

1.3.6.1.4.1.9.9.47.1.3.1.1.14

The current transmit speed (TX) of all the modems in the NAS.

If a modem does not have an active call, zero is returned.

RX speed

CISCO-MODEM-MGMT-MIB

1.3.6.1.4.1.9.9.47.1.3.1.1.15

The current receive speed (RX) of all the modems in the NAS.

If a modem does not have an active call, zero is returned.


Table 16: User Information OIDs
Variable
Base MIB and OID
Description

Active user ID

CISCO-MODEM-MGMT-MIB

.1.3.6.1.4.1.9.10.19.1.3.1.1.3

List of users currently connected and authenticated.

Active call duration

CISCO-MODEM-MGMT-MIB

.1.3.6.1.4.1.9.10.19.1.3.1.1.8

Call durations for currently connected and authenticated users.

User CLID

CISCO-MODEM-MGMT-MIB

.1.3.6.1.4.1.9.10.19.1.3.1.1.2

List of user Caller IDs (CLID).

DNIS phone number

CISCO-MODEM-MGMT-MIB

.1.3.6.1.4.1.9.10.19.1.3.1.1.13

List of called Dialed Number Information Service (DNIS) phone numbers.

Active TTY

CISCO-MODEM-MGMT-MIB

.1.3.6.1.4.1.9.10.19.1.3.1.1.14

List of asynchronous terminal lines (TTY) in use.

Active modem slot

CISCO-MODEM-MGMT-MIB

.1.3.6.1.4.1.9.10.19.1.3.1.1.6

List of which user is using which modem slot.

Active modem port

CISCO-MODEM-MGMT-MIB

.1.3.6.1.4.1.9.10.19.1.3.1.1.7

List of which user is using which modem port.

Active user IP

CISCO-MODEM-MGMT-MIB

.1.3.6.1.4.1.9.10.19.1.3.1.1.4

List of which IP addresses are currently in use.

How to Inspect and Interpret Data

Internet users spend approximately 80 percent of their time reading information—not 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.


Figure 11:
Daily Graph: DS0s and PPP Sessions in Use

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.


Figure 12:
Weekly Graph: DS0s and PPP Sessions in Use


Figure 13:
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.


Figure 14:
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.

Creating and Editing a 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.


Table 17: Dial Interface Types on a Cisco AS5800
Interface Type
Syntax Example

Asynchronous

Async1/2/00

B-channel serial

Serial1/0/0:1

D-channel serial

Serial1/0/0:23

Group asynchronous

Group-Async0

T1/E1 controllers

T1 1/0/0

To enable MRTG to locate a device and poll it for network statistics, follow these steps:


Step 1   Collect the hostnames, IP address, and read only (RO) SNMP community strings for the devices to be monitored.

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:

  or
  Generic command syntax:
    ./cfgmaker communitystring@hostname-or-ipaddress >> outputfilename.cfg
    
  Example:
    ./cfgmaker 5urf5h0p@travis-nas-01 >> travis-nas-01.cfg
     
    
  In the previous example:
5urf5h0p is the SNMP community string.
travis-nas-01 is the hostname of the managed device.
travis-nas-01.cfg is the configuration file that MRTG reads each time it starts up.

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.

Sending MRTG Graphs to a Web Server

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:

Step 1   Verify that the configuration file points to the correct working directory (WorkDir:) on your web server by entering the more command. See WorkDir: in the following example.

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[_]: &nbsp;calls:
LegendO[_]: &nbsp;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.


Figure 15:
MRTG Graphs Viewed by Using a Web Browser


hometocprevnextglossaryfeedbacksearchhelp
Posted: Sun Oct 1 18:59:06 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.