Simple Network Management Protocol, With A Dash Of MRTG

Presented by Bernie Hoefer

to the Central INdiana Linux User Group (CINLUG)

Wednesday, July 06, 2005

Why I am Here Before You Tonight

I am self-taught; had little mentoring.

My history in system administration.

Started administering 3 machines.

Soon was responsible for a very small network of roughly 6 test machines. (Only 1 important.)

Worked on project where I administered 3 critical servers and assisted in the administration of 4 small networks with several very important machines.

Now partly responsible for a medium-sized network, roughly 24 servers are important, half of which are critical.

Why I am Here Before You Tonight

SNMP is not really worth it for a very small network.

It is not a panacea.

Doesn't take much to initially setup, but has little worth without additional scripts or a Network Management System (NMS).

I'd like to give a future talk on NMS.

Multi Router Traffic Grapher (MRTG) is the most immediate way of getting some visible, impressive value out of SNMP.

Trend analysis software -- not a NMS!

Primary Resource For This Talk

O'Reilly's Essential SNMP

by Douglas R. Mauro and Kevin J. Schmidt.

First edition, published July 2001.

A little long in the tooth, but has the information one needs.

Good information on Net-SNMP, but command syntax is out of date.

SNMP: Three Versions

Version 1 – RFC 1157, May 1990.

Version 2 – RFC 1906, January 1996 – is just an extension of version 1.

Version 1 & 2 are in clear text! Ack!

“For all practical purposes, security is the only issue SNMPv3 addresses; there are no other changes to the protocol.” -- Essential SNMP, Appendix F.

Essential SNMP lists over 150 RFCs... Very thought out!

SNMP: The Basics

Uses UDP (User Datagram Protocol)

Uses UDP instead of TCP (Transmission Control Protocol) because it is connectionless. It has low overhead.

Unreliable, but that's OK.

There is SNMP over TCP, but “but this is more for special-case situations”

Uses ports 161 (for polling) and 162 (for traps).

SNMP: The Basics

Agents

Software on a device that `represents` that device to managers.

Polls other programs on this device.

Answers queries.

Sets the values told to it by a manger.

Alerts the manager when something has happened.

Managers

Polls the agents.

Allows administrator to easily set values.

Receives traps.

Represent this data to the administrator in one form or another.

SNMP: How Does The Agent Do Its Job?

“The Management Information Base (MIB) can be thought of as a database of managed objects that the agent tracks.”

There are MIBs for everything!

MIBs fit into a extensible hierarchy.

The MIB structures its information like so:

Name, called the Object Identifier (OID).

Type and syntax. (integer, octet string, counter, sequences, etc.)

Basic encoding rules. (An ISO standard on how to encode information for transmission.)

mib-2 OBJECT IDENTIFIER ::= { mgmt 1 }

-- groups in MIB-II

system OBJECT IDENTIFIER ::= { mib-2 1 }

interfaces OBJECT IDENTIFIER ::= { mib-2 2 }

at OBJECT IDENTIFIER ::= { mib-2 3 }

ip OBJECT IDENTIFIER ::= { mib-2 4 }

icmp OBJECT IDENTIFIER ::= { mib-2 5 }

tcp OBJECT IDENTIFIER ::= { mib-2 6 }

udp OBJECT IDENTIFIER ::= { mib-2 7 }

egp OBJECT IDENTIFIER ::= { mib-2 8 }

transmission OBJECT IDENTIFIER ::= { mib-2 10 }

snmp OBJECT IDENTIFIER ::= { mib-2 11 }

-- An example of an object in the interfaces group.

ifTable OBJECT-TYPE

SYNTAX SEQUENCE OF IfEntry

ACCESS not-accessible

STATUS mandatory

DESCRIPTION

"A list of interface entries. The number of entries is

given by the value of ifNumber."

::= { interfaces 2 }

SNMP: How Does The Agent Do Its Job?

Object ID (OID)

“This memo provides the common definitions for the structure and identification of management information for TCP/IP-based internets. In particular, together with its companion memos which describe the management information base along with the network management protocol, these documents provide a simple, workable architecture and system for managing TCP/IP-based internets and in particular, the Internet.” -- RFC 1155.

OIDs have both a numeric and named representation. Kind of like IP addresses.

.iso.org.dod.internet.mgmt

.1.3.6.1.2

SNMP: How Does The Agent Do Its Job?

.iso.org.dod.internet.mgmt.mib-2 (.1.3.6.1.2.1)

