六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 899|回复: 0

Netcool/OMNIbus Probe脚本编写例子(1)

[复制链接]

升级  42%

5

主题

5

主题

5

主题

童生

Rank: 1

积分
21
 楼主| 发表于 2012-12-30 11:56:30 | 显示全部楼层 |阅读模式
Netcool/OMNIbus Probe脚本编写例子(1)

<div id="cnblogs_post_body">在存储设备的管理中,日常事件的处理是非常关键的一个工作,下面列举一些常见设备的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($*)
    }
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表