IBM Tivoli Software IBM Tivoli Software

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


General structure of a timer rule

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

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

  event: event_filter,
    where [
      attribute_conditions
    ],

  timer_duration: timer_duration_filter,

  timer_info: timer_info_filter,

  action: action_name: (
    action_body
  )
).

Usage notes

Examples

  1. The following timer rule example sends a mail message to tec_print for assistance with a printing problem, if the problem has persisted past the expiration of a timer set on one of the events shown in the list of the event filter. The expiration of the timer set in example 2 in General structure of a plain rule causes this rule to be evaluated.
    timer_rule: timer_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
      ] ,
    
      action:(
        exec_program(_event,
          'scripts/TEC_Send_Mail.sh',
          '"T/EC - %s: %s" tec_print "The printer %s has the \
    following condition:\n\t%s"',
          [_status, _msg, _hostname, _msg],
          'YES')
      )
    ).
  2. The following timer rule example raises the severity of an event to FATAL that has had a Level 1 timer expire and has not yet been acknowledged or closed. A Level 2 timer is set as part of this rule.
    timer_rule: 'upgrade_level1': (
      
      event: _event of_class 'universal_host'
    
        where [
          status: outside ['CLOSED','ACK']
        ] ,
    
      timer_info: equals 'Level 1',
    
      action: raise_sev: (
        set_event_severity(_event, 'FATAL'),
        set_timer(_event, 90, 'Level 2')
      )
    ).


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