Skip to main content
简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

使用已弃用的 ONTAP 命令更新 EMS 事件映射

贡献者

当前使用已弃用的ONTAP命令集配置EMS事件映射时 (event destinationevent route)、则应按照此操作步骤更新映射以使用 event filterevent notification,和 event notification destination 命令集。

步骤
  1. 使用列出系统中的所有事件目标 event destination show 命令:

    cluster-1::event*> destination show
                                                                             Hide
    Name             Mail Dest.        SNMP Dest.         Syslog Dest.       Params
    ---------------- ----------------- ------------------ ------------------ ------
    allevents        -                 -                  -                  false
    asup             -                 -                  -                  false
    criticals        -                 -                  -                  false
    pager            -                 -                  -                  false
    test             test@xyz.com      -                  -                  false
    traphost         -                 -                  -                  false
    6 entries were displayed.
  2. 对于每个目标、使用列出要映射到它的事件 event route show -destinations <destination name> 命令:

    cluster-1::event*> route show -destinations test
                                                                   Freq    Time
    Message                          Severity       Destinations   Threshd Threshd
    -------------------------------- -------------- -------------- ------- -------
    raid.aggr.autoGrow.abort         NOTICE         test           0       0
    raid.aggr.autoGrow.success       NOTICE         test           0       0
    raid.aggr.lock.conflict          INFORMATIONAL  test           0       0
    raid.aggr.log.CP.count           DEBUG          test           0       0
    4 entries were displayed.
  3. 创建相应的 event filter 其中包括所有这些事件子集。 例如、如果要仅包含 raid.aggr.*事件、请使用通配符作为 message-name 参数。您还可以为单个事件创建筛选器。

    备注 您最多可以创建 50 个事件筛选器。
    cluster-1::event*> filter create -filter-name test_events
    
    cluster-1::event*> filter rule add -filter-name test_events -type include -message-name raid.aggr.*
    
    cluster-1::event*> filter show -filter-name test_events
    Filter Name Rule     Rule      Message Name           SNMP Trap Type  Severity
                Position Type
    ----------- -------- --------- ---------------------- --------------- --------
    test_events
                1        include   raid.aggr.*            *               *
                2        exclude   *                      *               *
    2 entries were displayed.
  4. 创建 event notification destination 对于每个 event destination 端点(即SMP/SNMP/系统日志)

    cluster-1::event*> notification destination create -name dest1 -email test@xyz.com
    
    cluster-1::event*> notification destination show
    Name            Type        Destination
    --------------  ----------  ---------------------
    dest1           email       test@xyz.com (via "localhost" from "admin@localhost", configured in "event config")
    snmp-traphost   snmp        - (from "system snmp traphost")
    2 entries were displayed.
  5. 通过将事件筛选器映射到事件通知目标来创建事件通知。

    cluster-1::event*> notification create -filter-name asup_events -destinations dest1
    
    cluster-1::event*> notification show
    ID   Filter Name                     Destinations
    ---- ------------------------------  -----------------
    1    default-trap-events             snmp-traphost
    2    asup_events                     dest1
    2 entries were displayed.
  6. 对每个重复步骤1-5 event destination 具有 event route 映射。

    备注 路由到SNMP目标的事件应映射到 snmp-traphost 事件通知目标。SNMP 陷阱主机目标使用系统配置的 SNMP 陷阱主机。
    cluster-1::event*> system snmp traphost add 10.234.166.135
    
    cluster-1::event*> system snmp traphost show
            scspr2410142014.gdl.englab.netapp.com (scspr2410142014.gdl.englab.netapp.com) <10.234.166.135>    Community: public
    
    cluster-1::event*> notification destination show -name snmp-traphost
    
                    Destination Name: snmp-traphost
                 Type of Destination: snmp
                         Destination: 10.234.166.135 (from "system snmp traphost")
     Server CA Certificates Present?: -
       Client Certificate Issuing CA: -
    Client Certificate Serial Number: -
           Client Certificate Valid?: -