MIB-II, which is a standard (RFC 1213-MIB) has grouped many common objects found on a host that need managed.

SNMP: How Does The Agent Do Its Job?

http://www.iana.org/assignments/enterprise-numbers

SNMP: Last Of The Basics

Communities

read-only

read-write

trap

Advanced Communities

Can partition large networks.

Can add access controls on OIDs.

Community names are the “security” in SNMP v1 & v2.

Installation

SuSE:

Use yast or download the package and use rpm.

One wants the net-snmp package.

Debian:

apt-get update; apt-get install snmp snmpd

Fedora Core / CentOS / (sort of RHEL):

yum update; yum install net-snmp net-snmp-utils

Demo Of Net-SNMP Commands

snmpconf

(Daemon, not command:) snmpd

(Daemon, not command:) snmptrapd

no rc script!

Can log to via the syslog, or to a file, including STERR and STOUT.

Customizable log format.

snmpcmd

snmpstatus -v2c -c public localhost

Demo Of Net-SNMP Commands

snmptranslate

snmptranslate -Of .1.3.6.1.4.1.2021.2.1.3.1

snmptranslate -On .iso.org.dod.internet.mgmt.mib-2.system.sysLocation

snmptranslate -Tp .iso.org.dod.internet.mgmt.mib-2.host.hrSWInstalled

snmpget

snmpget -v2c -c public localhost sysDescr.0

snmpset

Demo Of Net-SNMP Commands

snmpwalk

snmpwalk -v2c -c public localhost .iso.org.dod.internet.mgmt

Chance to use snmptranslate!

snmptranslate -On IPV6-MIB::ipv6IfOperStatus.2

snmptranslate -Tl .1.3.6.1.2.1.55

snmpnetstat -n -c public localhost

snmptrap -v2c -c public localhost '' .iso.org.dod.internet.private.enterprises.ucdavis.prTable.prEntry prMin i 2

Where MRTG Fits In

Management software falls into five categories:

SNMP agents

NMS suites

OpenView NNM

OpenView ITO

Castle Rock

OpenNMS

Nagios

Element managers (vendor-specific management)

Trend-analysis software

This is what MRTG is!

http://www.mrtg.org/

Another Open Source product called Cricket.

http://cricket.sourceforge.net/

Supporting software

Shell programming

Perl

C

MRTG Installation

SuSE:

Use yast or download the package and use rpm.

One wants the mrtg package.

Debian:

apt-get update; apt-get install mrtg libsnmp-session-perl

Fedora Core / CentOS / (sort of RHEL):

yum update; yum install mrtg

MRTG Configuration

MRTG Documentation pack is available at:

http://people.ee.ethz.ch/~oetiker/webtools/mrtg/#START

Two very simple tools to get you up and running:

cfgmaker

indexmaker

Can then create an rc script for mrtg, or put it in a cronjob.

Does not need to run as root!

By default, it performs 5 minute averages.

Crontab entry: */5 * * * * /usr/bin/mrtg /etc/mrtg.cfg

MRTG Demo

Show how easy it is to setup.

Show some graphs from a gateway machine and Cisco switch.

References & Bernie Hoefer's Contact Info

Essential SNMP

http://www.oreilly.com/catalog/esnmp/

Net-SNMP

Tutorials & documentation on website:

http://www.net-snmp.org/

man pages

MRTG

http://www.mrtg.org/

LUG-Visitor@TheMoreIKnow.info

http://www.TheMoreIKnow.info/

E-mail address has been munged to thwart spammers.

Replace “Visitor” with “Member” to un-munge it.

I. Why I Am Here Before You Tonight

A. I am self-taught; I had little mentoring

i. Thus, I had not even heard of SNMP until late in my career.

B. My history in system administration.

i. Started my career administering a mere three Sun Solaris workstations.

a) Not even servers – just workstations.

b) There were no networking concerns.

ii. Then I moved up to administering a very small network of roughly six test machines.

a) Only one was of any importance: the DNS (Domain Name Service) and remote access server.

b) Still very manageable through manual labor.

iii. In 2000, I was put on a project where I administered three critical servers and assisted in the administration of four small networks with several very important servers.

a) I managed those servers with simple scripts, but it was still a pretty manual process of checking on them to see how they were doing.

b) If I had to have administered the four networks, it could not have been done manually. The four networks used SNMP, but I never got the chance to learn it since I was not responsible for that part.

That's not to say that I ignored everything that was not my responsibility. Indeed, I gained more responsibility to the point where I was primarily responsible for the Cisco networking equipment. This is where I really learned the bulk of my (meager) networking knowledge.

