com2sec notConfigUser 127.0.0.1 public
com2sec notConfigUser localhost-IP public
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.2
view systemview included .1.3.6.1.2.1.25.1.1
view all included .1
access notConfigGroup "" any noauth exact all none none
snmpd.conf Code
define service{
use local-service ; Name of service template to use
host_name localhost
service_description Check_Trafffic
check_command check_traffic!2!12,15!20,30
notifications_enabled 1
normal_check_interval 5
retry_interval 1
}
localhost.cfg
并且修改localhost.cfg文件中的IP地址(127.0.0.1)为本机的IP!!!!!!!(坑了我2天)