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 configure mrtg traffic monitoring system on Redhat

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

Share

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

In this issue, the editor will bring you about how to configure mrtg traffic monitoring system on Redhat. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.

Configure mrtg traffic monitoring system on Redhat

Mrtg software is very powerful and can monitor all kinds of devices that support snmp protocol, such as routers, switches, servers and so on. My running environment is redhat as 5.2.The software is installed with the rpm package that comes with the CD. After all, there is no need to download it, and the installation is simple.

First, let's introduce the software that needs to be installed before installing mrtg, including gd,libpng,perl,zlib,apache,httpd,gcc,net-snmp. If you are not sure whether the system is installed, you can use rpm-qa | grep xxx.rpm to see if the software is installed. If there is no prompt that you do not have the installation.

The specific installation steps of the mrtg traffic system are described below:

1. The default directory for installing apache,apache is / var/www/html, where we set up a mrtg folder to save mrtg files (described later), mkdir mrtg. Remember to configure the apache configuration file after installation

two。 Install snmp (simple Network Management Protocol), rpm-ivh xxx.rpm, and modify its configuration file after installation. Normally, its configuration file will be in / etc/snmp/snmpd.conf. Run vi/etc/snmp/snmpd.conf to open its configuration file

Change line 62 to access notConfigGroup "" any noauth exact mib2 none none

Then change the # in line 98 to view mib2 included .iso.org.dod.internet.mgmt.MIB-2 fc

3. Install mrtg, which installs the image file in / var/www/mrtg by default. Go to this folder and copy all the images in it to the mrtg folder you created earlier. Remember to configure the / etc/httpd/conf.d/mrtg.conf file when you're done, because we created the mrtg folder under / var/www/html. By default, when you access http://127.0.0.1/mrtg after installing mrtg, you will be prompted that you cannot view it, that you have insufficient permissions, and so on. Open this file and change it to

# Alias / mrtg / var/www/mrtg # Order deny,allow # Deny from all # Allow from 127.0.0.1 # Allow from:: 1 # Allow from .example.com

4 start with the command line arguments. Above, we will simply build the mrtg environment. Let's start with the command line parameters.

/ usr/bin/cfgmaker public@202.199.158.190-- output=/var/www/html/mrtg/mrtg.cfg

This creates a mrtg under the mrtg folder. Cfg file, open and configure it, change the workdir under its for unix to your address, for example, mine is

# for UNIX WorkDir: / var/www/html/mrtg

Note that this line is written at the top, no spaces, etc.

Then change the following to

# to get bits instead of bytes and graphs growing to the right Options [_]: growright, bits Options [_]: unknaszero is used to set to 0 EnableIPv6: no Language:gb2312 when the data is not available

4. Then run / usr/bin/mrtg / var/www/html/mrtg/mrtg.cfg the first two times may prompt an error, but not the third time, remember to be sure

To run until there is no error, it is possible to prompt you for another command, probably Lang C=/usr/bin/mrtg / var/www/html/mrtg/mrtg.cfg

Just do it.

5: make the home page

/ usr/bin/indexmaker-- output=/var/www/html/mrtg/index.html / var/www/html/mrtg/mrtg.cfg

In this way, the home page is generated under the mrtg folder, so you can open the browser and type http://127.0.0.1/mrtg/index.html to see your monitoring chart.

* We asked mrtg to collect images every 5 minutes and open the terminal to enter contab-e.

Input

* / 5 * / usr/bin/mrtg / var/www/html/mrtg/mrtg.cfg

6. Restart service httpd restart service snmpd restart * restart apache and snmp in one step

So far, the mrtg traffic monitoring system has been completely built successfully.

The above is the editor for you to share how to configure mrtg traffic monitoring system on Redhat, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

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