Mrtg for windows traffic monitoring settings MRTG Configuration

Source: Internet
Author: User
Tags mrtg

All information of a device that needs to be managed is considered as a collection of various managed objects. These managed objects are defined by OSI in a managed Information Base (MIB) in the virtual information library, the following is the Mrtg configuration for MRTG windows traffic monitoring settings.

Mrtg for windows traffic monitoring settings MRTG Configuration
The procedure of Mrtg for windows traffic monitoring MRTG is as follows: first, execute mongomaker to send the SNMP packet, detect the supported OID number on the Router, and create a configuration file. You can use the following command to complete this task:
C: \ mrtg \ run> perl compiler maker public@163.21.236.254> mrtg. cfg

The preceding command is used to create the configuration of the Router 163.21.236.254. The public command is used to set the configuration as the SNMP community string. The established configuration is placed in mrtg. in the cfg configuration file (remember that the community string was set before the Router was changed? If you do not set public, do not do it here ).

This step can be easily completed on a Linux platform. However, on the Windows platform, you may encounter a program that has been running for too long (like a program), or make a completely blank configuration file. You can use Netxray to check the packets to find out the cause, we can find that when 163.21.236.71 (SNMP Agent) obtains the OID number from 163.21.236.254 (SNMP Server), a route interface IP address is 163.21.158.254, and Windows reverse checks the IP address, query the DNS Server 163.21.236.4 (the line reversed in the figure). After the reverse query is successful, the SNMP Agent continues to ask the SNMP Server. The result shows that the IP address of the second routing interface is 163.21.234.254, similarly, this IP address cannot be found, so Windows continues to "broadcast to someone" with NetBios Name, but it does not ....... the last configuration cannot be completed.

Since the IP address is not checked during ghost maker execution on Linux, everything went smoothly. Not so lucky on Windows. What is the solution? In fact, it is very simple, as long as you set a DNS record for every IP address on the Router.
If your Linux machine has installed Perl, you can also copy the Movie Maker to Linux, use Linux for configuration files, and then copy the configuration files back to Windows. Otherwise, the third method is to manually create a configuration file. The MRTG kit provided by the municipal network center contains the mrtg. cfg sample configuration file that has been modified by me. Let's take this file as an example to understand the significance of the configuration file parameters. The following is the file content (as mentioned earlier, use WordPad for editing. Do not press Enter ):

WorkDir: e: \ Inetpub \ wwwroot \ mrg
The above line sets the placement of the MRTG traffic Statistical Chart, of course, to be placed in the directory where the web page is located
# Description: Cisco Internetwork Operating System Software IOS (tm) C2600 Software (C2600-IS56I-M), Version 12.0 (2a), release software (fc1) Copyright (c) 1986-1999 by cisco Systems, inc. compiled Fri 01-Jan-99 16: 32 by phanguye
# Contact:
# System Name: Router
# Location:

The above is the SNMP Server Message on the Router, which is actually an annotation line. If you find it annoying, you can remove it directly.
Target [g_point]: 1: public@163.21.204.254

This is the definition data source. As mentioned earlier, there are two types of data sources: if the data source is defined by OID: Community string, the SNMP Server provides sources. If the data source needs to be provided by plug-ins, it is defined
Target [launch users]: 'perl myfinger. pl'

Note: In the arc, the file name of the webpage is defined. Here, the statistics page of g_point.html is made.
MaxBytes [g_point]: 1250000 54ne.com

This is the maximum defined traffic used to calculate the current traffic percentage. If you set only one stroke, the inbound and outbound bandwidths are the same.
Title [g_point]: total traffic statistics of this school
Options [g_point]: growright, bits

Mrtg for windows traffic monitoring settings MRTG configuration definition Statistical Chart direction (from left to right) and statistical unit (calculated in bits, rather than bytes) PageTop [g_point]: <H1> total traffic statistics of this school (Ethernet0/0) </H1>
Content of the first line when the page is displayed
Target [a_point]: 6: public@163.21.204.254

The OID number here is 6, which is not a complete OID. The complete OID should be 1.3.6.1.2.1.2.1.6, the definition in MIB is IF-MIB! IfDescr, that is, specify the interface number on the Router. Note that this number is floating. This number changes every time an Enable or Disable interface is enabled. Therefore, after MRTG is executed, mrtg is generated. OK file. This file records the interface corresponding to the current number. When an error occurs, you must check the file and manually modify the correct value of the interface number.
MaxBytes1 [a_point]: 187500
MaxBytes2 [a_point]: 48000

The above is also defining the maximum traffic to facilitate percentage calculation. The two rows are written separately because the inbound and outbound bandwidths are different. MaxBytes1 is the inbound limit, while MaxBytes2 is the outbound limit.
Title [a_point]: traffic statistics of the school on the Municipal Network Center
Options [a_point]: growright, bits
PageTop [a_point]: <H1> our school's traffic statistics on the Municipal Network Center (Ethernet0/1) </H1>
For more detailed information about configuration settings, you can find them in doc/config.html of MRTG. Many fine-tuning options are not available in Windows. Please refer to the test.

Article Reprinted from network management: http://www.bitscn.com/wb/system/200609/76663.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.