码迷,mamicode.com
首页 > 其他好文 > 详细

监控软件zabbix使用snmp协议

时间:2016-04-26 14:29:58      阅读:435      评论:0      收藏:0      [点我收藏+]

标签:监控软件   zabbix   snmp   

      SNMP(简单网络管理协议),由一组网络管理的标准组成,包含一个应用层协议(application layer protocol)、数据库模型(database schema)和一组资源对象. 在开源监控系统中主要针对硬件的监控,比如:交换机,路由器,打印机以及网络流量.


1.安装SNMP协议(zabbix已安装好)

[root@db02 ~]# yum install net-snmp -y
[root@db02 ~]# vim /etc/snmp/snmpd.conf
view    systemview    included   .              #添加这行

proc mountd                      #去掉前面注释
proc ntalkd 4                      #去掉前面注释

proc sendmail 10 1             #去掉前面注释

disk / 10000                        #去掉前面注释

load 12 14 14                      #去掉前面注释

[root@db02 ~]# /etc/init.d/snmpd restart
Stopping snmpd:                         [  OK  ]

Starting snmpd:                           [  OK  ]

[root@db02 ~]# netstat -antulp | grep 161            
udp        0      0 0.0.0.0:161                 0.0.0.0:*                               26382/snmpd        
[root@db02 ~]# snmpwalk -v 2c -c public localhost .           #查看所有的对像
SNMPv2-MIB::sysDescr.0 = STRING: Linux db02 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (2587) 0:00:25.87
SNMPv2-MIB::sysContact.0 = STRING: Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: db02
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: SNMP-MPD-MIB::snmpMPDMIBObjects.3.1.1
SNMPv2-MIB::sysORID.2 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.3 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.5 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.6 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.7 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.8 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.3 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.8 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (0) 0:00:00.00
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (888406334) 102 days, 19:47:43.34
HOST-RESOURCES-MIB::hrSystemUptime.0 = No more variables left in this MIB View (It is past the end of the MIB tree)
[root@db02 ~]# snmpwalk -v 2c -c public localhost -On .    #以OID形势显示


2.在zabbix添加snmp监控

(1).添加snmp协议

技术分享

(2)观察snmp协议图标是否变亮

技术分享

(3).添加项目和触发器

技术分享

技术分享

技术分享


(4)绘图

技术分享

技术分享


3.查看监控状态

技术分享

本文出自 “一起走过的日子” 博客,请务必保留此出处http://tongcheng.blog.51cto.com/6214144/1767792

监控软件zabbix使用snmp协议

标签:监控软件   zabbix   snmp   

原文地址:http://tongcheng.blog.51cto.com/6214144/1767792

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!