Section 12.5. Pitfalls


12.5. Pitfalls

Many SNMP-capable devices change the order of interfaces in the interfaces table whenever a new interface card is inserted or an old one is removed. If you run a fairly static router environment (i.e., you hardly ever add or remove cards from your routers), the configuration examples we've shown should work well for you. But in today's fast-paced network environments, stability is rare. MRTG's cfgmaker command provides a command-line option, ifref, to help with this problem. It doesn't solve the problem, but it does allow you to generate graphs in which interfaces are labeled with their addresses, descriptions, or names; with this information, you don't have to remember whether interface 1 is your local network interface or your T1 connection. Table 12-2 summarizes the usage of ifref.

Table 12-2. Summary of --ifref options

Option

Description

ifref=ip

Identify each interface by its IP address.

ifref=eth

Use the Ethernet address to identify the interface.

ifref=descr

Use the interface description to identify the interface.

ifref=name

Use the interface name to identify the interface.


Thus, to label interfaces with their IP addresses, run cfgmaker like so:

     [root][linuxserver] ~/mrtg-2.10.15> cfgmaker --global 'WorkDir: /mrtg/images' \          --output /mrtg/run/mrtg.cfg --ifref=ip public@router 

Be sure to read the cfgmaker manual that comes with the MRTG documentation.




Essential SNMP
Essential SNMP, Second Edition
ISBN: 0596008406
EAN: 2147483647
Year: 2003
Pages: 165

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net