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($*)
        }

  • 相关阅读:
    软件工程基础 结对项目作业
    软件工程基础 第3次个人作业
    软件工程基础 第2次个人作业
    软件工程基础 第1次个人作业
    BUAA_2019_MATLAB基础与应用_期末复习纲要
    BUAA_2019_数学建模_期末复习提纲
    技术学习资源
    线程优先级的高低和执行顺序的关系
    阿里和Google的JAVA开发规约
    java中创建线程的3种方法
  • 原文地址:https://www.cnblogs.com/wishma/p/2661577.html
Copyright © 2011-2022 走看看