MRTG for WINDOWS Installation Guide
MRTG (Multi Router traffic Grapher) , usually an open source software that monitors the traffic load on the network, it can run from all SNMP device (including servers, routers, switches, etc.) on the protocol. In fact , it can not only monitor network devices, any other SNMP -enabled devices can be used as MRTG monitoring objects, and automatically generate a PNG containing HTML document in graphical format , displayed to the user in HTTP mode.
Official Installation instructions:http://mrtg.cs.pu.edu.tw/doc/mrtg-nt-guide.en.html
Preparing the installation Environment
before installing, You need to download several auxiliary software in addition to the MRTG installer. All of these software are free of charge.
1. Download MRTG
http://www.mrtg.org
2. Download ActivePerl
Http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl
3. Download the Windows Services Installation tool:SERANY.exe and INSTSRV.exe
Http://www.electrasoft.com/srvany/srvany.htm
installation MRTG
After downloading the above software, you can start the installation. The fact that installing MRTG on Windows is simple because MRTG is Perl language development, so to first install a Perl the operating environment of the language.
1. Installing ActivePerl
unzip The ActivePerl package, locate the install.bat file in the installation directory , and run it. In the DOS window, the installer will ask some questions, such as the installation path, whether to modify the environment variables, etc., you can use the default settings, all the way to enter the line. Perl is installed by default in the C:\Perl directory. When the installation is complete, open the Windows environment variable to check if the Perl run file path has been added .
2. Installing MRTG
Unzip the MRTG Package, I use the MRTG-2.12.2 version. Move the extracted directory to C: \ line.
Places to be aware of
(1) , give Windows installation SNMP protocol Support
usually due toSNMPis a proposal to close the Protocol(because of a security breach .), soWindows 2003not installed by default. ButMRTGis to useSNMPAgreement, there is no way, just put one. In the Control Panel -Increase/Remove a program->windowscomponent installation, install theSNMP's components. (Openthe WindowsComponent Wizard" -in components, click Management and Monitoring tools (but do not select or clear their check boxes), and then click Details.
Select the Simple Network Management Protocol check box, and then click OK. )
(2) , modify SNMP the security Settings
        If the monitored machine also runs windows ( MRTG server can not be set snmp message.
Open the Services window and locate the SNMP Service, open the right-click menu and select Properties. In the window that opens, locate the Security Options page. There are two sections in the Options page, the upper part refers to what kind of Community indicator The SNMP service accepts , by default Windows 2003 Do not respond to any of the indicator words. I usually set as "public--readonly". The lower half allows you to set a trusted host name,IP , or IPX name.
(3) , modify the firewall
If you install a firewall, remember to open the UDP 161 Port, otherwise there will be a lot of problems.
Run MRTG
Well, it's finished. Now you can run the MRTG and look at it.
Open the DOS window, first enter C:\mrtg\bin, and then enter the following command:
Perl cfgmaker [email protected]--global "WORKDIR:C:\INETPUB\WWWROOT\MRTG"--output mrtg.cfg
This order is forMRTGestablish a monitoring profile that monitors objects that arelocalhost, which is the local machine. You can also useIPAddress to replacelocalhost, or point to a different monitoring host. (Notemeaning:in this line of commandWorkdir:with theC:there should be a space between the drive letter!!! alsoC:\INETPUB\WWWROOT\MRTGThis directory can also be changed to another directory, but becauseMRTGwill generate statistical charts and Web pages in this working directory, so the general designationA directory under a site for easy viewing of statistics directly from the Web)
then type a command:
Perl MRTG Mrtg.cfg
This command will Create some HTML and PNG in the C:\INETPUB\WWWROOT\MRTG directory. files, which are the traffic reports that users typically see.
make MRTG become Windows of Services
SERANY.exe and the INSTSRV.exe These two programs are Windows The software that comes with the tool. They can install any one of the Windows applications as
Windows one of the services.
(1) , modify the registry
Create a text file, write the following in the file, and save it as a mrtg.reg file:
Windows Registry Editor Version 5.00
[Hkey_local_machine\system\currentcontrolset\services\mrtg\parameters]
"Application" = "C:\\perl\\bin\\wperl.exe"
"Appparameters" = "C:\\mrtg\\bin\\mrtg--logging=eventlog c:\\mrtg\\bin\\mrtg.cfg"
"Appdirectory" = "c:\\mrtg\\bin\\"
(2) , Installation Services
to copy the Serany.exe,instsrv.exe to the MRTG installation directory, type the following command:
Instsrv MRTG C:\mrtg\bin\srvany.exe
Double-click the mrtg.reg file to register the relevant information in the registry. Under Control Panel , Administrative Tools ->services, run the servicenamed MRTG .
By default, MRTG collects data every 5 minutes ( Note: Be sure to bin\ Mrtg.cfg configuration file last line plus runasdaemon:yes)
for those who want to useMRTGto monitor multiple devices, for example, as follows:
Cfgmaker--global "Workdir:/var/www/html/mrtg"
--global "options[_]: Growright,bits"
--ifref=descr
--ifdesc=alias
[Email protected]
[Email protected]
--global "options[_]: Growright"
--ifref=name
--ifdesc=descr
[Email protected]
--ifdesc=name
[Email protected] >; Mrtg.cfg
This indicates the monitoring of four devices:router1.place.xyz,router2.place.xyz,switch1.place.xyz
and theswitch2.place.xyz, all devices have a community name PublicFor monitoring. and two routers withDescras a description of the device, while two switches use aaliasas a device description(The two are different, for example forCiscorouters, forDescr, the device is described as"Serial0", and forALIASL, it is"Link to HQ").
Run MRTG
Once the correct configuration file is generated, run the following command:
/usr/local/mrtg-2/bin/mrtg/etc/mrtg.cfg
MRTG for WINDOWS Installation Guide