Surprisingly, even as I was learning on the Cisco equipment, I still didn't get my feet wet in SNMP, even though it was installed on them. I was just never shown it.

iv. Now, I'm responsible for a medium-sized network.

a) Roughly one-third of the machines are important, and one-tenth are critical enough to need some kind of monitoring on a 24 hour/day, 7 days a week basis.

b) Now that I knew SNMP existed, and how it could help me manage a number of important devices, I decided to start learning about it.

c) That's why I volunteered to do this talk – to share what I've learned in the past month since starting to study SNMP.

d) Obviously, this is an introductory talk, as I am no where near being an expert in it.

C. SNMP was a valuable tool that I missed out on for a good number of years.

i. I have found that, as it was for me, SNMP flies under the radar of most other administrators I've talked to.

ii. In my study of SNMP, I found that it is not really meant for use with one or two machines or for a very small network.

a) Obviously, it would not have been of help early on in my employment, but I could have used it even with those three critical servers for monitoring their status.

iii. SNMP is not a panacea. It it not some wonder application that will make all your networking/administration troubles go away.

iv. It doesn't take much to initially setup, but has little worth without additional scripts or a network management system (NMS). Maybe I'll give a future talk on NMS.

v. MRTG is the most immediate way of getting some visible, impressive value out of SNMP.

D. For the most part, my talk will follow O'Reilly's Essential SNMP, by Douglas R. Mauro and Kevin J. Schmidt.

i. ISBN: 0-596-00020-0

ii. First edition, published July 2001.

a) A little long in the tooth, but has the information one needs.

b) It does talk about Net-SNMP, the open source SNMP package that comes with all the popular distributions. However, the syntax of the commands they give are out of date.

c) Its an OK book if you want to know how to complete a particular task. It is better for showing the broad possibilities and leaving the rest to you.

d) Good comparison of NMS, even if it is old.

e) Good Cisco commands!

II. SNMP: Three Versions

A. Version 1 was very simple.

i. CERT® Advisory CA-2002-03 Multiple Vulnerabilities in Many Implementations of the Simple Network Management Protocol (SNMP)

a) Original release date: February 12, 2002

b) Last revised: May 24, 2005

c) The Oulu University Secure Programming Group reported numerous vulnerabilities in SNMPv1 request and trap handling implementations from many different vendors.

d) http://www.cert.org/advisories/CA-2002-03.html

B. Version 2 is just an extension of version 1. It just extended the data types, provided some more data that one could query and slightly changed the idea behind traps.

C. Version 1 & 2 are in clear text. Network snoopers can read your community names! “For all practical purposes, security is the only issue SNMPv3 addresses; there are no other changes to the protocol.”

i. “Although Version 3 is an important step forward, you can almost certainly ignore this; very few vendors support v3. Version 3 is discussed in Appendix F, `SNMPv3`.” -- Section 7.3.4.1 of Essential SNMP.

ii. Windows XP Embedded with Service Pack 2 (February 10, 2005)

a) http://msdn.microsoft.com/chats/transcripts/mobileembedded/xpesp2_050210.aspx

b) JKremer_MSFT (Expert):

c) Q: When will SNMP v3 be available for XPe? Will it be installable like a hot fix or security update? Or, will it be only for development systems?

d) A: I'm not sure what implementation of SNMP technology you're referring to. What's the scenario you're looking to enable?

iii. Microsoft Operations Manager Executive Chat (March 9, 2005)

a) http://www.microsoft.com/technet/community/chats/trans/mom/mom_05_0309.mspx

b) BaelsonD_MS (Expert):

c) Q: will the platform adopt SNMPv3 or will we need to continue suplementing SNMPv2 with alternative security methods?

A: Sorry, answered the wrong question there. You will need to supplement SNMPv2 for now. We have had little request to support SNMPv3, but this is your chance to really make your voice heard!!!

D. There are numerous Internet Engineering Task Force Request For Comments (RFC) documents that deal with SNMP: Essential SNMP lists over 150 RFCs in one appendix that define SNMP versions, agent extensions and management information base modules. The protocol is very thought out!

III.SNMP: The Basics

A. Uses UDP

i. UDP is a connectionless protocol, which means there is no guarantee that the UDP packets are delivered to their destination.

ii. At first, this doesn't seem good for something intended to manage networks. But, it really is.

a) Also, the use of UDP instead of TCP allows the data to be transferred faster since there isn't the overhead of the protocol exchange.

