Configure net-snmp in RedHat and FreeBSD

Source: Internet
Author: User
Tags mrtg
Considering that we have used MRTG, we should have some knowledge about snmp, and did not write the snmp configuration. Some of my friends have posted that they cannot obtain the CPU and system load data. The reason should be that the snmp settings do not allow this data by default. Below are some simple configurations of net-snmp in linux and FreeBSD. 1. For Linux (RedHat) configuration, open the default/etc/snmp/snmpd. conf file and change the following configuration: 1. Search

Considering that we have used MRTG, we should have some knowledge about snmp, and we did not write the snmp configuration. Some of my friends have posted that they cannot obtain the CPU and system load data. The reason should be that the snmp settings do not allow this data by default. Below are some simple configurations of net-snmp in linux and FreeBSD.

1. Linux (RedHat) Configuration

Open the default/etc/snmp/snmpd. conf file and change the following Configuration:

1. Search for the following fields:

# Sec. name source community
Com2sec notConfigUser default public

Change the "comunity" field to the password you want to set, for example, "public ".

Change "default" to which machine you want to view your snmp information, such as 10.10.10.10.

2. Search for the following fields:

####
# Finally, grant the group read-only access to the systemview view.


# Group context sec. model sec. level prefix read write notif
Access notConfigGroup "" any noauth exact all none

Change the "read" field to all.

# Access notConfigGroup "" any noauth exact systemview none

3. Search for the following fields:

# Incl/excl subtree mask
# View all supported ded. 1 80

Remove "#" before this row.

Save and close.

4. Run the/etc/init. d/snmpd start command to run snmpd.

Run netstat-ln to check whether port 161 is enabled.

Ii. FreeBSD
If you use port to install net-snmp, the default configuration file should be in/usr/local/share/snmp/snmpd. conf (no default file ).
You can create a simple configuration file, such:

Syslocation YourDefineName

Syscontact YourEmailAddress

Sysservices 77

Rocommunity public (please change)

Load 12 12 12


Run snmpd and netstat to check whether port 161 is enabled.

The above method is only applicable to the default installation. If you are using a custom installation method, set it according to your installation directory.

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.