Net-SNMP is a free, open-source SNMP implementation, formerly called UCD-SNMP. It includes the source code of agent and multiple management tools and supports multiple extension methods. [1] It not only extends the acquisition method, but also extends the data type. Install Net-SNMP
CentOS and other RedHat products provide net-snmp Binary packages. We can install it directly from the source.
yum install net-snmp net-snmp-devel net-snmp-utils
Note: net-snmp-devel is used to use net-snmp-config, and net-snmp-utils is used to use snmpwalk.
Configure Net-SNMP
create-snmpv3-user -ro -A snmp@jiankongbao -a MD5 jiankongbao
AboveCommandCreate an snmpv3 user, read-only, use MD5, username is jiankongbao, password is snmp @ jiankongbao.
Note: Disable the net-snmp service before running it.
service snmpd stop
Run Net-SNMP
The method for running the Net-SNMP service is relatively simple, but the name of the Net-SNMP service is snmpd.
service snmpd start
If you want to add a list of automatically running services at startup:
chkconfig snmpd on
Detect Net-SNMP
We can use snmpwalk to check whether the snmp service is enabled normally.
snmpwalk -v 3 -u jiankongbao -a MD5 -A "snmp@jiankongbao" -l authNoPriv 127.0.0.1 sysDescr
If everything is normal, a normal result is returned. For more information about snmpwalk parameters, see the man documentation.