Install mrtg configuration SNMP in Linux environment Centos                   

For different devices, the method of installing mrtg to configure SNMP support under Centos is inconsistent. For details, please refer to the random documentation of the d

  
Grep80

tcp00:::80:::*LISTEN

Second, install mrtg installation and configuration MRTG under Centos

1. Download mrtg, the latest version is mrtg-2.15 .1

http://oss.oetiker.ch/mrtg/pub/mrtg-2.15.1.tar.gz

2. Install mrtg-2.15.1

tar-zxvfmrtg-2.15.1.tar.gz

cdmrtg-2.15.1

./configure--prefix=/usr/local/mrtg(mrtg installation path)

make

makeinstall

3.Basic Configuration

Generate Master Configuration File

cd/usr/local/mrtg/bin/./Cfgmaker--global'WorkDir:/var/www/mrtg'--global"language:GB2312"--global'Options[_]:growright,bits'--ifref=ip--output/etc/mrtg.cfgpublic@ 192.168.1.1 (monitored IP)

This will generate the configuration file mrtg.cfg in /etc.

Configuration file can be modified as needed

Generate MRTG webpage main page File

/usr/local/mrtg/bin/indexmaker/etc/mrtg.cfg--output=/var/www/mrtg/index.html--title=“Mrtg”

Start MRTG

envLANG=C/usr/local/mrtg/bin/mrtg/etc/mrtg.cfg

This command will output some error messages, generally you can Ignore continuously performed three times this command.

The web page generated by MRTG is static. In order to keep it refreshed, you need to add the above command to crontab.

crontab-e

Add the following line
>

*/2****envLANG=C/usr/local/mrtg/bin/mrtg/etc/mrtg/mrtg.cfg

Note: This line means refresh every two minutes, you You can modify the refresh interval according to your needs.

Note: If there is garbled problem, directly modify the httpd.conf configuration file, it seems to be more than 700 lines

AddDefaultCharsetUTF-8 to AddDefaultCharsetGB2312 to save the restart httpd service.

Installing mrtg under Centos solves Gigabit problems as follows

MRTG:

Target[xxx.xxx.xxx.xxx_3]:3:[email protected] .xxx:

should be:

Target[xxx.xxx.xxx.xxx_3]:3:[email protected]:::::2

Use SNMPV2 version to collect

CACTI:

In DataSources, OutputTypeID should also select IN/OUTBITS(64...), if the default does not change, it will be wrong.

Copyright © Windows knowledge All Rights Reserved