b) If TCP was used, and things started going down, the network would be saturated with re-tries.

c) Essential SNMP mentions that there is SNMP over TCP, “but this is more for special-case situations...” – Essential SNMP, section 2.1.

B. Uses ports 161 and 162.

i. Port 161 is for polling the agents.

ii. Port 162 is for sending traps.

C. Agents

i. An agent is software on a device that `represents` that device to the network.

ii. It answers queries about that device. (This is called “polling”. It “gets” the data.)

iii. It can poll other programs on that device.

iv. It sets the values told to it by a network manger. (“Setting” values.)

v. It alerts the manager when something has happened. (Sending a “trap”, or, as they are called in version 2 of SNMP, “notifications”.)

D. Managers

i. Polls the agents.

ii. Allows the administrator to remotely set values on the devices.

iii. Receives traps.

iv. Represent this data to the administrator in one form or another.

IV. SNMP: How Does The Agent Do Its Job?

A. “The Management Information Base (MIB) can be thought of as a database of managed objects that the agent tracks.” – Essential SNMP, section 1.4.

i. There are MIBs for everything. The Net-SNMP package comes with some `standard` MIBs for managing hosts like GNU/Linux boxes. Databases, RAID arrays and other specialized-programs or networkable devices will come with their own MIBs.

ii. MIBs fit into a extensible hierarchy. One of the benefits of this is that a private area has been made for companies. They can make their own MIBs specific to their hardware.

a) For example, the standard MIB for network interfaces just give basic network information. A wireless network device would have additional information associated with it that the standard doesn't cover.

iii. The MIB structures its information like so:

a) Name, called the Object Identifier (OID).

b) Type and syntax. (integer, octet string, counter, sequences, etc.)

This is kind of like defining a variable when writing a C program. One defines those variables to be of type integer, character, etc.

Basic encoding rules. (An ISO standard on how to encode information for transmission.)

B. Object Identifiers (OIDs)

i. “This memo provides the common definitions for the structure and identification of management information for TCP/IP-based internets. In particular, together with its companion memos which describe the management information base along with the network management protocol, these documents provide a simple, workable architecture and system for managing TCP/IP-based internets and in particular, the Internet.” – RFC 1155.

ii. This tree diagram is the hierarchy I mentioned above.

a) ccitt: the nodes under the ccitt branch are administered by the International Telegraph and Telephone Consultative Committee.

b) iso: the nodes under the iso branch are administered by the International Organization for Standardization and the International Electrotechnical Committee (ISO/IEC).

c) joint-iso-ccitt: the nodes under the joint-iso-ccitt branch are jointly administered by the International Telegraph and Telephone Consultative Committee, the International Organization for Standardization, and the International Electrotechnical Committee.

iii. OIDs have both a numeric and named representation. Kind of like IP addresses and domain names.

a) Just as 66.35.250.150 resolves to slashdot.org, .1.3.6.1.2 resolves to .iso.org.dod.internet.mgmt

C. mib-2

i. .iso.org.dod.internet.mgmt.mib-2 is .1.3.6.1.2.1

a) MIB-II, which is a standard (RFC 1213-MIB), has grouped many common objects found on a host that need managed.

b) “mgmt” is equivalent to .1.3.6.1.2. Therefore, mib-2 is equivalent to 1.3.6.1.2.1. Likewise, the interfaces group under mib-2 is defined as { mib-2 2 }, or 1.3.6.1.2.1.2.

c) Basic system information like uptime and hostname are under the mib-2.system branch.

d) rmon -- Remote Monitor is an aspect of SNMP that I still need to learn.

D. private

i. .iso.org.dod.internet.private.enterprises is .1.3.6.1.4.1

ii. Vendors can get a free OID under the enterprises branch by asking IANA.

a) UC Davis and Net-SNMP OIDs come with the Net-SNMP packages.

b) Cisco is enterprises.9.

c) EMC Clarion is enterprises.1981.

d) Each vendor has complete control over their branch. They can extend it as much as they want. Cisco, for example, can have a sub-branch for each product. (This is made-up:)

1. enterprises.9.2126 (for Cisco 2126 routers)

2. enterprises.9.6515 (for Cisco 6515 Catalyst switches)

3. etc.

iii. Show the snmpV2 tree.

a) .iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects

b) .1.3.6.1.6.3.1.1

V. SNMP: Last Of The Basics

A. Communities

