惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
MyScale Blog
MyScale Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
SegmentFault 最新的问题
Y
Y Combinator Blog
月光博客
月光博客
IT之家
IT之家
T
Tailwind CSS Blog
Last Week in AI
Last Week in AI
L
LangChain Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
博客园 - Franky
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
V
Visual Studio Blog
小众软件
小众软件
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
N
Netflix TechBlog - Medium

博客园 - wishma

SOAR平台初探(一) Logstash和Flume-NG Syslog接收小测试 Elasticsearch 填坑记 IBM TBSM 业务关联规则配置一例 免费实用微软系统工具集推荐(转) VMware vSphere开发(2)配置VMware vSphere Web Services SDK的开发环境 VMware vSphere开发(1)安装配置VMware vSphere Web Services SDK的运行环境 数字电视业务PSI/SI学习系列(转) SMI-S存储管理协议资料 strus2格式化数字和日期(转) - wishma - 博客园 IPhone数据库操作代码例子 NSDate常用代码范例 64位windows7连接网络共享打印机的问题 IPhone 视图切换的的2种方法 我的D630,安装MAC经历 Eclipse快捷键大全(转贴) (转贴)JIRA安装和破解,随便看看吧 CentOS上安装Tomcat,切换JDK的方法 哥不是间谍,哥只是在找信号!(转贴有意思)
Netcool/OMNIbus Probe脚本编写例子(1)
wishma · 2012-08-29 · via 博客园 - wishma

在存储设备的管理中,日常事件的处理是非常关键的一个工作,下面列举一些常见设备的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($*)
    }