zoukankan      html  css  js  c++  java
  • Netcool/OMNIbus Probe脚本编写例子(1)

    在存储设备的管理中,日常事件的处理是非常关键的一个工作,下面列举一些常见设备的TRAP事件处理脚本,事件级别可以根据企业需要自行修改

    SUN 存储设备TRAP处理代码:

    case ".1.3.6.1.4.1.42.2.225.1.3":

        @Agent = "sun"

        $OPTION_TypeFieldUsage = "3.6"

        switch($specific-trap)
        {
            case "1":
      
                switch($6)
         {
                case "Minor":
                        @AlertGroup = "alert.ak.test4"
                          @AlertKey = "pwEntry."
                          @Summary = $3 +" " + $1 + " " + $6
                          @Identifier = @Node + " " + @AlertKey + " " + @AlertGroup + " " + @Summary + " " + @Agent + " " + @Manager + " " + $specific-trap
                        @Severity = 3
               case "Major" :
                        @AlertGroup = "alert.ak.test3"
                          @AlertKey = "pwEntry."
                          @Summary = $3 +" " + $1 + " " + $6
                          @Identifier = @Node + " " + @AlertKey + " " + @AlertGroup + " " + @Summary + " " + @Agent + " " + @Manager + " " + $specific-trap
                        @Severity = 3
                case "Critical" :
                        @AlertGroup = "alert.ak.test2"
                          @AlertKey = "pwEntry."
                          @Summary = $3 +" " + $1 + " " + $6
                          @Identifier = @Node + " " + @AlertKey + " " + @AlertGroup + " " + @Summary + " " + @Agent + " " + @Manager + " " + $specific-trap
                        @Severity = 5
                 default:

                       @AlertGroup = "alert.ak.test1"
                          @AlertKey = "pwEntry."
                          @Summary = $3 +" " + $1 + " " + $6
                          @Identifier = @Node + " " + @AlertKey + " " + @AlertGroup + " " + @Summary + " " + @Agent + " " + @Manager + " " + $specific-trap
                        @Severity = 0
                 }
           

        
                @AlertGroup = "alert.ak.test"
                @AlertKey = "pwEntry."
                @Summary = $3 +" " + $1 + " " + $6
                @Identifier = @Node + " " + @AlertKey + " " + @AlertGroup + " " + @Summary + " " + @Agent + " " + @Manager + " " + $specific-trap
               
                details($*)


            default:

                @Summary = $3 +" " + $1
                @Severity = 0
                @Identifier = @Node + " " + @Agent + " " + @Manager + " " + $enterprise + " " + $generic-trap + " " + $specific-trap
                details($*)
        }

  • 相关阅读:
    我的JavaScript之旅——this到底是啥?
    关闭或修改 IIS 443 端口
    UTF8 GBK UTF8 GB2312 之间的区别和关系
    正则表达式符号解释1
    用 Gmail 的 SMTP 发送邮件
    ASCII 码表
    DNN建立前,需要对其进行一些配置
    XAMPP安装和使用教程(图文并茂)
    Visual Studio IDE 实用小技巧
    第二讲 硬件I/O操作
  • 原文地址:https://www.cnblogs.com/wishma/p/2661577.html
Copyright © 2011-2022 走看看