i. Each SNMP command executed carries with it an identifier stating which “community” it belongs to. An agent running on a system can be a “member” of different “communities” and assign different access controls based on that “membership”.

a) read-only

b) read-write

c) trap

B. Advanced Communities

i. System administrators can use communities to partition large networks by geographical location, device type or any other criteria one might want. (Think of a large enterprise where different groups mangage the networking infrastructure [routes and switches] than servers.)

ii. Access controls can be as complex as needed – access is not an all-or-nothing setting. Communities can be assigned access based on OID level. For example,

a) The community named “watcher” could be given read-only access to everything.

b) The community group named “NetworkGroup” could be given read-write & trap access to the IF-MIB::interface and CISCO-SMI::local OIDs, but no priviledges to anything else.

c) The community group named “ServerAdmins” could be given read-write & trap access to all OIDs except CISCO-SMI::local.

C. Security aspects of communities.

i. Community names are essentially passwords.

ii. Create & treat them like passwords: do not use common words. Do not use “public” or “private”!!! Those are examples used in most SNMP instruction manuals.

iii. Unfortunately, communities names go over the network in the clear in SNMP versions 1 & 2. So, one may want different communities for each subnet, or for subnets that are more likely to be sniffed

iv. Some organizations go so far as to have a separate, “admin” network. This network connects all the hosts (or at least the important ones) that the normal network connects, but has no users on it. Admins use it for the unencrypted SNMP traffic and other admin tasks like backing machines up over the network or for getting access to a machine when the primary interface has gone down. Obviously, building this second, “admin” network and maintaining it would likely be very costly.

D. Installation.

i. Net-SNMP come pre-packaged for all the major distributions for which I checked. Installation only requires the distirbution's install CD or a network connection. Installation size is ~4.1 MB.

a) SuSE: yast or rpm

1. The package's name is “net-snmp”. This package includes the agent & trap daemons along with SNMP utilities.

2. It is part of the “default” installation, but not active. One must use chkconfig to choose which run level(s) under which it should automatically start.

b) Debian:

1. Debian breaks up the daemons and the utilities.

2. agenapt-get update; apt-get install snmp snmpd

c) Fedora Core / CentOS:

1. These Red Hat-esque distirbutions also break up the dameons and the utilities.

2. yum update; yum install net-snmp net-snmp-utils

VI. SNMP commands

A. snmpconf

i. If one is going to run an agent and knows little about SNMP, this is a good command to start with. It walks a new administrator setting up:

a) the agent configutation file, snmpd.conf

b) the configuration file for the daemon that receives traps, snmptrapd.conf

c) a “common options” file for SNMP commands, snmp.conf.

ii. When setting up the snmpd.conf file, it will allow one to set

a) access controls (communities names and OID access)

b) what to monitor on the system,

c) where to send traps.

B. snmpd

i. This is a daemon, not a command.

ii. This is the agent software that should be configured to start up automatically to answer queries and send traps to your network mangement system for this host.

C. snmptrapd

i. This is a daemon, not a command.

ii. This is the software that listens for traps sent by agents.

iii. In the distributions I tried, their packages did not include an rc script. Thus, it requires a little extra work to use this.

iv. Can log via the syslog, or to a file, including STERR and STOUT.

v. One can customize the log format, if that will help you integrate it with one's other management systems.

D. snmpcmd

i. So many of the SNMP commands have similar options, the Net-SNMP project has put their description under a single man page. “man snmpcmd” will get you that description.

E. snmpstatus -v2c -c public localhost

i. Outputs whether agent is up and reports some standard information about it.

F. snmptranslate

i. Extremely valuable command that translates the numerical OIDs into names, or vice-versa.

ii. snmptranslate -Of .1.3.6.1.4.1.2021.2.1.3.1

iii. snmptranslate -On .iso.org.dod.internet.mgmt.mib-2.system.sysLocation

iv. snmptranslate -Tp .iso.org.dod.internet.mgmt.mib-2.host.hrSWInstalled

G. snmpget -v2c -c public localhost sysDescr.0

i. Queries an agent for the specified information.

H. snmpset

i. For writable OIDs, will set their values.

I. snmpwalk

i. Another valueable command that `walks` the OID tree to the end of its branches.

ii. snmpwalk -v2c -c public localhost .iso.org.dod.internet.mgmt

iii. When using snmpwalk, I often had to use snmptranslate to convert the OID outputs from numeric to text, from the “MIB::end OID value” format to the full format, or vice-versa.

a) snmptranslate -On IPV6-MIB::ipv6IfOperStatus.2

