Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install MRTG on RedHa to monitor network card traffic

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to install MRTG on RedHa to monitor network card traffic". The explanation in this article is simple and clear and easy to learn and understand. now please follow the editor's train of thought to study and learn "how to install MRTG on RedHa to monitor network card traffic".

System environment:

Redhat9.0

Essential software:

The system must already have the following software installed, all of which are included on the CD:

Gd-1.8.4-11

Libpng-1.2.2-16

Perl-5.8.0-88

Zlib-1.1.4-8

Apache

Gcc-3.2.2-5

1. First, install and configure net-snmp

The net-snmp installation rpm package is available on the CD, or if you choose to install the ethereal- network traffic analyzer in the add / remove program, the net-snmp package will also be installed automatically.

After installation, configure the / etc/snmp/snmpd.conf file to work with mrtg.

Remove the # below

# view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc

Put the following sentence

Access notConfigGroup "" any noauth exact systemview none none

Change it to:

Access notConfigGroup "" any noauth exact mib2 none none

Ok. After the modification, you can start the snmpd service.

# / etc/rc.d/init.d/snmpd start

two。 Install and configure mrtg

Tar zvxf mrtg-2.9.28.tar.gz cd mrtg-2.9.28. / 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

3. Configure mrtg

Mkdir / usr/local/apache/htdocs/mrtg here / usr/local/apache/htdocs is the default home address of www. You may be different from me.

Cp images/* / usr/local/apache/htdocs/mrtg images/* is in the installation source folder / usr/local/mrtg/bin/cfgmaker-- output=/usr/local/apache/htdocs/mrtg/mrtg.cfg public@192.168.0.1

Create a mrtg.cfg file in the / usr/local/apache/htdocs/mrtg directory and monitor the address of 192.168.0.1. In this case, this is the address of the local network card.

Then modify the mrtg.cfg file, mainly to modify the following to suit your actual situation

WorkDir: / usr/local/apache/htdocs/mrtg

Options [_]: growright, bits

Language:GB2312

Here is the following:

/ usr/local/mrtg/bin/mrtg / usr/local/apache/htdocs/mrtg/mrtg.cfg

This needs to be run 3 times, the first two times will report an error, do not pay attention to him, the third time there should be no error, however, if there is a problem, you need to change the mrtg.cfg

Execute again until no error occurs.

Make the home page index.html:

/ usr/local/mrtg/bin/indexmaker-- output=/usr/local/apache/htdocs/mrtg/index.html-- title= server traffic statistics / usr/local/apache/htdocs/mrtg/mrtg.cfg

The above program indexmaker is making the home page. Will automatically output an index.html file.

Running mrtg manually does not generate appropriate statistics on a regular basis, so * * automatically run mrtg statistics on a regular basis. The default is once every five minutes.

Enter the editing state as root identity crontab-e, and add the following:

* / 5 * / usr/local/mrtg/bin/mrtg / usr/local/apache/htdocs/mrtg/mrtg.cfg

Ok! This is the end of the installation of MRTG monitoring on RedHa. After configuration, be sure to start the snmp and httpd services.

Visit:

Http://192.168.0.1/mrtg/

You can see the network traffic graph.

Thank you for reading, the above is the content of "how to install MRTG on RedHa to monitor network card traffic". After the study of this article, I believe you have a deeper understanding of how to install MRTG on RedHa to monitor network card traffic, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report