Analysis of the experiment process of SNMP & MRTG in Linux learning notes

Source: Internet
Author: User
Tags mrtg
Article Title: Analysis of the experiment process of SNMP & MRTG in Linux learning notes. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

SNMP, Simple Network Management Protocol: Simple Network Management Protocol, which is a standard Protocol used to manage nodes on an IP Network.

The basic function of SNMP is to get, set, and receive unexpected messages sent by the proxy. Obtaining refers to sending a request from the base station. The proxy returns the corresponding data based on the request and sets the value of the management object (that is, the proxy) set by the base station, the unexpected information sent by the receiving proxy refers to the exceptions that the proxy can report to the base station when the base station does not request.

Simply put, it is convenient for administrators to manage in a timely and convenient manner.

Lab objectives:

MRTG can monitor computers and network traffic in the network.

Basic steps:

1. Enable the snmp protocol

# Vi/etc/snmp/snmpd. conf

Copy line 1 view and change the last number 1 to 2 // to monitor local traffic

# Service snmpd start // Enable snmp. As long as this protocol is enabled, it can be monitored by MRTG.

2. Send the information to MRTG for processing. If the IP address of the local machine is used, it can also be in the network, but SNMP must be enabled.

# Define maker public @ monitoring IP>/etc/mrtg. cfg

3. Modify the mrtg File

# Vi/etc/mrtg. cfg

WorkDir:/var/www/mrtg // 11 rows. The MRTG directory in As4 has been changed. In 9, it is in/var/www/html/mrtg. Note: there must be no space in the front top.

Options []: growright // line 18. Remove the "#" sign and the top lattice.

Add: (Note: There is no space after the colon)

Refresh: 300 // 300 is the minimum Refresh time

Interval: 5

Language: GB2312

4. Solve APACHE garbled characters

# Vi/etc/httpd/conf/httpd. conf

730 rows: UTF-8 changed to GB2312

# Service httpd start

5. Access Control

# Vi/etc/httpd/confd/mrtg. conf

Deny row removal rejected

Allow all (lower case)

6. Generate a traffic diagram: // env defines the environment variable

# Env LANG = C mrtg/etc/mrtg. cfg

Open a browser to access http: // monitoring IP/mrtg/monitoring ip_2.html

Q: How can I monitor other machines on the network?

Enable SNMP on the monitored machine.

Run # monitoring maker public @ IP address to be monitored>/etc/mrtg. cfg on the monitored machine.

The same as above.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.