• centos7之zabbix的监控H3C ER3200G2流量


    1.首先在服务器端安装snmp工具

    yum -y install net-snmp-utils snmp-libs snmp-devel snmp
    

      启动snmpd服务

    systemctl start snmpd
    systemctl enable snmpd
    

    2、更改配置文件。

    vim /etc/snmp/snmpd.conf
    
    com2sec notConfigUser  default       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.25.1.1
    view    systemview    included   .1
    
    access  notConfigGroup ""      any       noauth    exact  all none none
    
    proc mountd
    proc ntalkd 4
    proc sendmail 10 1
    disk / 10000
    load 12 14 14
    

    重启snmpd服务

    systemctl restart snmpd

    3.检测与路由器的连通性(注意,这里必须要H3C ER3200G2开启snmp服务的网关路由器IP地址)

    打开路由器snmp功能

    snmpwalk  -v 2c -c private 路由器wan口地址

     1 SNMPv2-MIB::sysDescr.0 = STRING: H3C Product Version ERHMG2-MNW100-R1115^M
     2 H3C ERHMG2^M
     3 Copyright(c) 2014-2017 New H3C Technologies Co., Ltd. All rights reserved.
     4 SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.25506.1.1707
     5 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (543180300) 62 days, 20:50:03.00
     6 SNMPv2-MIB::sysContact.0 = STRING: R&D Hangzhou, New H3C Technologies Co., Ltd.
     7 SNMPv2-MIB::sysName.0 = STRING: H3C
     8 SNMPv2-MIB::sysLocation.0 = STRING: Hangzhou, China
     9 SNMPv2-MIB::sysServices.0 = INTEGER: 78
    10 SNMPv2-MIB::sysORLastChange.0 = Timeticks: (47) 0:00:00.47
    11 SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
    12 SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB
    13 SNMPv2-MIB::sysORID.3 = OID: IP-MIB::ip
    14 SNMPv2-MIB::sysORID.4 = OID: UDP-MIB::udpMIB
    15 SNMPv2-MIB::sysORID.5 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
    16 SNMPv2-MIB::sysORID.6 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
    17 SNMPv2-MIB::sysORID.7 = OID: SNMP-MPD-MIB::snmpMPDCompliance
    18 SNMPv2-MIB::sysORID.8 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
    19 SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities
    20 SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for managing TCP implementations
    21 SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing IP and ICMP implementations
    22 SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing UDP implementations
    23 SNMPv2-MIB::sysORDescr.5 = STRING: View-based Access Control Model for SNMP.
    24 SNMPv2-MIB::sysORDescr.6 = STRING: The SNMP Management Architecture MIB.
    25 SNMPv2-MIB::sysORDescr.7 = STRING: The MIB for Message Processing and Dispatching.
    26 SNMPv2-MIB::sysORDescr.8 = STRING: The management information definitions for the SNMP User-based Security Model.
    27 SNMPv2-MIB::sysORUpTime.1 = Timeticks: (46) 0:00:00.46
    28 SNMPv2-MIB::sysORUpTime.2 = Timeticks: (46) 0:00:00.46
    29 SNMPv2-MIB::sysORUpTime.3 = Timeticks: (46) 0:00:00.46
    30 SNMPv2-MIB::sysORUpTime.4 = Timeticks: (46) 0:00:00.46
    31 SNMPv2-MIB::sysORUpTime.5 = Timeticks: (46) 0:00:00.46
    32 SNMPv2-MIB::sysORUpTime.6 = Timeticks: (47) 0:00:00.47
    33 SNMPv2-MIB::sysORUpTime.7 = Timeticks: (47) 0:00:00.47
    34 SNMPv2-MIB::sysORUpTime.8 = Timeticks: (47) 0:00:00.47
    35 IF-MIB::ifNumber.0 = INTEGER: 6
    36 IF-MIB::ifIndex.16777217 = INTEGER: 16777217
    37 IF-MIB::ifIndex.16777218 = INTEGER: 16777218
    38 IF-MIB::ifIndex.50331652 = INTEGER: 50331652
    39 IF-MIB::ifIndex.50331653 = INTEGER: 50331653
    40 IF-MIB::ifIndex.50331654 = INTEGER: 50331654
    41 IF-MIB::ifIndex.385875968 = INTEGER: 385875968
    42 IF-MIB::ifDescr.16777217 = STRING: WAN1
    43 IF-MIB::ifDescr.16777218 = STRING: WAN2
    44 ...........................底下还有很多行
    View Code

     4、添加监控项

    添加主机群组

    添加主机

    添加模板

    添加成功,但是你会发现图形没有,我这里是已经添加完了

    点击图形 

     下面这个图可能要等好一会,SNMP才会把信息传过来,所以耐性等它检测出来,然后选择我们要监控的WAN口,然后创建图形。

     

     我这里添加图形,选择WAN1口的上传和下载监控项。

     

    添加完成后预览,确认无误后,点击添加。

     

     日常查看。

     

      

  • 相关阅读:
    虚拟主机的陷阱
    http://www.xmenglish.com/(外贸知识网站)
    Highlight Table Row
    让你从电脑维修新手到高手
    Flash 视频教程
    ASP Comparison Operators Logical Operators
    Linux 虚拟机 NAT方式上网设置
    vim技巧
    25 条 SSH 命令和技巧
    linux下添加路由的方法
  • 原文地址:https://www.cnblogs.com/lei0213/p/8868080.html
Copyright © 2020-2023  润新知