![]() |
![]() |
[ Bottom of Page | Previous Page | Next Page | Contents | Index ]
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
)
).
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')
)
).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 ]