Sample message_bus.rules file

A sample message_bus.rules file is provided for reference.


########################################################################
#
#       Licensed Materials - Property of IBM
#       
#       
#       
#       (C) Copyright IBM Corp. 2015. All Rights Reserved
#       
#       US Government Users Restricted Rights - Use, duplication
#       or disclosure restricted by GSA ADP Schedule Contract
#       with IBM Corp.
#
#
#######################################################################


if( match( @Manager, "ProbeWatch" ) )
{
    switch(@Summary)
    {
    case "Running ...":
                    @Severity = 1
                    @AlertGroup = "probestat"
                    @Type = 2
    case "Going Down ...":
                    @Severity = 5
                    @AlertGroup = "probestat"
                    @Type = 1
    case "Start resynchronization" | "Finish resynchronization":
                    @Severity = 2
                    @AlertGroup = "probestat"
                    @Type = 13
    case "Connection to source lost":
                    @Severity = 5
                    @AlertGroup = "probestat"
                    @Type = 1        
    default:
                    @Severity = 1
    }
    @AlertKey = @Agent
    @Summary = @Agent + " probe on " + @Node + ": " + @Summary
}
else
{
    @Manager = %Manager + " probe running on " + hostname()
    @Node = $Node
    @NodeAlias = %Host + ":" + %Port
    @Class = 30505
    
    if (exists($TransformerName))
    {
        switch($TransformerName)
        {
            case "dummy case statement": ### This will prevent syntax errors in case no includes are added below.


                        include "message_bus_netcool.rules"
                        include "message_bus_cbe.rules"
                        include "message_bus_wbe.rules"
                        include "message_bus_wef.rules"
            
            default:
                log(DEBUG, "<<<<< Rules are not supported for this format >>>>")

            @Summary = "Rules are not supported for this format - " + $TransformerName
        }
    }
    else
    {
        log(DEBUG, "<<<<< Entering... message_bus_netcool.rules >>>>>")


        @Manager = %Manager
        @Class = 89210
        @NodeAlias = $NodeAlias
        @Agent = $Agent
        @AlertKey = $sysplex + "." + $system + "." + $subsystem
        @Severity = int($severity)
        @Subsystem = $subsystem
        @Sysplex = $sysplex
        @Url     = $url
        @Evidence = $evidence
        @Sys = $system
        @Node = @Sysplex + "." + @Sys
        @Summary = $evidence + " " + $summary
        #@Summary = $summary
        @StateChange = $StateChange
        #@FirstOccurrence = $FirstOccurrence
        #@LastOccurrence = $LastOccurrence
        #@InternalLast = $InternalLast
        @Poll = $Poll
        @Type = $Type
        @Tally = $Tally
        @Class = $Class
        @Grade = $Grade
        @Location = $Location
        @OwnerUID = $OwnerUID
        @OwnerGID = $OwnerGID
        @Acknowledged = $Acknowledged
        @Flash = $Flash
        @EventId = $EventId
        @ExpireTime = $ExpireTime
        @ProcessReq = $ProcessReq
        @SuppressEscl = $SuppressEscl
        @Customer = $Customer
        @Service = $Service
        @PhysicalSlot = $PhysicalSlot
        @PhysicalPort = $PhysicalPort
        @PhysicalCard = $PhysicalCard
        @TaskList = $TaskList
        @NmosSerial = $NmosSerial
        @NmosObjInst = $NmosObjInst
        @NmosCauseType = $NmosCauseType
        @LocalNodeAlias = $LocalNodeAlias
        @LocalPriObj = $LocalPriObj
        @LocalSecObj = $LocalSecObj
        @LocalRootObj = $LocalRootObj
        @RemoteNodeAlias = $RemoteNodeAlias
        @RemotePriObj = $RemotePriObj
        @RemoteSecObj = $RemoteSecObj
        @RemoteRootObj = $RemoteRootObj
        @X733EventType = $X733EventType
        @X733ProbableCause = $X733ProbableCause
        @X733SpecificProb = $X733SpecificProb
        @X733CorrNotif = $X733CorrNotif
        @ExtendedAttr = $ExtendedAttr
        @ServerName = $ServerName
        @ServerSerial = $ServerSerial
        if (exists($evidence))
        {
            switch(substr($evidence,1,3))
            {
                case "DB2" | "CIC" | "MQM" | "LOG":
                        @AlertGroup = "MLInsight"
                        @AlertKey = $sysplex + "." + $system + "." + $subsystem + "." + @LastOccurrence

                case "DFH" | "DSN" | "CSQ" | "EZZ" | "EZD" | "IVT" | "IST" | "IEA" | "IEF" | "ZLD":
                        @AlertGroup = "SingleMsgInsight"
                        @AlertLogRecord = $alertLogRecord
                default:
                    log(DEBUG, "<<<<< Non-ML evidence value found  >>>>")
            }
        }
        else
        {}


        @Identifier = @Node + " " + @AlertKey + " " + @AlertGroup + " " + @Type + " " + @Agent + " " + @Manager


        log(DEBUG, "<<<<< Leaving... message_bus_netcool.rules >>>>>")
    }
}