zoukankan      html  css  js  c++  java
  • catci监控

    snmp安装:yum install net-snmp*

    配置/etc/snmp/snmpd.conf:
    com2sec notConfigUser 192.168.79.129    public
    access  notConfigGroup ""  any  noauth  exact all none none
    view all include .1  80   去掉#号

    启动snmp服务:service snmpd start
    设置开机自启动:chkconfig snmpd on
    关闭防火墙
     
    snmp.conf

    ####
    # First, map the community name "public" into a "security name"

    # sec.name source community
    com2sec notConfigUser 192.168.79.129 public
    #定义community名称为 public,映射到安全名 notConfigUser。

    ####
    # Second, map the security name into a group name:

    # groupName securityModel securityName
    group notConfigGroup v1 notConfigUser
    #定义安全用户名notConfigUser映射到notConfigGroup组。
    group notConfigGroup v2c notConfigUser

    ####
    # Third, create a view for us to let the group have rights to:
    #定义一个view,来决定notConfigUser可以操作的范围。


    # Make at least snmpwalk -v 1 localhost -c public system fast again.
    #定义可查看的snmp的范围。
    # name incl/excl subtree mask(optional)
    view systemview included .1.3.6.1.2.1.1
    view systemview included .1.3.6.1.2.1.25.1.1
    view all included .1
    ####
    # Finally, grant the group read-only access to the systemview view.
    #给notConfigGroup组所定义view名 all 以只读权限。

    # group context sec.model sec.level prefix read write notif
    access notConfigGroup "" any noauth exact all none none
    #access notConfigGroup "" any noauth exact mib2 none none

    # -----------------------------------------------------------------------------

    # Here is a commented out example configuration that allows less
    # restrictive access.

    # YOU SHOULD CHANGE THE "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY
    # KNOWN AT YOUR SITE. YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
    # SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.

    ## sec.name source community
    #com2sec local localhost COMMUNITY
    #com2sec mynetwork NETWORK/24 COMMUNITY

    ## group.name sec.model sec.name
    #group MyRWGroup any local
    #group MyROGroup any mynetwork
    #
    #group MyRWGroup any otherv3user
    #...

    ## incl/excl subtree mask
    view all included .1 80

    ## -or just the mib2 tree-

    #view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
    #view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc


    ## context sec.model sec.level prefix read write notif
    #access MyROGroup "" any noauth 0 all none none
    #access MyRWGroup "" any noauth 0 all all all

  • 相关阅读:
    编写安全检测脚本
    编写监控脚本
    编写一键部署软件脚本
    awk扩展应用
    sed基本用法
    字符串截取及切割,正则表达式,expect预期交互
    For,while,case,shell循环结构
    mybatis使用associaton进行分步查询
    mybatis中封装结果集常见示例
    Mybatis获取数据库自增主键
  • 原文地址:https://www.cnblogs.com/no314/p/3617366.html
Copyright © 2011-2022 走看看