• NET-SNMP configure File (運用在Cacti主機上)

    by  • 2009/03/13 • linux • 0 Comments

    將 /etc/snmpd/snmpd.conf 改成以下後 , service snmpd restart 後就可以了



    rocommunity //community name (read-only)
    syslocation //主機所在位置(說明)
    syscontact //管理者 email

    # sec.name source community
    com2sec paranoid 127.0.0.1 public
    #com2sec paranoid default public
    #com2sec readonly default public
    #com2sec readwrite default private

    ####
    # Second, map the security names into group names:

    # sec.model sec.name
    group MyROSystem v1 paranoid
    group MyROSystem v2c paranoid
    group MyROSystem usm paranoid
    group MyROGroup v1 readonly
    group MyROGroup v2c readonly
    group MyROGroup usm readonly
    group MyRWGroup v1 readwrite
    group MyRWGroup v2c readwrite
    group MyRWGroup usm readwrite

    ####
    # Third, create a view for us to let the groups have rights to:

    # incl/excl subtree mask
    view all included .1 80
    view system included .iso.org.dod.internet.mgmt.mib-2.system

    ####
    # Finally, grant the 2 groups access to the 1 view with different
    # write permissions:

    # context sec.model sec.level match read write notif
    access MyROSystem "" any noauth exact all none none
    #access MyROSystem "" any noauth exact system none none
    access MyROGroup "" any noauth exact all none none
    access MyRWGroup "" any noauth exact all all none