MRTG (MultiRouterTrafficGrapher) is usually an open source software that monitors network link traffic load. It can capture information from all devices running the SNMP protocol (including servers, routers, switches, and so on. In fact, it not only monitors network devices, but any other device that supports the SNMP protocol can be used as the MRTG monitoring object and automatically generate HTML documents containing PNG images, it is displayed to the user through HTTP. Environment: RedHatLinux9.
MRTG (Multi Router Traffic Grapher) is generally an open source software that monitors network link Traffic load. It can be used on all devices running the SNMP protocol (including servers, routers, switches, and so on) capture information. In fact, it not only monitors network devices, but any other device that supports the SNMP protocol can be used as the MRTG monitoring object and automatically generate HTML documents containing PNG images, it is displayed to the user through HTTP.
Environment: RedHat Linux 9.0.
Required software:
Gd-1.8.4-11
Gd-devel-1.8.4-11
Libpng-1.2.2-16
Libpng-devel-1.2.2-16
Libpng10-1.0.13-8
Libpng10-devel-1.0.13-8
Perl-5.8.0-88
Zlib-1.1.4-8
Zlib-devel-1.1.4-8
Httpd-manual-2.0.40-21
Httpd-2.0.40-21)
Gcc-3.2.2-5
Net-snmp-5.06-17
Mrtg-2.9.29.tar.gz
Of course, not all versions of the software listed above must be the same, and some package systems have been installed for you, such
For gcc and Perl, check whether these software packages have been installed.
# Rpm-qa | grep gd
# Rpm-qa | grep libpng
If you do not have an installation, You can Google it. foreign websites have abundant resources in this field.
I downloaded the following rpm package:
Gd-1.8.4-11.i386.rpm
Gd-devel-1.8.4-9.i386.rpm
Libpng-1.2.8.tar.tar
Libpng-devel-1.2.8-2.i386.rpm
Zlib-devel-1.1.4-8.i386.rpm
Httpd-2.0.40-21.i386.rpm
Httpd-manual-2.0.40-21.i386.rpm
In short, after confirming that these are all installed, you can continue the MRTG installation.
(1): first, modify the snmp configuration file:
# Vi/etc/snmp/snmpd. conf
Remove the comments from the beginning of the 90th line
View mib2 shortded .iso.org. dod. internet. mgmt. mib-2 fc
Remove # in row 62 and then modify it:
Access notConfigGroup "" any noauth exact systemview none
Change
Access notConfigGroup "" any noauth exact mib2 none
Then add a line of content under the last line:
Rocommunity mrtg
(2) Start your snmp Service and http Service as follows:
First, check whether the two services are enabled when the system starts.
# Chkconfig -- list | grep httpd
Httpd 0: off 1: off 2: off 3: off 4: off 5: off 6: off
It indicates that the http service is not started in each startup mode. You need to modify the following:
# Chkconfig -- level 35 httpd on
Check the result as follows:
Httpd 0: off 1: off 2: off 3: on 4: off 5: on 6: off
It indicates that the modification has been successful. The http service will be automatically loaded every time the system is started in the form of 3 or 5.
Use the same settings for the snmpd service
Then manually start
#/Etc/rc. d/init. d/httpd start
#/Etc/rc. d/init. d/snmpd start
(3): Start mrtg Installation
# Tar zvxf mrtg-2.9.29.tar.gz
# Cd mrtg-2.9.29
#. /Configure -- prefix =/usr/local/mrtg -- with-gd =/usr/include -- with-gd-lib =/usr/lib -- with-gd-inc =/usr /include -- with-png =/usr/include -- with-zlib =/usr/include
# Make
# Make install
If an error occurs in one of the preceding steps, it may be because a software package is not correctly installed, or it may be caused by other reasons. Please analyze it carefully.
If OK, we can configure mrtg.