安装snmp工具
yum -y install net-snmp net-snmp-agent-libs net-snmp-devel net-snmp-libs net-snmp-perl net-snmp-utils
配置snmpd.conf
#修改项如下
# First, map the community name "public" into a "security name"
# sec.name source community
com2sec notConfigUser default Ui$dpp))09
com2sec notConfigUser 192.168.1.231 Ui$dpp))09
####
# Second, map the security name into a group name:
# groupName securityModel securityName
group MyROGroup v1 notConfigUser
group MyROGroup v2c notConfigUser
group MyROGroup usm notConfigUser
####
# Third, create a view for us to let the group have rights to:
# Make at least snmpwalk -v 1 localhost -c public system fast again.
# name incl/excl subtree mask(optional)
#view systemview included .1.3.6.1.2.1.1
#view systemview included .1.3.6.1.2.1.25.1.1
view all included .1 80
####
# 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 systemview none none
access MyROGroup "" any noauth exact all none none
启动snmp服务
systemctl enable snmpd
systemctl start snmpd
zabbix添加snmp监控主机
链接模板