IBM Tivoli Software IBM Tivoli Software

[ Bottom of Page | Previous Page | Next Page | Contents | Index ]


General structure of a plain rule

The following example shows the general structure of a plain rule:

rule: rule_name: (
  description: 'description_text',
  
  directive: directives,

  event: event_filter
    where [
      attribute_conditions
    ],

  action: action_name: (
    action_body
  )
).

Usage notes

Examples

  1. The following plain rule example correlates the clearing of printer problem events with a Printer_Error_Cleared event.
    rule: print_reset :(
    
      event: _event of_class 'Printer_Error_Cleared' 
        where [
          status: equals 'OPEN' ,
          hostname: _hostname
        ] ,
    
      reception_action:(
        all_instances(event: _prt_ev of_class 
          within ['Printer_Paper_Out',
                  'Printer_Toner_Low',
                  'Printer_Offline',
                  'Printer_Output_Full',
                  'Printer_Paper_Jam',
                  'Printer_Door_Open'
          ]
    
          where [hostname: equals _hostname,
                 status: outside ['CLOSED']
          ],
    
          _event - 3600 - 3600 ),
    
        change_event_status( _prt_ev, 'CLOSED' ),
    
        drop_received_event
      )
    ).
  2. The following plain rule example sets a timer for 90 seconds on a printer problem event. If the timer expires and the problem is not fixed, the timer rules (including the one shown in example 1 of General structure of a timer rule) are evaluated.
    rule: print_assist : (
    
      event: _event of_class 
        within ['Printer_Paper_Out',
                'Printer_Toner_Low',
                'Printer_Offline',
                'Printer_Output_Full',
                'Printer_Paper_Jam',
                'Printer_Door_Open'
        ]
    
        where [
          status: _status equals 'OPEN' ,
          hostname: _hostname,
          msg: _msg
        ] ,
    
      reception_action:(
        set_timer(_event, 90, '')
      )
    ).


[ Top of Page | Previous Page | Next Page | Contents | Index ]