Updated on 11 Feb 2004
| MRTG | mrtg-2.10.5.zip |
|---|---|
| Active Perl | ActivePerl-5.8.2.808-MSWin32-x86.msi |
perl mrtg
Now it is time to walk create a configuration for mrtg.But before we begin you need to know a few things, take an opportunity to gather the following information:
Set DIR_BIN=C:\mrtg\bin Set DIR_WWW=C:\inetpub\wwwroot\mrtg Set PERL=C:\perl\bin\perl.exe If Not exist %DIR_WWW% ( mkdir %DIR_WWW% ) %PERL% "%DIR_BIN%\cfgmaker" --ifref=eth@--global "Options[_]: bits,growright" 192.168.0.1 192.168.0.2 --global "WorkDir: %DIR_WWW%" --community=public --output mrtg.cfg
This creates an initial MRTG config file for you. Note that in this file all interfaces of your router will be stored by number. Unfortunately these numbers are likely to change when ever you reconfigure your router. So in order to work around this you can get cfgmaker to produce a configuration which is based on Ip numbers, or even Interface Descriptions.
If you get an error message complaining about no such name or no response, your community name is probably wrong.
Set DIR_BIN="C:\mrtg\bin" Set DIR_WORK="C:\inetpub\wwwroot\mrtg" Set PERL=start /low C:\perl\bin\perl.exe REM Make Index file %PERL% %DIR_BIN%\indexmaker --columns=1 mrtg.cfg > %DIR_WORK%\default.htm REM Analyze %PERL% %DIR_BIN%\mrtg mrtg.cfg
If you take a look at those web pages they are not really exciting, yet. You need to have the mrtg files run every five minutes to produce the desired results. Just run it again after a few minutes. You should now be able to see the first lines in your graphs.
RunAsDaemon: yes Interval: 5



