Cacti监控远程主机时snmp.conf的配置

本文发布时间: 2019-Mar-22
使用Cacti监控远程主机时的snmp.conf配置实例使用cacti监控系统时,本机监控一般都比较好弄,可是在监控远程主机时,在snmp的配置这个地方经常容易出画,导致画不出图像来!下面这个是要被cacti监控的主机的snmp.conf的文件配置,需要修改的地方,你的snmp.conf文件中查找以下部分,把你的文件中没有的,添加上,就可以了。下面的IP地址是我随便写的10.10.10.10,这个要改成你的被监控的主机的IP地址。其它的地方照下面的复制粘贴就行了!有几个地方貌似有点重复,没有太多时间去每个都检验,反正肯定是好用了,呵呵:)暂时就这样喽~~~这东西总是要真正的系统的去使用的时候,才能真正理解其中的每一步的意义。光看理论也没啥意思:)# vi /etc/snmp/snmpd.conf //被监控的远程主机的# sec.name source communitycom2sec notConfigUser 127.0.0.1 publiccom2sec notConfigUser 10.10.10.10 public# Second, map the security name into a group name:# groupName securityModel securityNamegroup notConfigGroup v1 notConfigUsergroup notConfigGroup v2c 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.1view systemview included .1.3.6.1.2.1.2view systemview included .1.3.6.1.2.1.25.1.1view all included .1# 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 mib2 none noneaccess notConfigGroup "" any noauth exact all none none## sec.name source community#com2sec local localhost COMMUNITY#com2sec mynetwork NETWORK/24 COMMUNITYcom2sec notConfigUser default publiccom2sec *.*.*.0 10.10.10.10/24 public## group.name sec.model sec.namegroup MyRWGroup any localgroup MyROGroup any mynetworkgroup notConfigUser any zcom#group MyRWGroup any otherv3user## incl/excl subtree maskview all included .1 80view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc## context sec.model sec.level prefix read write notifaccess MyROGroup "" any noauth 0 all none noneaccess MyRWGroup "" any noauth 0 all all all配置完成后,重启snmp服务:# service snmpd restart然后在Cacti的主机使用snmpwalk命令测试一下:# snmpwalk -v 1 10.10.10.10 -c public显示一大堆下面的信息就是正常了!… DISMAN-EVENT-MIB::mteEventNotificationObjects."_snmpd".'_linkDown' = STRING: _linkUpDownDISMAN-EVENT-MIB::mteEventNotificationObjects."_snmpd".'_linkUp' = STRING: _linkUpDownDISMAN-EVENT-MIB::mteEventNotificationObjects."_snmpd".'_mteTriggerFailure' = STRING: _triggerFailDISMAN-EVENT-MIB::mteEventNotificationObjects."_snmpd".'_mteTriggerFalling' = STRING: _triggerFireDISMAN-EVENT-MIB::mteEventNotificationObjects."_snmpd".'_mteTriggerFired' = STRING: _triggerFireDISMAN-EVENT-MIB::mteEventNotificationObjects."_snmpd".'_mteTriggerRising' = STRING: _triggerFireNOTIFICATION-LOG-MIB::nlmConfigGlobalEntryLimit.0 = Gauge32: 1000NOTIFICATION-LOG-MIB::nlmConfigGlobalAgeOut.0 = Gauge32: 1440 minutesNOTIFICATION-LOG-MIB::nlmStatsGlobalNotificationsLogged.0 = Counter32: 0 notificationsNOTIFICATION-LOG-MIB::nlmStatsGlobalNotificationsBumped.0 = Counter32: 0 notifications…OK,现在去Cacti的控制台里面去添加远程主机,并添加图像设置,就可以看到曲线图了应该!


(以上内容不代表本站观点。)
---------------------------------
本网站以及域名有仲裁协议。
本網站以及域名有仲裁協議。

2024-Mar-04 02:11pm
栏目列表