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.