首页 > 其他 > 详细

yum安装snmp

时间:2014-06-15 15:47:54      阅读:904      评论:0      收藏:0      [点我收藏+]

1.安装 snmp服务

[root@localhost] yum install -y net-snmp net-snmp-utils

2.配置snmp服务

第一步:
(yum安装snmpd的配置文件为/etc/snmp/snmpd.conf ,一份非常详细的文档,先备份一份snmpd.conf)

[root@localhost] mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak
3.运行snmp服务

[root@localhost] service snmpd start
Starting snmpd:                                            [  OK  ]

4.设置成开机自动运行snmpd服务

[root@localhost] chkconfig snmpd on
[root@localhost] chkconfig –list|grep snmpd
snmpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off

 

SNMP报错

创建SNMP – Interface Statistics报错,如下:

Created graph: db-m2-slave-2 - Traffic - |query_ifName|

ERROR: no Data Source associated. Check Template

 

[root@squid-2 html]# snmpwalk -c public -v 2c 10.254.3.73 ifHCInOctets

IF-MIB::ifHCInOctets = No more variables left in this MIB View (It is past the end of the MIB tree)

 

[root@squid-2 html]# snmpwalk -c public -v 2c 10.254.3.73 if

IF-MIB::ifTable = No Such Object available on this agent at this OID

 

[root@squid-2 html]# snmpwalk -c public -v 2c 10.254.3.73 if

IF-MIB::ifTable = No more variables left in this MIB View (It is past the end of the MIB tree)

 

解决方法

在snmpd.conf配置文件里面,查找以下字段:

## incl/excl subtree mask

#view all included .1 80

将该行前面的"#"去掉.

之后重启snmpd服务解决。

yum安装snmp,布布扣,bubuko.com

yum安装snmp

原文:http://www.cnblogs.com/smallcoderhujin/p/3785731.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!