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

  • 相关阅读:
    HDU--4548 美素数
    【思维】南阳理工 14 会场安排问题
    【思维】【水】 南阳oj 喷水装置(一)
    【思维】南阳理工91 阶乘之和
    【转】哈夫曼树 九度1172
    Array
    HDU--1702 ACboy needs your help again!
    栈和队列
    3.Compound data types
    4.Object Oriented Programming
  • 原文地址:https://www.cnblogs.com/wishma/p/2661577.html
Copyright © 2020-2023  润新知