b) snmptranslate -Tl .1.3.6.1.2.1.55

J. snmpnetstat -n -c public localhost

i. Cool way of seeing what network sockets are in use on a host.

K. snmptrap -v2c -c public localhost '' .iso.org.dod.internet.private.enterprises.ucdavis.prTable.prEntry prMin i 2

i. This is how one can send a trap via the command line for testing purposes or for inclusion in a shell script.

L. traptoemail

i. I couldn't get it to work and it had no man page for me to learn how to use it.

VII. MRTG

A. MRTG is not a network management system (NMS).

B. SNMP software falls into five categories:

i. SNMP agents

ii. NMS suites

a) OpenView NNM for mid-to-large business.

b) OpenView ITO for the enterprise

c) Castle Rock costs around $1,300.

d) OpenNMS -- see https://wiki.opennms.org/tiki-view_faq.php?faqId=5#q51

e) Nagios

1. As far as Nagios is concerned, the main difference between it and OpenNMS is that OpenNMS was developed from the beginning to be an enterprise-grade solution capable of monitoring an eventual unlimited number of devices (via a distributed and tiered system).

2. This is even alluded to with respect to SNMP datacollection in the Nagios documentation: “Note: Nagios is not designed to be a replacement for a full-blown SNMP management application like HP OpenView or OpenNMS.”

iii. Element managers (vendor-specific management)

a) “These software packages are geared toward a certain type of vendor or function; for example, an element manager might be a product that focuses on managing a modem rack.” -- Section 5.3 of Essential SNMP.

b) CiscoWorks 2000 allows version control of OS and interactive pictures of the back of the equipment.

iv. Trend-analysis software

a) This is where MRTG falls!

1. http://www.mrtg.org/

2. Started as, and really still is, just a network traffic graphing software. Can use it to graph other values. (CPU usage, available disk space, etc.)

3. Supports UNIX & Windows.

4. Has very good documentation for the initial, standard, setup, but there is little on making it do extra stuff like graphing the CPU usage, and no suggestions to get the user on the right track of the best ways to configure it for different setups. Additionally, documentation on the Perl scripts that actually control the graphing is hard to come by.

5. Have seen on the web that it supports SNMPv3, but have not yet figured out how to do it.

b) Another Open Source product called Cricket.

1. “Some users are successfully using Cricket under Windows NT and/or Windows 2000, but at this time, no one has documented this.” But on its SourceForge site, it says Windows is supported.

2. “Great tool that picks up where MRTG leaves off. It uses RRDTool, the next-generation version of MRTG.” -- Section 5.4 of Essential SNMP.

v. Supporting software

a) Bash shells

b) Perl

c) C

C. Installation.

i. MRTG comes pre-packaged for all the major distributions for which I checked. Installation only requires the distirbution's install CD or a network connection.

ii. The MRTG package depends upon the Perl package.

iii. It is not a big package: only about 2MB in size.

a) SuSE: yast or rpm

1. The package's name is “mrtg”.

b) Debian:

1. apt-get update; apt-get install mrtg libsnmp-session-perl

iv. Fedora Core / CentOS:

a) yum update; yum install mrtg

D. Configuration

i. cfgmaker --community=public --global "Options[_]: growright,bits" --ifref=eth --ifdesc=ip gateway.example.com --ifref=descr --ifdesc=descr cisco-sw.example.com --output /etc/mrtg.cfg

a) One can have multiple configuration files, thus allowing one to create a website of MRTG graphs, each with its own page.

ii. indexmaker --output=/var/www/mrtg/index.html /etc/mrtg.cfg

iii. Add this line to a crontab:

a) **/5 * * * * /usr/bin/mrtg /etc/mrtg.cfgg

b) One should also run that command from the command line three times before cron does it. It will collect data, perform a calculation of averages and generates the graphs. Since this if the first time it is run, there will be no prior data for it to average. That is why it will give errors the first two times it is run.

VIII. References & Bernie Hoefer's Contact Info

A. Essential SNMP

i. http://www.oreilly.com/catalog/esnmp/

B. Net-SNMP

i. Tutorials & documentation on website:

a) http://www.net-snmp.org/

b) man pages

C. MRTG

i. http://www.mrtg.org/

D. LUG-Visitor@TheMoreIKnow.info (E-mail address has been munged to thwart spammers. Replace “Visitor” with “Member” to un-munge it.

E. http://www.TheMoreIKnow.info/

2005-07-06T09:45:35