Upload
hoangtram
View
217
Download
0
Embed Size (px)
IBM Tivoli Enterprise Console
� ��� ���
�� 3.9
SA30-1983-00
���
IBM Tivoli Enterprise Console
� ��� ���
�� 3.9
SA30-1983-00
���
�!
� ��� � ��� ���� ��� ���� ��, 497 ���� ������� ��� �����.
��(2003� 8�)
� �� � ���� ��� ���� �� �, IBM Tivoli Enterprise Console� �� 3, ��� 9(�� �� 5698-TEC)� ��
�� ���� ���� �����.
© Copyright International Business Machines Corporation 2003. All rights reserved.
��
� �� �� . . . . . . . . . . . . . . xi
� �� �� . . . . . . . . . . . . . xi
� �� �� . . . . . . . . . . . . . . xi
�� . . . . . . . . . . . . . . . . . xii
IBM Tivoli Enterprise Console ����� . . xii
�� �� . . . . . . . . . . . . . . xiii
�� �� ��� . . . . . . . . . . xiv
�� �� . . . . . . . . . . . . . . xiv
����� �� �� . . . . . . . . . . . xv
�� �� �� . . . . . . . . . . . . . xv
� �� ��� �� . . . . . . . . . . . xvi
�� �� . . . . . . . . . . . . . xvi
��� �� �� � �� . . . . . . xvii
IBM Tivoli Enterprise Console ��� . . . . xvii
� 1 � ��� ���� ��� �� . . . 1
� 1 � � �� �� . . . . . . . . . . . 3
� �� . . . . . . . . . . . . . . . . 3
��� . . . . . . . . . . . . . . . . 5
��� ��� . . . . . . . . . . . . . 5
��� ����� ���� ��� �� . . . 5
�� �� �� ����� ��� ��� . . . 7
��� ��� . . . . . . . . . . . . . 7
���� �� � . . . . . . . . . . . . 8
��� ���� ���� ��� �� �. . . . . 8
��� �� . . . . . . . . . . . . . . 10
� . . . . . . . . . . . . . . . . . 11
� ��. . . . . . . . . . . . . . . 11
�� � �� . . . . . . . . . . . . . 13
� �� � . . . . . . . . . . . . . 13
�� � � � � �� �� . . . . . 13
� ��� . . . . . . . . . . . . . . 14
� ��� �� . . . . . . . . . . . 16
� �� � � � . . . . . . . . . . 17
� � �� . . . . . . . . . . . 19
� �� �� . . . . . . . . . . . 20
��� ��� . . . . . . . . . . . 21
� . . . . . . . . . . . . . . . 22
� ��� �� . . . . . . . . . . . 22
� ��� �� ���� . . . . . . . 22
� ��� �� �� . . . . . . . . 22
� ��� �� �� . . . . . . . . 24
� ��� ��� � ��� �� �� . . . 26
� � ��� �� . . . . . . . . . 27
�� � ��� �� . . . . . . . . 28
��� �� � ��� � . . . . . . 28
��� � ��� � . . . . . . . 29
� ���� � �� � BAROC �� �
. . . . . . . . . . . . . . 29
� ��� �� . . . . . . . . . . 30
� ��� �� . . . . . . . . . . 31
� ���� � �� �� . . . . . . 32
� ���� BAROC �� �� . . . . 33
� ��� ��� . . . . . . . . . 34
� ��� �� � ��� . . . . . . 34
�� � ��� � ��� . . . . . . . 36
� ���� �� UNIX ��� �� . . . 36
� ���, ��� � . . . . . . . . 37
�� ��� � ��. . . . . . . . . . 37
�� � ��� �� . . . . . . . . 37
��� � ���� ��� �� . . . . . 38
exec_program � exec_program_local
��� ��� �� . . . . . . . . . 38
exec_task � exec_task_local �� ��
��� . . . . . . . . . . . . . 38
UTF-8 ��� � �� � ��� ��
� . . . . . . . . . . . . . . 38
� 2 � ��� ��� ��. . . . . . . . . 41
��� ��� �� . . . . . . . . . . . . 41
��� ��� �� . . . . . . . . . . . . 43
��� �� �� . . . . . . . . . . . . 44
�� �� . . . . . . . . . . . . . . 44
�� ��� �� . . . . . . . . . . . 45
�� ��(facet) . . . . . . . . . . . . 46
�� . . . . . . . . . . . . . . . . . 47
�� �� . . . . . . . . . . . . . . 49
�� . . . . . . . . . . . . . . . 50
��� ��� �� �� �� � �� ���
� . . . . . . . . . . . . . . . . . 51
root.baroc � tec.baroc �� �� . . . . . . 51
��� BAROC �� ��� . . . . . . . . 51
�� ��� BAROC �� . . . . . . . . 52
© Copyright IBM Corp. 2003 iii
� 3 � � �� �� . . . . . . . . . . . 53
��� ��� � �� . . . . . . . . . . 53
��� �� . . . . . . . . . . . . . . 53
�� � �� . . . . . . . . . . . 55
�� ���� �� . . . . . . . . . . . 55
� �. . . . . . . . . . . . . . . . 55
� 4 � � �� �� . . . . . . . . . . . 57
�� �� �� . . . . . . . . . . . . . 57
�� . . . . . . . . . . . . . . . . . 58
�� �� . . . . . . . . . . . . . . 59
��� �� . . . . . . . . . . . . . 59
��� �� �� . . . . . . . . . . 60
�� . . . . . . . . . . . . . . . . . 60
� . . . . . . . . . . . . . . . . . 61
� ��. . . . . . . . . . . . . . . . 61
� � � �� . . . . . . . . . . 61
� �� �� �� . . . . . . . . . . 61
��� ���� . . . . . . . . . . . 62
� . . . . . . . . . . . . . . . 62
�� �� �� �� . . . . . . . . . . 63
��� ���� . . . . . . . . . . . 63
� . . . . . . . . . . . . . . . 63
�� �� �� ��. . . . . . . . . . 64
��� ���� . . . . . . . . . . . 64
� . . . . . . . . . . . . . . . 65
� �� �� �� . . . . . . . . . . 66
��� ���� . . . . . . . . . . . 66
� . . . . . . . . . . . . . . . 68
�� �� �� �� . . . . . . . . . . 68
��� ���� . . . . . . . . . . . 68
� . . . . . . . . . . . . . . . 69
�� . . . . . . . . . . . . . . . . 69
��� �� . . . . . . . . . . . . 70
�� �� . . . . . . . . . . . . 73
�� � �� . . . . . . . . . . . . 74
�� �� . . . . . . . . . . . 74
�� �� �� . . . . . . . . . . 75
�� � �� . . . . . . . . . . . 76
timer_info �� . . . . . . . . . . 76
timer_duration �� . . . . . . . . 77
�� . . . . . . . . . . . . . . . . 78
�� �� . . . . . . . . . . . . . 78
��� . . . . . . . . . . . . . . 80
� �� � . . . . . . . . . . . . . . 81
� �� �� �� �� . . . . . . . . 81
��� �� . . . . . . . . . . . . 81
��� �� � . . . . . . . . . . 82
��� ���� . . . . . . . . . . 83
� ��� . . . . . . . . . . . 83
��� �� . . . . . . . . . . . . 84
BAROC �� . . . . . . . . . . . 84
��� � . . . . . . . . . . . . 84
��� � . . . . . . . . . . . . 85
��� . . . . . . . . . . . . . . 85
�� � � . . . . . . . . . . . . 85
��� �� . . . . . . . . . . . . 86
�� �� . . . . . . . . . . . . . 86
��� � ��� �� . . . . . . . . 87
�� � �� �� . . . . . . . . . . 87
�� �� . . . . . . . . . . . . . 88
��� . . . . . . . . . . . . . . 88
� �� �� �� � . . . . . . . 88
add_to_repeat_count . . . . . . . . . 89
all_clear_targets . . . . . . . . . . . 90
all_duplicates . . . . . . . . . . . 91
all_instances . . . . . . . . . . . . 93
any_clear_target . . . . . . . . . . 94
any_clearing_event . . . . . . . . . . 95
attr_condition . . . . . . . . . . . 96
attr_exception . . . . . . . . . . . 98
attr_sequence . . . . . . . . . . . 99
bo_add_at_slotval_begin . . . . . . . 100
bo_add_at_slotval_end . . . . . . . . 101
bo_get_class_of . . . . . . . . . . 102
bo_get_class_slots . . . . . . . . . 103
bo_get_enum_options . . . . . . . . 105
bo_get_slotval . . . . . . . . . . . 106
bo_is_defined_for_class . . . . . . . 107
bo_is_direct_super_of . . . . . . . . 108
bo_is_super_of . . . . . . . . . . 109
bo_remove_from_slotval . . . . . . . 110
bo_reset_default_slotval . . . . . . . 111
bo_set_slotval . . . . . . . . . . . 112
cancel_all_timers . . . . . . . . . . 113
cancel_timer . . . . . . . . . . . 114
change_event_administrator . . . . . . 116
change_event_severity . . . . . . . . 117
change_event_status . . . . . . . . . 118
check_all_thresholds . . . . . . . . . 119
check_and_increment_count . . . . . . 120
check_event_criteria . . . . . . . . . 122
check_threshold . . . . . . . . . . 124
iv IBM Tivoli Enterprise Console: � �� ���
clear_closed_events . . . . . . . . . 126
clears . . . . . . . . . . . . . . 127
commit_action . . . . . . . . . . . 129
commit_rule . . . . . . . . . . . 130
commit_set . . . . . . . . . . . . 131
convert_ascii_time . . . . . . . . . 132
convert_gm_time . . . . . . . . . . 133
convert_local_time . . . . . . . . . 134
create_cache_search_criteria . . . . . . 135
create_clearing_event . . . . . . . . 137
create_event_criteria . . . . . . . . . 140
create_event_sequence . . . . . . . . 143
create_threshold . . . . . . . . . . 148
decrement_slot . . . . . . . . . . . 150
drop_change_request . . . . . . . . 151
drop_received_event . . . . . . . . . 152
erase_globals . . . . . . . . . . . 153
exec_program . . . . . . . . . . . 154
exec_program_local . . . . . . . . . 156
exec_task . . . . . . . . . . . . 160
exec_task_local . . . . . . . . . . 163
first_causal_event . . . . . . . . . . 167
first_duplicate . . . . . . . . . . . 169
first_effect_event . . . . . . . . . . 171
first_instance . . . . . . . . . . . 173
first_related_event . . . . . . . . . 175
forward_event . . . . . . . . . . . 177
generate_event . . . . . . . . . . . 178
get_attributes . . . . . . . . . . . 179
get_config_param . . . . . . . . . . 180
get_global_grp . . . . . . . . . . . 181
get_global_var . . . . . . . . . . . 182
get_globals . . . . . . . . . . . . 183
get_gm_time . . . . . . . . . . . 184
get_local_time . . . . . . . . . . . 185
get_time . . . . . . . . . . . . . 186
global_exists . . . . . . . . . . . 187
increment_slot . . . . . . . . . . . 188
init_count . . . . . . . . . . . . 189
init_event_activity . . . . . . . . . 191
ip_node_unreachable . . . . . . . . 194
is_clearing_event . . . . . . . . . . 195
link_effect_to_cause . . . . . . . . . 196
load_globals . . . . . . . . . . . 197
log_error . . . . . . . . . . . . . 198
place_change_request . . . . . . . . 200
print_cache . . . . . . . . . . . . 201
print_class_tree . . . . . . . . . . 202
print_event_activity . . . . . . . . . 203
re_after_match . . . . . . . . . . . 204
re_before_match . . . . . . . . . . 205
re_create . . . . . . . . . . . . . 206
re_mark_as_modified . . . . . . . . 207
re_match . . . . . . . . . . . . . 208
re_search_string . . . . . . . . . . 209
re_send_event_conf . . . . . . . . . 210
re_split_event_id . . . . . . . . . . 211
re_substitute . . . . . . . . . . . 213
re_substitute_global . . . . . . . . . 214
redo_analysis . . . . . . . . . . . 215
remove_bslashes . . . . . . . . . . 216
reset_event_activity . . . . . . . . . 217
reset_global_grp . . . . . . . . . . 218
resolve_time . . . . . . . . . . . 219
save_globals . . . . . . . . . . . 221
search_cache . . . . . . . . . . . 222
set_detailed_debugging . . . . . . . . 224
set_event_administrator . . . . . . . . 226
set_event_message . . . . . . . . . 227
set_event_severity . . . . . . . . . 230
set_event_status . . . . . . . . . . 231
set_global_var . . . . . . . . . . . 232
set_log_error_source . . . . . . . . . 233
set_timer . . . . . . . . . . . . . 234
trace_it . . . . . . . . . . . . . 236
unlink_from_cause . . . . . . . . . 237
update_event_activity . . . . . . . . 238
� 5 � �� �� . . . . . . . . . . . 239
��� �� � �� �� . . . . . . . . 239
� �� �� �� ��� �� . . . . . 241
�� ���� �� �� �� ��� 241
��� ��� �� ��� . . . . . . . 241
� �� �� �� . . . . . . . . . . . 242
� ��� . . . . . . . . . . . . . 242
� ��� . . . . . . . . . . . . . 242
��� ��� . . . . . . . . . . . . 243
� ��� ��� ��� �� . . . . . . 243
� ��� �� . . . . . . . . . . 244
� ��� �� . . . . . . . . . . 244
��� ��� �� . . . . . . . . . 245
��� �� � �� � . . . . . . . . . 245
��� �� �� �� . . . . . . . . . 246
�� v
��� � � � . . . . . . . . 246
��� �� ��� ���� �� ��� �� 247
�� �� . . . . . . . . . . . . . 248
��� �� �� �� . . . . . . . . 248
��� �� � . . . . . . . . . . . 249
process_problem_events � . . . . . 249
process_clearing_event � . . . . . . 251
�� � . . . . . . . . . . . 252
� 6 � � ���, �� � ���� . . . . . 255
� ��� . . . . . . . . . . . . . . 255
���� ��� ��� . . . . . . . . . 255
tec_agent_demo ����� ��� ��� 255
tec_agent_demo ��� ��� �� ��
���� . . . . . . . . . . . . . 255
tec_agent_demo ��� �� . . . . . 256
SendEvents ����� ��� ��� . . . 257
�� ��� ����� ��� �� �� . . . 257
� �� . . . . . . . . . . . . . . . 259
�� �� . . . . . . . . . . . . . 259
� �� �� . . . . . . . . . . . 259
� �� . . . . . . . . . . . . . 260
�� �� . . . . . . . . . . . . . 260
� �� �� . . . . . . . . . . . . 260
� ��� �� �� . . . . . . . . . 261
� �� �� . . . . . . . . . . . 262
�� � � ��� �� �� . . . 263
� ����� . . . . . . . . . . . . . 264
���� �� . . . . . . . . . . . . 265
� �� ����� . . . . . . . . . 265
� ����� . . . . . . . . . . . 265
��� �� � �� . . . . . . . . . . 266
� 7 � ��� � ��� � �� . . . . . . 269
� �� �� . . . . . . . . . . . . . 269
�� ��� ��� � �� ���� . . . . 270
� �� �� . . . . . . . . . . . . . 270
� �� �� . . . . . . . . . . . . 272
�� � ��� �� . . . . . . . . . . 273
� � �� �� . . . . . . . . . . . 273
� �� �� . . . . . . . . . . . . 275
� � �� . . . . . . . . . . . . 275
�� � �� . . . . . . . . . . . . 285
� �� �� . . . . . . . . . . . . 291
� ��� ��� . . . . . . . . . . . 292
��� �� � � ��� . . . . . . . 294
� �� �� . . . . . . . . . . . . . 295
������ policy �� . . . . . . . . 295
���. . . . . . . . . . . . . . 295
�. . . . . . . . . . . . . . 295
��� �� �� . . . . . . . . . 295
� �� . . . . . . . . . . . . 296
UNIX ����� ��� �� �� ���
� . . . . . . . . . . . . . . . . 299
���. . . . . . . . . . . . . . 299
�. . . . . . . . . . . . . . 300
� ��� �� . . . . . . . . . 300
� �� . . . . . . . . . . . . 300
� ���� � ���� �� . . . . . 303
���. . . . . . . . . . . . . . 303
�. . . . . . . . . . . . . . 303
� ���� ��� �� . . . . . . 303
� �� . . . . . . . . . . . . 304
�� ��� �� . . . . . . . . . . . 307
���. . . . . . . . . . . . . . 307
�. . . . . . . . . . . . . . 308
� 2 � ����� �� ����� ��
� �� . . . . . . . . . . . . . . 309
� 8 � �� �� ��� �� � �� . . . . 311
�� �� � . . . . . . . . . . . . . 311
� . . . . . . . . . . . . . . . 312
�� . . . . . . . . . . . . . . . 313
���. . . . . . . . . . . . . . 313
TECSummary . . . . . . . . . . . 313
�� . . . . . . . . . . . . . . 314
SendTECEvent . . . . . . . . . . 316
�� �� � �� . . . . . . . . . 316
�� � . . . . . . . . . . . . . . 317
� � . . . . . . . . . . . . . . 317
��� � . . . . . . . . . . . . . 318
�� � . . . . . . . . . . . . . 321
� � . . . . . . . . . . . . . . 322
�� � ��� �. . . . . . . . . . . 324
�� �� �� . . . . . . . . . . . . 326
�� �� �� �� . . . . . . . . . . 327
��� ���� . . . . . . . . . . . 327
�� �� . . . . . . . . . . . . . 328
���� �� � . . . . . . . . . . 330
��� �� . . . . . . . . . . . . . 331
��� ��� . . . . . . . . . . . . 332
�� ��� �� . . . . . . . . . . . 332
vi IBM Tivoli Enterprise Console: � �� ���
��� �� �� . . . . . . . . . . 332
��� ��� � �� �� . . . . . . 334
� 9 � �� �� �� . . . . . . . . . 337
� �� . . . . . . . . . . . . . . . 337
�� � . . . . . . . . . . . . . 337
�� � �� . . . . . . . . . . . 339
�� � �� . . . . . . . . . . . 340
� � �� . . . . . . . . . . . 341
��� � �� . . . . . . . . . . . 342
� � �� . . . . . . . . . . . 342
�� � ��� � �� . . . . . . . . 343
�� �� . . . . . . . . . . . . . 344
� ����� . . . . . . . . . . . . 346
� �� . . . . . . . . . . . . . . 346
�� . . . . . . . . . . . . . . . 346
�� ��� � � � . . . . . . . . . 347
�� � . . . . . . . . . . . . . 347
== . . . . . . . . . . . . . . . 347
!= . . . . . . . . . . . . . . . 348
> . . . . . . . . . . . . . . . 348
< . . . . . . . . . . . . . . . 349
>= . . . . . . . . . . . . . . . 349
<= . . . . . . . . . . . . . . . 349
�� � . . . . . . . . . . . . . 350
+ . . . . . . . . . . . . . . . 350
- . . . . . . . . . . . . . . . 351
* . . . . . . . . . . . . . . . 351
/ . . . . . . . . . . . . . . . 351
absolute . . . . . . . . . . . . . 352
max . . . . . . . . . . . . . . 352
min . . . . . . . . . . . . . . 353
mod . . . . . . . . . . . . . . 353
negate . . . . . . . . . . . . . 353
numOfEvents . . . . . . . . . . . 354
range . . . . . . . . . . . . . . 354
timeNow . . . . . . . . . . . . . 354
timeSpan . . . . . . . . . . . . 355
� � . . . . . . . . . . . . . 355
== . . . . . . . . . . . . . . . 355
!= . . . . . . . . . . . . . . . 356
> . . . . . . . . . . . . . . . 356
>= . . . . . . . . . . . . . . . 357
< . . . . . . . . . . . . . . . 357
<= . . . . . . . . . . . . . . . 357
� � . . . . . . . . . . . . . 358
+ . . . . . . . . . . . . . . . 358
- . . . . . . . . . . . . . . . 359
* . . . . . . . . . . . . . . . 359
/ . . . . . . . . . . . . . . . 359
absolute . . . . . . . . . . . . . 360
max . . . . . . . . . . . . . . 360
min . . . . . . . . . . . . . . 360
negate . . . . . . . . . . . . . 361
range . . . . . . . . . . . . . . 361
� � . . . . . . . . . . . . . 362
== . . . . . . . . . . . . . . . 362
!= . . . . . . . . . . . . . . . 362
> . . . . . . . . . . . . . . . 363
>= . . . . . . . . . . . . . . . 363
< . . . . . . . . . . . . . . . 363
<= . . . . . . . . . . . . . . . 364
contains . . . . . . . . . . . . . 364
endsWith . . . . . . . . . . . . 365
ignorecase equal . . . . . . . . . . 365
ignorecase not equal . . . . . . . . 365
startsWith . . . . . . . . . . . . 366
� � . . . . . . . . . . . . . 366
concat . . . . . . . . . . . . . 367
dayOfWeek . . . . . . . . . . . . 367
dayOfWeekString . . . . . . . . . . 368
existRuleId . . . . . . . . . . . . 368
getEventType . . . . . . . . . . . 369
hourOfDay . . . . . . . . . . . . 369
length . . . . . . . . . . . . . . 370
month . . . . . . . . . . . . . 370
monthString . . . . . . . . . . . 371
substring . . . . . . . . . . . . . 371
toUpperCase . . . . . . . . . . . 372
toLowerCase . . . . . . . . . . . 372
trim . . . . . . . . . . . . . . 372
IP �� � . . . . . . . . . . . . 373
== . . . . . . . . . . . . . . . 373
!= . . . . . . . . . . . . . . . 373
� �� � . . . . . . . . . . . 374
== . . . . . . . . . . . . . . . 374
!= . . . . . . . . . . . . . . . 374
areDisjoint . . . . . . . . . . . . 375
isMemberOf . . . . . . . . . . . 375
isSubsetOf . . . . . . . . . . . . 375
� �� � . . . . . . . . . . . 376
intersect . . . . . . . . . . . . . 376
join . . . . . . . . . . . . . . 376
�� vii
previousValues . . . . . . . . . . 377
�� � . . . . . . . . . . . . . 377
and . . . . . . . . . . . . . . 377
not . . . . . . . . . . . . . . . 378
or . . . . . . . . . . . . . . . 378
�� �� � . . . . . . . . . . . . 378
isMemberOf . . . . . . . . . . . 378
IP �� �� � . . . . . . . . . . 379
isMemberOf . . . . . . . . . . . 379
�� �� ��� . . . . . . . . . . . . 379
� 3 � �� . . . . . . . . . . . . 383
�� A. ���� Prolog �� . . . . . . . 385
Prolog � �� �� . . . . . . . . . 385
�� � . . . . . . . . . . . . . . 385
� . . . . . . . . . . . . . . . . 385
�� . . . . . . . . . . . . . . . 386
� . . . . . . . . . . . . . . . . 386
�� �� . . . . . . . . . . . . . 387
� . . . . . . . . . . . . . . . 388
��� �� � �� . . . . . . . . . . 388
BAROC� Prolog �� ��� �� � 389
Tivoli Enterprise Console ���� Prolog �
� �� . . . . . . . . . . . . . . 389
Prolog � � ��� �� �� . . . . . . 391
���� � ��. . . . . . . . . . 391
��� �� � �� ���� ��� . . . 391
��� �� �� . . . . . . . . . . . 392
� �� . . . . . . . . . . . . . 392
� �� . . . . . . . . . . . 392
� . . . . . . . . . . . . . . 393
�� . . . . . . . . . . . . . . 393
�� �� . . . . . . . . . . . . . 393
��� � � . . . . . . . . . . . . 394
� � � . . . . . . . . . . . . 394
� . . . . . . . . . . . . 394
��� �� . . . . . . . . . . . 394
� � . . . . . . . . . . . . 395
�� . . . . . . . . . . . . . . 395
�� �� . . . . . . . . . . . . . 395
I/O . . . . . . . . . . . . . . . . 396
�� � � ��� �� �� . . . . . 396
+ . . . . . . . . . . . . . . . . 397
-(� �� ��) . . . . . . . . . . 398
-(� ��) . . . . . . . . . . . . 400
-(�� ��) . . . . . . . . . . . . . 402
-(��) . . . . . . . . . . . . . . 403
* . . . . . . . . . . . . . . . . 404
/ . . . . . . . . . . . . . . . . 405
// . . . . . . . . . . . . . . . . 406
@< . . . . . . . . . . . . . . . 407
@=< . . . . . . . . . . . . . . . 408
@> . . . . . . . . . . . . . . . 409
@>= . . . . . . . . . . . . . . . 410
\== . . . . . . . . . . . . . . . 411
+(� �� ���) . . . . . . . . . 412
< . . . . . . . . . . . . . . . . 414
= . . . . . . . . . . . . . . . . 415
=:= . . . . . . . . . . . . . . . 416
=? . . . . . . . . . . . . . . . . 417
=\= . . . . . . . . . . . . . . . 418
=< . . . . . . . . . . . . . . . . 419
== . . . . . . . . . . . . . . . . 420
> . . . . . . . . . . . . . . . . 421
>= . . . . . . . . . . . . . . . . 422
abolish . . . . . . . . . . . . . . 423
append . . . . . . . . . . . . . . 424
ascii . . . . . . . . . . . . . . . 425
assert . . . . . . . . . . . . . . . 426
atom . . . . . . . . . . . . . . . 429
atomic . . . . . . . . . . . . . . 430
atomlength . . . . . . . . . . . . . 431
atompart . . . . . . . . . . . . . . 432
atomconcat . . . . . . . . . . . . . 434
atomtolist . . . . . . . . . . . . . 436
compile . . . . . . . . . . . . . . 437
consult . . . . . . . . . . . . . . 439
delete . . . . . . . . . . . . . . . 440
disjoint . . . . . . . . . . . . . . 441
empty_list . . . . . . . . . . . . . 442
fclose . . . . . . . . . . . . . . . 443
flisting . . . . . . . . . . . . . . 444
fopen . . . . . . . . . . . . . . . 445
ground . . . . . . . . . . . . . . 446
int_to_hex . . . . . . . . . . . . . 447
integer . . . . . . . . . . . . . . 448
intersect . . . . . . . . . . . . . . 449
inttoatom . . . . . . . . . . . . . 450
is . . . . . . . . . . . . . . . . 451
is_list . . . . . . . . . . . . . . . 452
length . . . . . . . . . . . . . . . 453
lowertoupper . . . . . . . . . . . . 454
viii IBM Tivoli Enterprise Console: � �� ���
member . . . . . . . . . . . . . . 455
name . . . . . . . . . . . . . . . 456
nmember . . . . . . . . . . . . . 458
nmembers . . . . . . . . . . . . . 459
not . . . . . . . . . . . . . . . . 460
number . . . . . . . . . . . . . . 461
pointer . . . . . . . . . . . . . . 462
pointeroffset . . . . . . . . . . . . 463
pointertoatom . . . . . . . . . . . . 464
pointertoint . . . . . . . . . . . . . 465
printf . . . . . . . . . . . . . . . 466
read . . . . . . . . . . . . . . . 468
readln . . . . . . . . . . . . . . . 469
real(�� ��) . . . . . . . . . . . . 470
real(�� �� ���) . . . . . . . . . 471
realtoatom . . . . . . . . . . . . . 472
reconsult . . . . . . . . . . . . . . 473
remove_dups . . . . . . . . . . . . 474
retract . . . . . . . . . . . . . . 475
round . . . . . . . . . . . . . . . 476
rremove . . . . . . . . . . . . . . 477
sort . . . . . . . . . . . . . . . 478
sprintf . . . . . . . . . . . . . . 479
strip . . . . . . . . . . . . . . . 482
subset . . . . . . . . . . . . . . . 484
substring . . . . . . . . . . . . . . 485
subtract . . . . . . . . . . . . . . 486
term_type . . . . . . . . . . . . . 487
union . . . . . . . . . . . . . . . 488
write . . . . . . . . . . . . . . . 489
Tivoli Enterprise Console � ���� ���
� � �� �� . . . . . . . . . . . 490
����� � � �� ��. . . . . . . 490
TEC_Start ���� � assert � �� . . 490
Prolog ���� �� . . . . . . . . . . 491
Prolog ���� �� �� . . . . . . . 492
�� B. BAROC ��� BNF �� . . . . . 493
�� . . . . . . . . . . . . . . . 493
��. . . . . . . . . . . . . . . . 493
���� . . . . . . . . . . . . . . . 497
�� . . . . . . . . . . . . . . . . 499
�� . . . . . . . . . . . . . . . . 501
�� ix
x IBM Tivoli Enterprise Console: � �� ���
� �� ��
IBM® Tivoli Enterprise Console® ��� ��, ����, ������ � ���
�� ��� ��� � � IT ��� �� ��� ���� ���� � ��
� ��� �� ��������. IBM Tivoli Enterprise Console � �� ��
�� ��� ���� Prolog ��� ���� ����� �� ����� XML �
�� �� �� ��� ����, Tivoli Enterprise Console ���� ���� ��
�� ���� ��� �����.
Tivoli Enterprise Console ��� ��� � ��� �� ���� � �� ���
�, � ���� ��� ���� �� ���� � �� ��� ���. ���
� ��� � �� ���� ��� ����, �� �� �� �����
Tivoli Enterprise Console � ��� �� ��� ���.
Tivoli Enterprise Console ��� ��� ���� � � �� �� �� �
� � �� ��� �����. �� ��� IBM Tivoli Enterprise Console �
�� ���� ������.
� �� ���
� �� Tivoli Enterprise Console ���, ����� �� ��� ���� Tivoli
Enterprise Console ���� �� ���� �� �� ���� ������
��. � �� ��� ��� �� ��� � ���.
v UNIX® � Windows® ��
v Shell �����
v Tivoli Enterprise Console �
v XML(Extensible Markup Language)
� �� ��
� �� � �� ��� ����.
� 1 � -- ��� ���� ��� ��
� 1 ���� Tivoli Enterprise Console ��� ���� ���� Prolog �� �
��� ���� �� ���� �� �� �����. Prolog ��� �� ��
� ���� �� ��������� ��� � ��� ��� ��� �� ��� �
� � ��� �� � ���. Prolog ��� �� �� Prolog� ��� � �
�� �����.
© Copyright IBM Corp. 2003 xi
� 2 � -- ����� �� ����� ��� ��
� 2 ���� Tivoli Enterprise Console ����� �� ����� ���� XML
�� �� �� ��� ���� �� ���� �� �� �����. �� �� �
�� ���� ��� �� �� � �� ���� ���� ��� ��� ���
���� ��� �� � ���. �� �� ��� �� �� Java ���� �
� � ��� � XML� �����.
� 3 � -- ��
� 3 ��� �� � ����� �� ��� ���. � ���� ��� Prolog
��� ���� �� �� ��� ��� ���� ���� � ���� BAROC �
�� �� ��� �� ��� ���.
��
� ��� IBM Tivoli Enterprise Console ����� � ��� ��� ��� �
���. Tivoli® ��� ���� ����� � � Tivoli ��� ���� �
� ���� �����.
IBM Tivoli Enterprise Console �����
�� ��� IBM Tivoli Enterprise Console ������� � � ���.
v IBM Tivoli Enterprise Console ��� ���, SA30-1980
���� ���� ��� �� � �� �� �� ��� �����.
v IBM Tivoli Enterprise Console �� � ��� ���, SA30-1982
IBM Tivoli Enterprise Console ��, ��� ������ ��� ����� �
�� � ���� �� ���� ���� �� � � �� ��� �� ��
��� �����.
v IBM Tivoli Enterprise Console �� ���, SA30-1981
IBM Tivoli Enterprise Console ��� ��, ���� � �� ��� ��
�� �����.
v IBM Tivoli Enterprise Console ���� ��, SA30-1985
��� ��� �� ���� ��� �� ��� �����.
v IBM Tivoli Enterprise Console � �� ���, SA30-1983-00
��� �� � �� ��� ��� �� � �� � � �� �� ���
��.
v IBM Tivoli Enterprise Console � �� ���, SA30-2102
IBM Tivoli Enterprise Console � ��� �� �� ��� �����.
v IBM Tivoli Enterprise Console �� ���, SA30-1984
xii IBM Tivoli Enterprise Console: � �� ���
IBM Tivoli Enterprise Console ��� ��� ����, IBM Tivoli Enterprise
Console ��� ���� ���� ���� ���� �� �� �����.
v IBM Tivoli Enterprise Console Warehouse Enablement Pack: Implementation
Guide, SC32-1236
IBM Tivoli Enterprise Console ��� ����� ���� �� �� � ��
�� �� ����� �� ���� ��� ��� � ��� �� �����.
v Tivoli ��� � � ���, SA30-1979
��� ���� ��� ������� �� ��� �� ��� �� ���
��� ���� ���� �� �� �����. �� ���� ���� ���
�� �� �� �����.
�� ��
Tivoli Software Glossary�� Tivoli ������ ��� �� � ��� �� �
�� �� ���. Tivoli Software Glossary� �� Tivoli � ����� ��
�����.
http://www.ibm.com/software/tivoli/library/
Tivoli ����� ����� �� �� ��� Glossary ��� � ��� �
������.
�� ��� � �� �� ���� � ��� �� �� �����. � ��
IBM Tivoli Enterprise Console � �� ���� �� �� �� � ��
�. � ��� �� �� �� ��� ���, IBM� � ��� �� ��� �
��� ���� ����� ���� ����.
v Programming Rules for the Tivoli Enterprise Console
IBM ��� ���� ���� � � ��� Tivoli Enterprise Console � �
�� ��� � ��� �� ��� ����. ���� ���� �� �� �
�����, � ��� �� ��, �� �� ��� � � � � ���
� ���� �� ��� �� �� �� ���. �� ��� Tivoli Worldwide
Education � ���(http://www.ibm.com/tivoli/education/)� �����.
v EMMD(Event Management and Monitoring Design Methodology)
EMMD(Event Management and Monitoring Design Methodology)� IBM ��
� ��� �� ������. Tivoli ����� ���� Tivoli ��� ��
� � � �� ��� �� ��� �����. EMMD� ��� ���
Distributed Monitoring ����� �� ��� �� ��� ��� ��
� � ���. � � ���� ��� IBM ���� ��� �
� �� �� xiii
�-�-�� ��� �� �� ��� ����, ��� ���, ��� �� � �
�� ��� �� �� ��� ��� �����. �� ��� wwibmtiv@us.
ibm.com�� IBM� ������.
v �, BAROC ��� �� �� � ��� �� ��� $BINDIR/TME/TEC/
samples/correlation ���� ��� �� ����� �� ����.
v TEC Rule Writing by Example
� �� �� � �� �� ���� �� ���� � � ����, � ��
� �� ���� �� �� �� ��� �����. � �� �� Orb Data
Limited� Giles McGarry�� http://www.orb-data.com�� PDF ���� ��
����.
v Clause and Effect: Prolog Programming for the Working Programmer, W. F.
Clocksin, ISBN 3-540-62971-8.
v Programming in Prolog, 4th Ed., W. F. Clocksin and C. S. Mellish, ISBN
0-387-58350-5.
v Prolog Programming in Depth, M. A. Covington, D. Nute, and A. Vellino,
ISBN 0-13-138645-X.
��� �� ���
�� CD�� �� ������ � �� ��� �� ���. ��� ��� PDF,
HTML �� �� ���� �� ���. ��� ����� �� ��� CD�
readme ��� ������.
IBM� � CD� �� �� Tivoli ��� ��� �� ��� �� ��� ��
� Tivoli Software Information Center � ���� �����. �� � ��� Tivoli
����� ������ �� ��� Tivoli Software Information Center� ��
�����.
http://www.ibm.com/software/tivoli/library/
��� ��� ��� Product manuals ��� �����. Tivoli Technical
Product Documents Alphabetical Listing ��� IBM Tivoli Enterprise Console
��� � Tivoli Information Center� �� ������ �������.
�: �� �� ��� ��� PDF ��� ��� ��, Adobe Acrobat � ��
� ���� ��� � �� � ����. �� → ��� ��� � ��� ��
� ���. ���� ���� �� �� ���� �� �� ���� �
��� ���� ���.
�� ��
�� � ����� ���� Tivoli ��� �� � ���.
xiv IBM Tivoli Enterprise Console: � �� ���
http://www.elink.ibmlink.ibm.com/public/applications/publications/
cgibin/pbi.cgi
�� ��� �� ��� ��� �� � ���.
v ���: [email protected]
v �� ��..� �����: 080-023-8080
����� �� ��
Tivoli ��� ��� � ��, �� IBM Software Support � ���� ����
��.
http://www.ibm.com/software/sysmgmt/products/support/
Software Support� �����, �� � ����� IBM Software Support Guide
� ������.
http://techsupport.services.ibm.com/guides/handbook.html
� ��� ���� ���� �� IBM Software Support�� �� � � ���
�� ��� �����.
v �� � ���
v ��� �� ��� ���� � � �� ��
v IBM Software Support� ��� ���� �� �� ��
�� �� ��
�� ��� ��� ��, �� � �� � ��� ��� ��� ���� ��
�� � ����� ���� �����. �� ��� ��� �� � ��
�� ���� � �� � ���. � ��� �� �� �� �� ��
���� �� �� ��� ���� ����.
����� ������ �� ��� �����.
Microsoft Internet Explorer ����� ��, �� ��� �����.
1. Internet Explorer ����� ����.
2. �� ���� ��� ��� �����.
3. �� �� ��� ���� �� �����.
4. �� �� ���� ��� ���� �� �� Outlook Express� �����.
5. ��� �����.
6. Internet Explorer ����� �� �� �� ����.
� �� �� xv
7. ��� �� �� ��� ���� ����� �� ��� ���� Enter� �
�� ��� ����.
Netscape Navigator ����� ��, �� ��� �����.
1. Netscape Navigator ����� ����.
2. �� ���� �� ��� �����. �� �� �� �����.
3. ���� ����, ��� ����� � ��� ���� ��� ������.
4. Netscape� �� �� ����� �� � �� � ����.
5. ��� �����.
6. Netscape Navigator ����� �� �� �� ����.
7. ��� �� �� ��� ���� ����� �� ��� ���� Enter� �
�� ��� ����.
IBM Tivoli Enterprise Console:
news://news.software.ibm.com/ibm.software.tivoli.enterprise-console
UNIX� IBM Tivoli NetView® � Windows IBM Tivoli NetView:
news://news.software.ibm.com/ibm.software.tivoli.netview-unix-windows
� �� ��� ��
� ���� �� ��� ��, ��� �� ��� �� � �� ���� ��
�� ��� �����.
��� ��
� ���� �� �� ��� �����.
��
v �� ���� ��� �� �� �� � ��� �� ��
v ���� ��(� �, �� �, � � �, �� �, ��, �,
���, �� �, �� �� ��, � �� ��, ���, �� �
��, �� ��, �, �� ��), ���(�� ��, �: � �� ��
��:)
v ���� �� ��
v ���� ��� � ����
xvi IBM Tivoli Enterprise Console: � �� ���
����
v ��(��, ��� � CD� ��)
v ���� ��� �
v �� �(��)
v � ���� �
v ���� � ��(�� ����� ��)
v ��� ��� �� �� � �
������
v �� � �� ��
v �� ��, ����� ��� � �� ���� ��� �� �� ��
v ���� ��� ��� ��� � ����
v ��� ��� �� ���
v �� �� �� � �
�� ��� �� �� � ��
� ���� �� �� � ��� ���� ���� �� UNIX ��� ����
�.
Windows ���� �� ���, �� ��� $variable� % variable%� ���
� ��� ��� ��(/)� ���(\)� ������.
�: Windows ���� bash � ���� � ��, UNIX ��� �� �
���.
IBM Tivoli Enterprise Console ���
��� IBM Tivoli Enterprise Console ��� ���� ������.
��� ��
��� ��
�� ���� ��� ��� �� �� �����.
�� � ���� ��� ��� ���� �� �����.
� ���
�� ���� � ���� �� �� �����.
� �� �� xvii
��� ��
����
����� ������ ���� �����.
xviii IBM Tivoli Enterprise Console: � �� ���
� 1 � ��� ���� ��� ��
© Copyright IBM Corp. 2003 1
2 IBM Tivoli Enterprise Console: � �� ���
� 1 � � �� ��
� �� ��� ���� ��� ���� ���� �� ��� �� �����.
��� � ���� � ��� ��� �� � ����. Tivoli Enterprise
Console� ��� ��� ��� ���� ����� ��� �� �� ��� ��
�� � ����� ��� �� �� ��� �����.
���� ���� �� �� ���� ��� �� ����. Tivoli Enterprise
Console� ��� ���� �� �� �� ���� �� ��� �� �
���. �� ��(�: � �� �(���� ��� � � �� ���)� �
���, ��� ��� �� �� ����, ���� ���� �� �� ��
� ���.
��� ���� � ��, IBM Tivoli Enterprise Console �� � � ���
� ���� ���� ���� ��� ��� ���� ����. ���� �
� ��� ��� ���� ��, ��� � � ������� �� ���� �
���� ���� ���. ������� �� ��� �� �� ��� �
�� ��� ��� ���� ��� ���. ��� ��� �� ��� ��
� �� �� � �� � ���.
v � ��: �� �� �� �� �� � ���� ����.
v ���: �� �� �� �� �� �� ���� ��� ��� ���� ��� �
�, ��� �� ���� �����.
v ������: �� �� �� �� �� ���� ����, ���� ����
�� ��� �����.
v ��: ���� �� ��� ��� ��� ����, ���� ��� �� �
� ���(����� ���� � �)� ����� � �� ���� �
� �� ���� ��� ������. �� ��, UPS(��� �� �� ��)
� �� � ��� ���� ���� �� Tivoli Enterprise Console �
�� �� �� �� ��� ���� �� ��� �� �� � ��
�� � ���.
� ��
�� �� ���� ���� � ��� ���. � � ��� ����
� ����� ����� � � � �� ���� �� � ��� ����
�� ��� ��� ��� ���. � ���� ����� ��� �� ����
���.
© Copyright IBM Corp. 2003 3
1. �� �� ���� � ������ ��� �������. Tivoli Inventory �
�� � ���� ��� � � ���.
2. � ����� � � � �� Tivoli Enterprise Console ���� ���
�������. � ��� �� ��, MIB ��, ��� ��� �� �� ��
������ � �� � ���.
3. ��� ��� ��� �� �� ���� ������.
v ������� ��� ������ ��� Tivoli Enterprise Console ��
� ��� ��� ���
v ��� ��� Tivoli Availability Intermediate Manager �� �� ��
� Tivoli Enterprise Console ��� ���� ��� ���
�: Tivoli Availability Intermediate Manager� Tivoli Enterprise Console �
���� � Tivoli Availability Intermediate Manager ���� ���
� � ��� ���� Tivoli Enterprise Console ���� ���� ��
� Tivoli ����� ��� ����. �� ��� Tivoli Availability
Intermediate Manager User’s Guide� ������.
v ������� ��� �� ���� ��� ���
4. Tivoli Enterprise Console ��� �� �� Tivoli Availability Intermediate
Manager�� ���� � ���� �� �� ��� ������(�: � ��,
���, ��� �� ��, ������, ���� �� �).
5. ��� �� � ��� ���� ������. �, �� ���� �� ����
����� ��� ������ ������. � ��� ��� �� ��� �
��� �� ���� � �����. �� ����� ��� ��� ���� �
� � �������� ��� �� ��� ���� ��� ������.
6. � �� ��� ����, �� ���� ���� �� �� ������. �
� �� ��� ��� � ��� � ��� ���� �� �� � ��
�. ��� � ��� �� �� ��� IBM Tivoli Enterprise Console � �
� ���� ������.
239 ���� � 5 � ��� ����� ���� ����� �� �� ��� ��
���. ��� ��� ��� �� �� ��� 41 ���� ���� ��� �
��� ������.
��� �� � ��� �� ��� ��� ��� ��� IBM Global
Service� ��� �� � ���� � �� ���� �����. � �� ��
� �� � Distributed Monitoring ����� �� ��� �� ��� ��
� ��� � ���. �� ��� xiii ���� ��� ����� ���
������.
4 IBM Tivoli Enterprise Console: � �� ���
���
IBM Tivoli Enterprise Console� �� ��� �� �� ������. ����
�� � �� ����� ��� �� ��� �����. ��� ��� ��
� ��� ��� ��� ���. ��� ��� ���� �� ����� � �
� � �� ��������. � ��� ��� ���� �� ��� ��� �
� � � ��� ����� ������. ��� ��� ���� ������
���� ���� �� �� � �� ��� �����. ��� ��� ��� �
� �, name=value ��� �����.
��� ���� ���� ���� �� ����. �� �� � � ��� �
��� �� ��� ���� ��� �� �� �������. ��� ��� ���
��� ���� �� � ��, ��� ���� �����.
��� ���
��� ���� ��� ����� �������. ��� ���� ����� ��
� ��� ��� ����� ��� ��� ����.
��� ��� ��� ��� IBM Tivoli Enterprise Console� � �����. �
� ��� ��� ���� ���� ��� EIF(��� � �)� ���� �
� ��� ��� ���� �� � ���. IBM Tivoli Enterprise Console�
� ��� ���� �� �� ��� IBM Tivoli Enterprise Console ��� ��
�� ������. �� ��� ��� ��� ��� �� �� ��� IBM Tivoli
Enterprise Console ��� � � ���� ������.
��� ����� ���� ��� ��
��� ���� �� ��� �� �� �� ��� ����. ��� �� � ��
� ��� �� ��� �� ��� ��� � ��� �� �� �����. ��
�� ��� ���� �����. ��� ���� �� ��� �� �� ���� �
��, ���� ��� ��� �� ��� ���� �� BAROC(Basic Recorder of
Objects in C) ��� ��� � �� �����. BAROC ��� 41 ���� �
2 � ���� ��� ���� �����. ��� ���� �� ���� ��� �
� �� ��� IBM Tivoli Enterprise Console ��� ���� ������. ��
� ��� �� ���� ��� �� �� ��� 8 ���� ���� ���� ��
�� ��� �� ��� ������.
� 1 � � �� �� 5
�� ��� ��� Windows NT® ��� �� ����� ��� � Windows
NT ����� ��� ��� ��� ��� ������. �� �����
Windows NT ��� ���� Windows NT ��� �� ��� �����. �
� ����� ����� ��� �, ���� ��� ��� �� ��� ��� Tivoli
��� ���� �����(wtdumprl ��� ���� �� �� ��). � �� �
���� ��� � � �� �� �� �� ���� �����.
1. �� ����� Windows NT ��� ���� Windows NT ��� �� ��
� �����.
2. �� ����� ����� ��� �, ���� ��� ��� �� ��� ��
� Tivoli ��� ���� �����(wtdumprl ��� ���� �� �� �
�).
6 IBM Tivoli Enterprise Console: � �� ���
3. �� ����� ��� � � �� �� �� �� � ���� �����.
�� �� �� ����� ��� ���
���� �� �� � ����(�: IBM Tivoli Monitoring, NetView ����,
Security Management � Workload Scheduler)��� IBM Tivoli Enterprise Console
� ��� �� ���.
wpostemsg, postemsg, wpostzmsg � postzmsg ��� ���� ����� �
��� �� � ���. �� ��� �� ��� ���� ���� ���
������ �� �� ���. � ��� �� �� ��� IBM Tivoli
Enterprise Console �� � ��� ���� ������.
�: TEC_Start � TEC_Stop ���� ��� ��� ���� ����. �� ��
�� �� �� �����.
��� ���
��� ����� ��� ������� �� ���� ��� ���� ���
���. ��� ���� �� �� ���� �� ����� � ����
�� ���� ����� ��� �� ���. ��� �� �� ���� ��
��� ���� � �� �� �� � � ��� ��� � � ��� ��
�� �� ���.
�� ��� ��� ���� � �� �� �����.
v �� �� �� ���� ���� ��� � ���. ��� ��� ��
��.
– Cabletron ��� �� ��� ��� ��� ����� �����, ��, �
�� � ��� ����� ������.
– Shiva ��� �� ��� ���� ������.
� 1 � � �� �� 7
– NetWare ��� �� ��, �� ��, � ��, �� �� � �� ���
���� ��� � ���.
– Cisco ��� �� ��� �� ���� ��� ���� ������.
v ASCII �� ��� ���� �� �� ��� ���� ��, ��� ����
�� ���� ��� �� ��� �� � ���.
v Windows NT ��� �� ��� � Windows ��� �� ���� ��, ��
� �� �� �� ���� ����� �� �� �� ���� �� � �
�� ��� �� ���(PreFilter ��). Windows ��� �� ���� �
�, ��� �� ��� ��� �� � ���(WINEVENTLOGS ��).
v ��� ���� ��� �� � �� �� ��(�� ��)��� ��� �
� �� � ���.
v Tivoli ��� � � ���� � Tivoli Enterprise Console ������ �
� ��� �� � ���. �� ��� ��� ��� ��� �� ����
���� �� �� ���� ���, ��� ���� ����, ��� �
��� ���� ������.
v Tivoli Availability Intermediate Manager� ��� ��� ���� Tivoli Enterprise
Console � ��� ����� ���. � ���� Tivoli Enterprise Console �
��� � ��� �� ���.
v �� ��� Tivoli Enterprise Console� ���� � ��� � ���� ��
��� �� ���� �� �� ��� �� � ���.
���� �� ��
Ctrl+A � Ctrl+B �� ����� ����� �� � ����. ���� ��
� �� �� ���� �� �� � \001 � \002� ������.
��� ���� ���� ��� �� �
��� ��� �� ��� �� ���� ��� �����.
acl ��� ���� ���� ��� �� �� �� ��
administrator
���� ����� �� ��� ��
cause_date_reception
��� � ���� date_reception �� �. � �� � ���� � �
��� ����� � �����. cause_event_handle ��� � ����
� ���� ����� � �����.
cause_event_handle
��� � ���� event_handle �� �. � �� � ���� � �
8 IBM Tivoli Enterprise Console: � �� ���
��� ����� � �����. cause_date_reception ��� � ���
� � ���� ����� � �����.
credibility
���� ������ ��� �� �����. TME® ���� ��� �
�, Tivoli Management Framework ���� ��� � ��� ���
� ���� ��� ���� �� 1���. ���� TME ������ �
�� ��, � �� 0���.
date_reception
��� ��� ���� �� ��� ���� �� �. 1970 1� 1� �
� �� ��� ��()� ���� �����. � �� ���� ����
���� ������ �����. ���� date_reception event_handle �
server_handle ��� �� �� ���� ���� �����.
duration
�� ��� ���� ��, ��� ��� �� ���� ��� ���� �
� ���� �� ��� ���� ���� ��( �). � �� ���
� �� �� ���� ���� �� 0���.
�: ���� � ��� set_event_status �� ��� �� ������,
� ��� ��� ����� ���� ����. �� 0�� ����.
event_handle
��� ��� ���� �. ���� date_reception event_handle �
server_handle ��� �� �� ���� ���� �����.
num_actions
� ���� �� ��� ��� �� � �� ��(��� �� ��
�)� �
server_handle
� ���� �� ��� ��� ���� ��. ���� date_reception
event_handle � server_handle ��� �� �� ���� ���� ���
��.
server_path
���� ���� � ��� ��� �� ��� ���� ��� ��. ��
� �� �� ��� ID� �� ���� �� ���. ��� ID ���
10 ���� ���� ���� ���� ���. re_split_event_id �� �
�� � �� �� ��� �����. �� ��� 211 ����
�re_split_event_id�� ������.
status ���� ��. �� OPEN �� ��� ���� �� ��� � ���
���� ���. ���� �� �� � �� �� ��� ����.
� 1 � � �� �� 9
ACK ���� ���� �� �� �
CLOSED
�� �� �� ���� �� ��� ���� ������. ��
� ���� ��� ���� ��� ��� ���� ��� CLOSED
� ��� � ��� �� ���� CLOSED ��� �� �
���. �� ��� �� ��� ��� ���� �� ����
� � ������. CLOSED ��� ���� ���� ���
� ��� ���� ���� ����.
custom_status
��� �� ���� STATUS � ��� ��. � ����
STATUS ��� root.baroc ��� ���� ���. � ��� �
����, � ��� ����, � ���� �� �����, ��� �
�� � ������.
OPEN
��� ��� ���� ����, �� �� �� �� ����
� �����.
RESPONSE
�� �� ���� ������. � ��� � �� �� �
� �����. ��� ��� � �� �� � ����.
��� ��
��� ��� � ��� � ����� � RAM� ��� ���� �����.
� ��� 1000�� ������. ��� wsetesvrcfg ���� ��� �� ��
�� �� ��� �����.
���� ��� ID��� �� �� ��� ��� �� �� ���� ����
�.
event_handle
1� ��� �� ���� ��, �� 1���. 1 �� � ��� ��
�� �����, � �� �� ���� ��� ��� �����.
server_handle
�� TMR(Tivoli Management Region)� ��� ��� �� � �� 1�
��.
date_reception
�� ��� �
10 IBM Tivoli Enterprise Console: � �� ���
�� ��� ��� ID� ���� ����.
�
Tivoli Enterprise Console �� �� ���� ����� � �� ��� ��
� ����� �� ��� �����. �� � ���� �� �� �� ��� �
����. � ��� ����� � ��� �� ��� ���� �� Prolog ��
��� ��� �� ��� ����� �����. � ��� � ��� ��
Prolog �� ��� �� ����� �� �� Prolog �� ��� ������.
� ��� ���, ����� � ��� �����. �� �� ��� � ��
�� �����. �� �� �� �� ��� 81 ���� �� �� ��� �
��.
�� ���� �� Prolog� �� ��� ����� ��, �� � ��� ���
��� ��� ���� ��� � ��� � �� � ���. Prolog� ��
�� ��� � ��� �� ���, 385 ���� �� A ����� Prolog �
���� � ��� �� � � �� ��� Prolog �� ��� �� � ��
�� ���. �� ���� ��� � � Prolog� �� �� �� ��� xiii
���� ��� ���� ���.
� ��
��� 5��� ��� ����.
�� �
�� ���� ��� �� � ��� ��� ���� � �����.
��� ��� ���� �� ��� ����� ���.
� �� ���� �� � �� Prolog �� ���� �� � �
��.
� 1 � � �� �� 11
�� �
��� ���� ��� � ��� ��� ���� � �����. ��
�� ��� ���� ��� �� ����� ���. �� ��� ��, ��
� ��� ���� �� �� �� � ���. ��� ����� ��� �
� �, ��� � �, ��� �� ��� ���� �� ��� ��� ��
���� ���. �� ��� ��� �� �� � ���.
v ��� � (�: ��� ���� ��� OPEN�� CLOSED� ��)
v � ��� �� � �(�: place_change_request �)
v ������ ���� �� ��� �� CLOSED �� � ��
�� �� ��� �� � �� Prolog �� ���� �� � �
��.
� ��� � �� �� � ���. ��� �� � �� ��� ��
�� ���� ��� �����. �� ��� 78 ���� ��� ���� �
�����.
��� �
���� ��� ��� ��� �� � �����. ��� � ��
set_timer �� � ���� ��� � ���. ���, ���� �� �
��� ��� �� ���� �� ��� �� � ��� �
� �, ��� ��� ��� ��� ���� � ��� �� ����� �
�� �� ��� �� ���. �� ��, �� �� ���
Prolog �� ��� �� � ���.
�� �� � �� �� � ���. ��� �� � �� ��� �
� �� ���� ��� �����. �� ��� 78 ���� ��� ���
� ������.
�� �
�� ���� ��� �� ��� ��� � �����. � �� � �
� ���� ����. �� ��, ����� �� � ��� �� �
�, � �� Prolog �� ��� �� � ����. � �� ��
���� ���� ��� ����, ��� ���� �� ���� ��� �
�� �� ����.
�� �
�� ���� ��� �� ��� ��� � �����. �� �� �
�� ��� �� � ��� �� � ���. � ���� � �� �
��� ��� �� ���� ���. �� �� ���� status ��� �
� � ������ � ���� �� � ���. �� ��, � �
��� �� �� �, ��� � ���� �� �� �� ��� �
���. �� �� � �� �� ��� �� ���� ���.
12 IBM Tivoli Enterprise Console: � �� ���
�� � ��
�� ����� �� �� ������ ������. ��, � � ��� �� ��
�� � ��� �� � ���. �� ��� ��� �� � ��� 61 ����
�� ���� ���� ���.
rule_type: rule_name: ( description event_filter action1 action2 ... ).
�� ����� � �� ��� ��� �����.
� �� ��
�� ���� �� ��� ��� ��� �� ��� � � ����
�. ��� ��� ��� ��� �� � ��� �� ��� �� ����
� ���. ��� ��� 70 ���� ���� ���� �� ���� ���.
�� �� �� � �� �� ��
�� ��� ��� �� � � � � ��� � �� ��� �����.
v ��� �� ��� ��� ����.
– �� ���� �� ���
– �� ���� �� ���
– �� ���� �
� 1 � � �� �� 13
v � ���� � ���� �� ��� ��� � ���� � ���� �
����.
v ���� �����. �� ��, ���� �� �� ���� �����.
v Tivoli ��� �� �� ���� �����.
v � ���� ����.
v ���� ��� ����, ��� �� � ���� �� �� �� ��
� ���.
� ���
����� � ���� ��� ���� ��, ��� ���� ���� �, ���
�� �� ���� �� �����. IBM Tivoli Enterprise Console ��� �
��� � ���� � ��� ��� ��� ��� ������. � ��� ��
� � ��� ��� ��� ���� �� � ������. ���� �� � ��
� � � ��� ����� ��� �� ��� �� � ���. � ��� �
�� 16 ���� �� ��� ���� �� ���� ���.
�� ��� � ��� � �� �� ���� � � � ��� � �
���. �� � ��� ��� �� � �� ���, ��� ��� Tivoli Availability
Intermediate Manager ��� ��� � ���� �� � ��� ���� �
� Tivoli Availability Intermediate Manager ��� �� � IBM Tivoli Enterprise
Console ��� ��� ��� �� �� � Tivoli Availability Intermediate
Manager ��� ��� ��� �����. ��� ���� ���� � ��� �
�� � �, �� ���� � ��� �� ���� � ���� � ����
� ���.
� ��� ����, ��� ��� � �� �� � �� �� ����
���. ��� ���� �����, �� � ���� � ��� �� ���
� ���� �� IBM Tivoli Enterprise Console ��� ��� ���� ��
�. ��(�: Tivoli Availability Intermediate Manager ��� ��)�� ��
��� ��� ��� � ���� IBM Tivoli Enterprise Console ��� ��� �
� ���� � ��� ����� ����.
�: Tivoli Availability Intermediate Manager ��� ��� � ���� ����
�� � �� ��� Tivoli Availability Intermediate Manager User’s Guide
� ������.
� ���� �� ���� � � ��� �� �� IBM Tivoli Enterprise
Console 3.6.2 � �� ����� �� �������. �� ��� IBM Tivoli
Enterprise Console ��� ��� � �� ��� ��� �� ��� � �
��� ���, � ��� �� ��� wrb ��� ����� �����. � �
�� Tivoli ������ �� � � �� � ���� ������ �� �
14 IBM Tivoli Enterprise Console: � �� ���
� �����. � ���� ���� ��� ��� �� ����� ���� ���
��� ���� ���� ����. wrb �� �� � ��� ���� � ����
������.
�:
1. ��� � ���� ������ ��� 3.7 ���� ���� � ����
� �� �� ���� IBM Tivoli Enterprise Console ��� ���� �
��� ���� � � ����� IBM Tivoli Enterprise Console ��� 3.6.2
� �� ���� � ����� ���� � ���� ��� ����. � ��
� ���� ����� IBM�� �����. �� ��� IBM Tivoli Enterprise
Console �� � ��� ����� wrbupgrade ��� ������.
� � ��� �� � ��� ����� � ���� ����� �
3.7 � �� ����� ���� � ����� ���� ���. �� � ��
�(3.7 �� ���)� � ����� ����� ����� ��� �� � �
, � ��� ��� �� ��� ����� ���� ����. �� � �
��� � ��� ���� ���� �� ������ ���.
2. ����� � ���� �� �(�� ��, � ��, ��� ���, � �� �
��� �� ��� ��), � ���� � � ����� ��� �� ��
��� � ���� �� � ��� �� ���� ���.
� 1 � � �� �� 15
�� ��� � ���� ���� �� �� ����.
� ��� ��
� ��� ��� � ��� ���� �� � ������. ��� � ��� ��
� ��� ���� � � ��� ��� ����.
IBM Tivoli Enterprise Console ��� ���� � ��� ��� ��, � ���
��� rule_base_directory/.rbtargets/target_name ���� �����. (rbtarget �
���� ��� �� �� �� ������.) IBM Tivoli Enterprise Console
��� ���� � ��� �� ���� � ��� ��� ��� EventServer��
�. EventServer � ��� ��� �� � ����� �� �����. ��
��� ��(�: Tivoli Availability Intermediate Manager ��� ��)� ���
���� � ��� ��� � � ����. ��� ����
target_name ������ ���� � ��� �� ��� �� �����.
16 IBM Tivoli Enterprise Console: � �� ���
� ��� ��� ��� ��� � �� ���� ���, ����� �
IBM Tivoli Enterprise Console ��� ��� � ������ ��� � ��� �
��� �����.
� ��� ��� � ��� �� ��� � ���� �� � � �� �
� �� � ���. ��� ��� � ��� ��� �� � ��� ��
� ��� ���. �� ���� �� wrb ��� ��� ��� ��� �� ��
�� ���. �� ��, ��� �� � ���.
v -crttarget ��� -import ����� � �����. � ��� � ��� ��
� ���� � ��� � ��� ���� �����.
v -imptgtrule ��� �����. � ��� � ��� ��� � ��� ���� �
����.
� ���� � ��� ��� � ���, -detailed ����� � -lsrbtarget ��
� �� � ���.
���� ��� ��� � ���� ���� � � ��� ��� � � �
���. �� ��, �� ��(re_send_event_conf �� ��), Prolog �� �� �
�� ��� ���� ���� � ���. wrb ��� -imptgtdata ���
���� �� �� � ���.
wrb ��� �� �� ��� IBM Tivoli Enterprise Console �� � ��� �
��� ������.
� �� � � �
� ��� �� �� � �����. �� ��� �� � ��� ���. �
��� 16 ���� �� ��� ����� ��� �� wrb ��� ���� � ��
� ���� �� � ���. � ���� ���� �, � ��� �� � ���
���� ��� � ��� ���� �����.
� ���� � ��� �� ���� � �, ����� �� � �� �� ���
���� ��� � ��� � ��� ���� ��� ���� �����. ��� �
���� ��� � ��� ��� �� �� ���� ��� � ���.
�: � ��� ��� �� ��� � ��� ��� � �� �� �� �� �
�� ����. � ��� ��� � ��� �� � ��� �����.
� � ��� � � ���� � IBM�� �����. Tivoli Availability
Intermediate Manager� �� � � ��� � � ���� � ��
���. �� ��� IBM Tivoli Enterprise Console � �� ���� �����
�.
� 1 � � �� �� 17
� ��� � ��� ���� ���� ��� �� � �� ���� ����. �
�� � ��� ��� ���� �� � ��� ���� � ���� ��� �
� �� ��� ����. � �� �� � ��� ��� ���� � ��� �
�� ���� � �����. � ���� ���� �, � �� ����� ��� �
��� ��� � �� � � ��� ����.
� �� � � �� � ��� ���� ���� ��, IBM Tivoli Enterprise Console
��� ��� � ���� �� ���� ���. IBM Tivoli Enterprise Console
��� ��� � ���� � ��� ��� ���� �� ����� �� ���
����� � ��� ��� � ���� ��� �� � ������. wrb ��
� ��� ��� ���� � �� � � �� � ���� ���� �� �� �
� ���. �� ��, ��� �� � ���.
v -cprb ��� -rulesets � -rulepacks ����� � ��. �� � ���� �
�� � ���� ���� �� �� � ������ � �� � � �� ���
��.
v -crtrp ��� -import ����� � ��. � �� ���� � ��� �� �
��� �����.
v -imprprule ��. � ��� ��� � ��� �����.
v -imprbrule ��. � ��� � ���� �����.
� ���� � �� � �� ��, -lsrbpack ��� -detailed ����� � ��
� ���.
� ���� � ��� � �� ��, -lsrbrule ��� �� � ���.
18 IBM Tivoli Enterprise Console: � �� ���
�� ��� ��� ���� � ����� � �� � � � ��� ��� � �
��� �����.
wrb ��� �� �� ��� IBM Tivoli Enterprise Console �� � ��� �
��� ������.
��� � ��� � ���� ���� � ��� ���� � ���� ���
�� ���. �� ��� 26 ���� �� ��� ��� � ��� �� ����
������.
� � ��: ��� Production � ���� IBM Tivoli Enterprise Console ��
� ��� �� ������. wrb ��� ���� �� ���� �� � ���
� � ��� � ���. �� ��� ��� $ �� ��� �������.
$ wrb -lsrbrule Production Rule Set files -------------- ov_default.rls log_default.rls tecad_snaevent.rls tecad_nv390fwd.rls tecad_nv390msg.rls
� 1 � � �� �� 19
�� ��� � � �� �� �� � ���� EventServer ��� ��
� �� � ��� ���� �� ��� � �� �� ���. Production
� ���� � �� � ��� ��(Support, Mail � Development )� ���,
wrb -imprbrule ���� � � ��� ����� ���� 8�� ��� ��� �
� �� �� ���� wrb -imprprule ���� � � ��� � � �� �
��� ��� � �� ��� ��� �� � ���.
� ��� �����, �� ��� �����. ��� ���� �� ��� �
�� �����.
1. Production � ���� defaultRules � �� ������.
$ wrb -crtrp defaultRules Production
2. Production � ���� �� � �� � �� �� �� �����.
$ wrb -lsrbpack Production Rule Pack Files -------------- defaultRules
3. �� � ��� ���� � �� ������.
$ wrb -imprprule ov_default defaultRules Production
$ wrb -imprprule log_default defaultRules Production
� �� ���� � ��� �� ��� � ���.
$ wrb -crtrp defaultRules -import ov_default log_default Production
4. � �� � � ��� ��� ��� �� ������.
$ wrb -imptgtrule defaultRules Support Production
$ wrb -imptgtrule defaultRules Mail Production
$ wrb -imptgtrule defaultRules Development Production
� � ��� ��� Production � ���� ����, ��� defaultRules � ��
� � ��� �� �, � �� �� ��� �� ��� ���� �� �
���. �� ��, �� ��� � Marketing � ��� ��� ���� defaultRules
� �� �� ���� �����.
$ wrb -crttarget Marketing -import defaultRules Production
Production � ���� ���� �, defaultRules � �� ���� � ���
�� � ��� ��� �����.
�: � ��� � ��� ���� � �� ��� � ��� ����� ���� �
���.
� �� ��: �� ��� � �� �� �� �� �����. � ��� ��
�� �� wrb �� �� � ��� �� � ���.
20 IBM Tivoli Enterprise Console: � �� ���
�: � ��� ����� �� � ��� ��� ���.
wrb �� ��� �� �� �����. � �� � ��� ���� � �� �
�� 26 ���� �� ��� ��� � ��� �� ���� ������.
1. � ��� ����� �� ��� �� ��� ��� ���� ����� �
�����.
2. � ����� �� ��� ������.
wrb -delrbrule rule_set rule_base
3. � ���� � ��� ������.
wrb -imprbrule rule_set.rls rule_base
4. � ���� �������. � ��� � ���� ��� �� � ��� ��
� �����.
wrb -comprules rule_base
��� ���
� ���� �� ��� �� � ��� ��� �� ��� ��� ��� ���
���. �� � ��� ���� � ��� ���� �� �� �� � �
��� ���� �� � �����. ��� ���� ���� �� ��, �
�� ���� ���� �� ��� ��� ���� ��� ���� �����. �
��� ��� ��� �� ������ ���� ��� ��� � ���� ���,
���� ��� ��� �� ��� PARSING_FAILED ��� ���� ����
�.
� ���� �� �� � ��� ��� �� ��� ��� �����, �� �
�� � wrb ��� IBM Tivoli Enterprise Console ��� ��� � ��� ��
�� BAROC ��� �����. � ���� ���� �, ��� ���� � ��
�� ��� � ��� ��� �����.
�:
1. BAROC ��� ��� ����. ��� ��� �� �� � ��� ���
��.
2. root.baroc � tec.baroc ��� � ���� �� � �� �����.
BAROC ��� ����� � �� ��� ���� 26 ���� �� ��� ���
� ��� �� ����, wrb �� ��� ���� IBM Tivoli Enterprise Console
�� � ��� ���� ������.
BAROC ��� �� �� ��� 41 ���� � 2 � ���� ��� ��� �
�����.
� 1 � � �� �� 21
��
��� ���� �� IBM�� ���� � �� �� ��� ���� ��
IBM Tivoli Enterprise Console ��� ��� � ��� ��� ��� ���. �
���� ���� �, �� � ���� ��� � ��� ��� �����. �
� ���� ��� ����. �� � ���� �� � �� �����.
� �� �� 81 ���� �� �� ��� ���� ���.
�� Prolog �� �� �� ���� ���� �� �� �� �� � �
��. Prolog �� 385 ���� �� A ����� Prolog ���� ���� �
��.
� ��� ��
� ��� wrb ��� � ��� �� ��� ���� � ���� ���� ���
�� �� �����. wrb ���� � ���� ���� �� �� � ��
�� �� � �� �� �����. wrb ��� �� �� ��� ����
�, IBM Tivoli Enterprise Console �� � ��� ���� ������. � ��
� ���� � ��� ���� ��� �� ��� 26 ���� �� ��� ���
� ��� �� ���� ������.
� ��� ��� �� ��� IBM Tivoli Enterprise Console ��� ��� �
� Tivoli Availability Intermediate Manager ��� ��� �����. Tivoli
Availability Intermediate Manager ��� ��� ��� ���� ��� ���
� �� ���� ��� �� IBM Tivoli Enterprise Console ��� ��� ��
� ��� ���� ���. �� ���� ��� �� ��� ��� �
��� �� ���� ��� �� �����.
� ��� �� ����: �� ��� � ��� ����� �� �����.
v � ��� ��� Operations���. �� �� � � �� ���� ���� �
�����. �� � �� �� �� � � �����.
v � ���� /tec_rule/Operations ���� �����.
v �� � ��� ��� Operations � ���� �� � ��� ����
Operations � ���� �����.
– EventServer: IBM Tivoli Enterprise Console ��� ��� � ��� �� �
���. � � ��� ��� �� �����.
– aimPersonnel: �� �� �� ���� �� Tivoli Availability
Intermediate Manager ��� ��� � ��� �� � ���
– aimAccounting: �� �� �� ���� �� Tivoli Availability
Intermediate Manager ��� ��� � ��� �� � ���
� ��� �� ��: �� ��� � ��� ����� �� �����.
22 IBM Tivoli Enterprise Console: � �� ���
v IBM�� ��� � � ���� ��� ��� ��� � ���� �����.
��� BAROC ��� tecad_nt.baroc��, �� Windows NT ��� �� ��
�� �� ��� ���� �����. � � ���� $BINDIR/TME/TEC/
default_rb ���� ���. BAROC ��� TEC_CLASSES ������
���.
v �� � ��� � ������ � ���� ��� ���. � � ���
/tec_rule_dev/rls ���� ���� ���.
– tec_server.rls: IBM Tivoli Enterprise Console ��� ���� ���� ��
� ��. � �� IBM Tivoli Enterprise Console ��� ��� �� �
� ���� �� Tivoli Availability Intermediate Manager ��� ���
�� ��� ���� �����.
– aim_ops_perf.rls: �� Tivoli Availability Intermediate Manager ��� �
��� � �� ���� �� � ��. � � ��� ��� ��� �
���.
– aim_ops_sec.rls: �� Tivoli Availability Intermediate Manager ��� �
��� �� �� ���� �� � ��. � � ��� ��� ��� �
���.
– aim_pers.rls: Tivoli Availability Intermediate Manager ��� ���� ��
�� �� �� ����� �� ���� �� � ��
– aim_acct.rls: Tivoli Availability Intermediate Manager ��� ���� ��
�� �� �� ����� �� ���� �� � ��
v aimOps � �� ��� ���. ��� aim_ops_perf.rls � aim_ops_sec.rls �
��� ���. � � ��� �� Tivoli Availability Intermediate Manager
��� ��� ����.
�� ��� � ��� ��� � �����.
� 1 � � �� �� 23
�� ��� IBM Tivoli Enterprise Console ��� ���� Operations � ���
� ���� �� ����.
� ��� �� ��: Operations � ���� ����� ��� ������.
1. � ���� ������.
wrb -crtrb -path /tec_rule/Operations Operations
2. ���� � ���� ������.
wrb -imprbclass /data/TME/TEC/default_rb/ \ TEC_CLASSES/tecad_nt.baroc Operations
3. � ��� � ���� ������.
wrb -imprbrule c:/tec_rule_dev/rls/tec_server.rls \ Operations
wrb -imprbrule c:/tec_rule_dev/rls/ \ aim_ops_perf.rls Operations
wrb -imprbrule c:/tec_rule_dev/rls/aim_ops_sec.rls \ Operations
24 IBM Tivoli Enterprise Console: � �� ���
wrb -imprbrule c:/tec_rule_dev/rls/aim_pers.rls \ Operations
wrb -imprbrule c:/tec_rule_dev/rls/aim_acct.rls \ Operations
4. �� �� ��� �� � ��� � ���� ����� ������ �
����. $ �� ��� ����� �����.
$ wrb -lsrbrule Operations Rule Set files -------------- tec_server.rls aim_ops_perf.rls aim_ops_sec.rls aim_pers.rls aim_acct.rls
5. � ���� � �� ������.
wrb -crtrp aimOps -import aim_ops_perf aim_ops_sec Operations
6. � ��� EventServer � ��� ��� ������. (EventServer � ���
��� �� ���� �� ������.)
wrb -imptgtrule tec_server EventServer Operations
7. aimPersonnel � ��� ��� ���� � � � � ��� ������.
wrb -crttarget aimPersonnel -import aimOps \ aim_pers Operations
8. aimAccounting � ��� ��� ���� � � � � ��� ������.
wrb -crttarget aimAccounting -import aimOps \ aim_acct Operations
9. � ���� �������.
wrb -comprules Operations
10. � ���� ���� �������.
wrb -loadrb -use Operations
11. ��� ��� � � ����� Operations � ���� ������. IBM
Tivoli Enterprise Console ��� ��� � ��� EventServer � ��� �
�� ��� �, ��� ��� �� � �� �����.
12. �� �� �� ���� ���� Tivoli Availability Intermediate Manager
��� ��� � ��� �� aimPersonnel � ���� /tec_rule/
Operations/.rbtargets/aimPersonnel ������ �� � ���. ��� �
��� Tivoli Availability Intermediate Manager User’s Guide� ������.
13. �� �� �� ���� ���� Tivoli Availability Intermediate Manager
��� ��� � ��� �� aimAccounting � ���� /tec_rule/Operations/.
rbtargets/aimAccounting ������ �� � ���. ��� ����
Tivoli Availability Intermediate Manager User’s Guide� ������.
� 1 � � �� �� 25
� ��� �� � ��� � ��
� ���� Tivoli ������ � ��� ���� � ���� ���� ��� �
� �����. �� ���� � � �� �� wrb ��� � �� � �
� IBM Tivoli Enterprise Console �� � ��� ����� �� �����.
�:
1. � ��� � ���� ���� � ��� �� �� � � ��, �� � ���
�� �� �� ���� ����.
2. wrb -crtrb ���� ��� � ���� � � ����� � � ��� �
�� ��� EventServer���. � ��� ���� � ���� ��� � ��
� � ��� � ��� ���� ��� �� wrb -imptgtrule ��� ����
EventServer � ��� �� �� � ��� ���� ���� ���.
3. � ��� ��� ���� ��� � �� ��� ���� � ��� � ���
�.
4. � ��� ��� � �� ��� ��� ���� � ���.
5. upgrade_gui.sh ��� ���� �� 3.6.2 � �� ��� � ��� ��� �
� �� 3.7 � �� ��� � ����� �� ���� � ���� �� �
���. ��� �� � ��� ����� �� � �� �� ��� �� �
� ��� ���. � ���� �� ���� ��, � ��� ��� �� �
�� �� � ��� ��� ���� ��� ���. upgrade_gui.sh ���
�� �� ��� IBM Tivoli Enterprise Console �� � ��� ���� �
�����.
� ��� ���� ��� ��� ����.
v � � ��� ��
v �� � ��� ��
v ��� �� � ��� �
v ��� � ��� �
v � ���� � �� � BAROC �� �
v � ��� ��
v � ��� ��
v � ���� � �� ��
v � ���� BAROC �� ��
v � ��� ���
v � ��� �� � ���
26 IBM Tivoli Enterprise Console: � �� ���
� � ��� �: Default � ���� ��� � ����. �� IBM�� ���
� � ������. ����, � � ���� ��� �� ��� ��� � �
� ����� � � ���� ��� ���.
�: �� ���� ��� � ���� ���� ���� �� � � ���� ���
� ��� �����. �� ��� 30 ���� �� ��� ���� �����
�.
�� �� � ��� ��� Tivoli �� �� � � ���� �����.
�� ���� Tivoli ��
� � ��� �� ��� �� senior
� � ���� ����� ��� ������.
1. ��� �� ��� � ���� � ���� � �� ��� �� � ���
�� ������.
2. �� ���� � ���� � �� � ��� �� �� �� ������.
3. �� ��� ��� � � ���� ��� ������.
� 1 � � �� �� 27
4. ��� �� ��� ��� � � ���� �� �� �� ��� ����
��� �� � �� ���� �� �� ������. ��, � � ��
�� ���� �� �� ���.
5. � � ���� ���� � ��� �� �� �� ���� �� � ��� �
����. � � ���� ���� � ��� �� �� �� ����. � �
���� ���� ���� ��� �� � ��� �� �� �����.
�� � ��� ��: �� � ���� � �� �� ��� ���� ��� �
���. � ���� ��� ���� �����, �� � ��� ��� � ���
�. � ��� �� ���� �� ��� ��� ���� � �� ��� ���
���� �� ���� � ���. ���, � ��� ���� �� ��� ��
��� ��� �� ���� �� ��� �� �� � ���. � ��� �
���� ���� � �� ��� 269 ���� � 7 � ���� � ��� � �
��� ������.
��� �� � ��� �: ��� ��� ��� �� � ���� � �
���. ��� � ���� ����� �����.
�� �� � ��� ��� Tivoli �� �� � � ���� �����.
�� ���� Tivoli ��
��� �� � ��� � ��� �� user
��� �� � ���� � ���, ��� �� ��� � ���� � ����
� ����. ��� ��� �� � ���� ��� �� � ��� �� ����
�. ��� � ���� �� ��� ��� ����� �����.
28 IBM Tivoli Enterprise Console: � �� ���
��� � ��� �: ��� ��� � ��� � ���� � � ��
�. � ���� ��� � ������� �� ��� � ��� ��� �����
� ��� ��, �� �� � ���� �� �� �� ���.
�� �� � ��� ��� Tivoli �� �� � � ���� �����.
�� ���� Tivoli ��
��� � ��� � ��� �� user
��� �� � ���� � ���, ��� �� ��� � ���� � ����
� ����. ��� �� � ���� ��� �� � ��� �� �����. ��
� � ���� �� ��� ��� ����� �����.
� ��� � �� � BAROC �� �: � ���� �� �� �� �
��� ��� ��� ��� �� �� BAROC ��� �����
�� �� � ��� ��� Tivoli �� �� � � ���� �����.
�� ���� Tivoli ��
� ���� � � �� �
BAROC �� �
��� �� user
� 1 � � �� �� 29
� ���� � �� �� � BAROC ��� � ��� ��� ������.
1. ���� � ��� � ���� ��� � ����. � ���� �� �� �
� �����. � �� ��� ��� �� �� ���� BAROC ��� �
�� �� ��� �����.
2. ��� � ������.
� ��� ��: �� ��, � � ���� �� �� � ��� � ���� ��
�� ���� �� � �����.
�:
1. � ���� ��� � ���� �� � ���. �� � ���� ���
� ��� �� � ���� �� ��� ���. �� ��� 27 ���� ��
� ��� ���� ������.
2. �� �� �� �� ��� � �� ��� ���� ��� � �� ���
����. �� �� �� ��� �� ��� � ��� ����. ���, �
� �� �� ��� ���, � ��� ���� � ���� ���� � ���
� ������. �� � � �� ��� � � ���� ��� � � ��
��.
�� �� � ��� ��� Tivoli �� �� � � ���� �����.
�� ���� Tivoli ��
� ��� �� ��� �� senior
� ���� ����� ��� ������.
1. ��� �� ��� � ���� � ���� � �� ��� �� � ���
�� ������.
30 IBM Tivoli Enterprise Console: � �� ���
2. �� � ���� � ���� ��� � ����. � ��� �� �� �
� �����.
3. �� � ��� ��� ���� �� � ���� � ����. �� � ���
��� ������ �� � ���� � �� � �� ��� � ���� �
��� � ���� �� � ���.
4. ��� � ������ �� ����� � ��� � ����.
5. ��� � ������ ���� ����� ��� ��� � ����.
6. � �� � ���� ��� �� ��� ��� ����� �� �� ���
�� � ����.
7. ���� �� �� � ����� ��� �� ��� ���� �� ��
�� ��� � ����.
8. ��� �� � � ���� �� � ���� �� � ���� ����� �
� � ��� �����. ��� � ���� ��� �� � ���� ����,
��� ��� �� � ��� �� �����.
� ��� ��: � ���� Tivoli ���� �������� �����. ��
��� � ��� ��� ��� ���� ����.
�: ����� �� � ���� ���� ����.
�� �� � ��� ��� Tivoli �� �� � � ���� �����.
�� ���� Tivoli ��
� ��� �� ��� �� senior
� ���� ����� ��� ������.
� 1 � � �� �� 31
1. ��� �� ��� � ���� � ���� � �� ��� �� � ���
�� ������.
2. �� � ���� � ����.
3. ��� �� � ��� �� �� �� ���� ��� � ����. � �
� �� �����.
4. �� � � ���� ������.
� ���� � �� ��: � � ��� ���� ��� � ���� �� �
���� �� �����, � ��� � ���� ��� ���.
�� �� � ��� ��� Tivoli �� �� � � ���� �����.
�� ���� Tivoli ��
� ���� � �� �� ��� �� senior
� ���� � ��� ����� ��� ������.
1. ��� �� ��� � ���� � ���� � �� ��� �� � ���
�� ������.
2. � ���� � ���� ��� � �� � ��� ������. � ����
�� �� �� �����.
32 IBM Tivoli Enterprise Console: � �� ���
3. � �� ��� � ����.
4. � ��� �� �� �� ��� ���� ��� �� ��� ��� ���
� ��� � �� ���� �� �� ������. ��, � ��� ��
���� �� �� ���. ��� �� ���� � ����.
�: �� ��� ��� � �� �� �� ���, ����. ��� ���
�� �� � ��� �����.
5. ��� � ��� ��� � ��� ����, �� �� �� �� ��� �
�� �� � ��� ��� ������. �� �� ��� � ����.
6. � ��� � ���� ���� � ���� �� �� �� ��� �� �
�, ��� �����. ��� ���, �� � ��� �����.
� ���� BAROC �� ��: � BAROC ��� �����, ��� � ��
�� � BAROC ��� ��� ��� ����, �� � ���� ����
�� � ��� ���� ��� ���� �� ������. BAROC ��� �
��� ��� � ���� ��� ���.
�� �� � ��� ��� Tivoli �� �� � � ���� �����.
�� ���� Tivoli ��
� ���� BAROC �� �� ��� �� senior
� ���� BAROC ��� ����� ��� ������.
1. ��� �� � ��� �� ����� ��� �� ��� � ���� � �
��� � ����.
2. ��� ��� ���� �� � ���� � ���� ��� � ����. �
���� �� �� �� �����.
3. ��� �� ��� � ����.
4. ��� �� ��� ��� �� BAROC ��� �� �� ��� ���
� ��� � �� ���� �� �� ������. � ���, BAROC �
�� ���� �� � ���. ��� �� ���� � ����.
� 1 � � �� �� 33
5. �� BAROC ��� ��� �����, �� �� �� �� ��� �
�� �� ���� ��� � � � ��� ��� �� ��� ��� ����
��.
�: � ��� ��� � ���� �� � ����. ��� ��� �� �
� � ��� �����.
6. BAROC ��� ���� � ���� �� �� �� ��� �� ��, �
�� �����. ��� ���, �� � ��� �����.
� ��� ���: �� ��� � ��� �� ��� � ���� � ��� ��
���� �� ����� ���. ���� � ���� 2� �����.
�: � ���� ���� �� ����� ��� �� ���� �����.
�� �� � ��� ��� Tivoli �� �� � � ���� �����.
�� ���� Tivoli ��
� ��� ��� ��� �� user
� ���� ������ ��� ������.
1. �� � ��� � ���� ���� � �� � ��� ��� �� ��
������.
2. � � ����� �� � ��� ����� � ��� � ����. � ��
� � � � �� ���� �� � ���� ���� � ��� �� ����
�� ��� ���.
3. ���� �����. � ��� ��� �� �� ���� �� �����.
4. ��� � ������.
� ��� �� � ���: ��� � ���� ��� ��� ��� ��� �
� ���� � ���. � ���� ���� �� �� ����� ��� �� �
34 IBM Tivoli Enterprise Console: � �� ���
�� � ��� ��� ���� � ����� ��� �� � ���. ��
��� 36 ���� ��� � ��� � ����� ������.
�� �� � ��� ��� Tivoli �� �� � � ���� �����.
�� ���� Tivoli ��
� ��� �� � ��� ��� �� senior
�: BAROC ��� ��, �� �� ��� ��, ��� ��� ��� ����
���� ���.
� ���� ���� � ��� ������ ��� ������.
1. ��� �� ��� � ���� � ���� � �� ��� �� � ���
�� ������.
2. � ���� � ���� ��� � ������. � ��� �� �� �
� �����.
3. � ���� ��� ��, �� �� � ���� �����, � ��� ��
� �� ���� � ����.
--��--
� ���� ���� �� ��� ��� ���� � �� � ����
���, � ��� �� � �� ��� � ���� � ����.
4. �� � ��� �����.
� 1 � � �� �� 35
��� ��� �� �� ���� ��� ��� ���� �� � ��� ��
�� ����.
�� � ��� � ���
�� � ���� � ��� �� �� ��� �� � ������. ��� �
���� ��� ��� �� ��� ��� ���� ��� � ������. ���
� ���� �� � ���� �� � ���� � ���. �� ��� � ��
�� �� �����.
v �� � ��� �� � ���� ��� Default�� ������. ��� �
�� �� � ��� New � ���� ��(, ������ ��)��
�. ��� � ���� �� New�� �� � ���� ��� Default���. �
�� ��� ���� �����, New � ���� ���� �� � ����
���. ��� ��� ��� �� ��� � ���� ������.
v � �� � ��� � ���� �� Default�� ������. ��� ��� �
� � New � ���� ���� ������. � �� � ��� � �
��� �� New���. � ���� �� ���� BAROC ��� ���� �
��, � �� ���� �� ��� ��� ��� ��� ��� ����.
BAROC ��� ���� ��� ��� ��� ��� ���� ���.
�� ��, � ���� ���� � ��� ��� � ��� ��� ��� ��
� �� ��� �����. ��� ��� � � ��� �� ��� � ����
���� BAROC ��� ���� ����, ���� ��� ��� � � ���
� � ��� ����� ���� ��� ���. � ���� �� � ��� �
���� �� ��� ����, ��� ��� ��� ���� � ���� ����
�� ��� � �� ��� ��� �� ����� �� � � �����
�.
� ���� �� �, � � ��� ���� ���� ��� ������. ��
� ��� � ���� �� ��� ��� � �� �� ��� ���� ���.
� ���� � UNIX ���� �
UNIX ��� ��� � ���� �� 755 �� ��� ���� �����.
�� � �� �� TEC_UMASK �� ��� ��� � ���.
1. �� ��� ���� Tivoli �� ��� �� ��� ������.
odadmin environ get > temp_file
��� ��� ���� ���� �� �� ������ . �� ���
TEC_UMASK� ��� � ����. �� ��� �� 7� �� ����. �
� � �� ��� �� � ���. �� ��, � ��� ��� ����
��� 750�� ����� �� �� ������.
TEC_UMASK=750
36 IBM Tivoli Enterprise Console: � �� ���
2. �� ��� ���� Tivoli �� ��� �� ������.
odadmin environ set < temp_file
3. tec_config ����� ���� tec_config ����� ��� ��� 5� �
�����.
� ���, ��� � ��
IBM Tivoli Enterprise Console ��� �� ���, ��� � �� �� �
����.
� ����� ���� ���� ������� ��� ��� ����� ���
� �����.
� ����� �� �� �����. �� �� �� ��� ��(�: �� � �
�, �� � ��, � ��� �� �� �� �)� �� �����.
� �� ���� �� �����. ����� � �� ��� �� ��
�� �����. ���� ��� �� ��� ���.
v �� �� �� ��� ���� ���� � �� ��� ��( �)
v �� �� ��� ��� �
v ��� �� ���� ��� ��( �)
v � ��� �� � �� �� �� ���� ���
�� ��� 255 ���� � 6 � �� ���, �� � ������ ������.
��� �� � �
� �� � ���� �� ���� �� �� ��� ���. �� ��
� �� �� ��� 52 ���� ��� ��� BAROC ��� � 270 ����
��� ��� ��� � �� ������ ������.
�� ��� ��� ��
��� ��, �� � ���� �� � � ���� UTF-8 �� ��
�. � �� ��� � ���� ��� �� UTF-8� ���� ���. wiconv �
�� ���� � �� ��� UTF-8 ���� �� � ���. wiconv ���
�� �� ��� Tivoli Management Framework ���� ������.
v STRING ��� ��� �� ��� �� ���� UTF-8 �� ������ �
� ���.
v �� �� �� � ��� UTF-8 �� ������ �� ���.
v �� �� � ���� UTF-8 �� ������ �� ���.
v ��� ������ ������.
� 1 � � �� �� 37
UTF-8 �� �� ���, ��� ��� �� �� �� ��� �� �� � �
���.
��� � ��� ��� �
Tivoli Enterprise Console ��� ���� UTF-8 ��� ���� �����.
���� ���, ��� �� ����� ���� �� UTF-8 ���� �� �
�� ��� �� ��, �� ���� �� tec_exectask_dbcs ��� ����
�.
$BINDIR/TME/TEC/.tec_config ��� � tec_exectask_dbcs ��� �� �
� ��� �� � �� ��� �����. � �� false���. �� � �
�� �����, ��� ��� ��� � �� ��� �� ������.
tec_exectask_dbcs=true
.tec_config ��� tec_exectask_dbcs=true �� �, ��� ��� ���� �
��. Windows �� �����, UNIX �� Windows� Perl ����� ��
�� �����, tec_exectask_dbcs ��� true� ��� ���. UTF-8 ���
� Windows �� �� Perl ����� � �� � ����. UTF-8� 5.6
��� Perl ����� ���� ����. Perl ����� � UTF-8 ����
�����, UTF-8� ���� Perl 5.6 ��� �� � ���.
exec_program � exec_program_local ���� ��� �: UNIX ��
�� exec_program � exec_program_local � �� �� ��� ����
Perl ��� ���� �� �� �� � ���. tec_exectask_dbcs ��
� true� ������.
�� �� ��� � ���: �� � ��� UNIX ���� UTF-8 �� �
� �� �� � ���, tec_exectask_dbcs ��� true �� false� ��
� ���.
Windows ����� tec_exectask_dbcs ��� true� ���� ���� �� �
�� ���.
exec_task � exec_task_local ��� � ���: exec_task � exec_task_local
� �� �� UTF-8� �� ���� �� � ���, tec_exectask_dbcs �
�� true� ��� ���. UTF-8 ���� ��� ��, exec_task ��
exec_task_local � �� exec_program �� exec_program_local �� ��
� ���.
Windows ����� ���� �� ��� ���.
UTF-8 ��� � �� ��� ��� ���: tec_exectask_dbcs ��� Tivoli
Enterprise Console �� 3.7.1 �� � 3.7.0-TEC-0004 ��� ��� Tivoli
Enterprise Console �� 3.7�� �� � ���.
38 IBM Tivoli Enterprise Console: � �� ���
�� ��� ��� ��� ���� � ���� �� UTF-8 ���� ��� �
�� � ���� � �� ���.
� �� � ���� ��
UTF-8 ��� ��� �� ��� ���
UNIX Windows UNIX Windows
exec_program �
exec_program_local
�� �1 �� � �� ��
Perl 5.5.x �� �� � �� � �� ��
Perl 5.6 �� �� �� � �� ��
�� � �� �� � �� ��
exec_task � exec_task_local �� � �� � �� ��
Perl 5.5.x �� �� � �� � �� ��
Perl 5.6 �� �� �� � �� ��
�� � �� � �� � �� ��2
�:
1. UTF-8 ��� ��� Solaris ���� �����.
2. Windows ����� ���� �� ��� ���. �� ��� � ���� �� � ����.
� 1 � � �� �� 39
40 IBM Tivoli Enterprise Console: � �� ���
� 2 � ��� ��� ��
��� ��� �� � � ���� �� ��� ��� BAROC(Basic Recorder
of Objects in C) ��� ���� � ��� ��� ��� �� ������ ��
�. ���� � ���� �����. ��� ��� ���� �� �, ��� ���
� �� � ���� ��� ���� ���. ��� ���� � ���� �
��� ��� ����, ��� ��� �� ���� �� ��� � ���. �
��� � ���� �� ��� ���� ���, ���� �� ���
PARSING_FAILED ��� ���� �����. IBM Tivoli Enterprise Console�
���� ���� �� BAROC ��� �����. �� ���� ���� ���
� ���� �� �� BAROC ��� ��(�� ��� BAROC ��� ��� �
�� ��� ��)� ���. � ���� �� BAROC ��� � ��
�.
�: BAROC �� ��� BNF(Backus Naur Format) ����� ��� 493 ��
�� �� B �BAROC ��� BNF ���� ������.
��� ���� ��� ���� ��� ��� ��� �� �� ��� ���� �
����. ���� ����� ���� �� ���� ���, ���� BAROC �
�� ��� ��� ��� ��� ����, �� ���� ���� ��� ����
��� ���� �����. �� ��, �� �� ���� �� �� ��� �
����� ������.
Mar 10 08:51:42 aspen su:’su root’ failed for jsmith on /dev/ttyp0
��� ���� �� ���� ��� �����, ��� ��� � �� �� ��
��, ��� �� Tivoli ���� ���� ��� ��� ����.
Su_Failure:source=LOGFILE;origin=aspen; date="Mar 10 08:51:42";host=aspen;sub_source=SYSLOG; from_user=jsmith;msg=’su:su root failed for jsmith on /dev/ttyp0‘;to_user=root;END
��� ��� ��
��� ��� ��� �� ���� ���� � ��� ���. � ����
� �� �� ��� 3 ���� �� ���� ������. �, ���� ���
� �� �� �� � ���� ����� ��� �� ��� ���� ���
��.
1. ���� � IBM Tivoli Enterprise Console ��� ������. ��� ��
�� ����� ��� ��, ��� �� ���� ��� � �� ��� �
© Copyright IBM Corp. 2003 41
��. � ��, �� �� �� ��� �� � ��� �� �� � �
� �� ��� ����. �� ��, � � ��� �� � ��� ��� ���
� ���� �� ���� ���� � ���. �� �� ��� ����� �
��� � ���. �� �� ����� �� ����� ���� ��
�� �� ���� ������ �� � ������.
2. BAROC ���� �� �� ��� ����� �� ������. �� ��
� � ��� ���(�: Temp_Warning, Temp_Critical �� Temp_Normal)�
�� ��� ���� �����. �� ��� � ���(�: Temp_Event)� �
��� ��(�: ���)� ���� ������. ���� ��� ��� ���
� ���� ��� ���� � � �� � ���, ����� ��
���� �� �� ��� �� �� �����. �� ���� ���
�� ��� ���� ���� �� ��� �� � �� ��� ���� ���
�� � ���. �� ��� ���� �� ��� �� ����.
3. ������ �� ���� ������. ������ ����� ��� ��
� ��� �� ��� ���� ���. ��� ��, ������ ����
���� ��� ���� ��� �� ��� ����� ���� �� �
��� � ���. ��� ������ �� ��� ���� ��� �
� ����� � ���. ������ ������ ����� ��� ���
��� ���. �� ��, � � ������� ���� � ����
��, ��� � �� �� � �� ��� � � �� �� ��� ����
� �����(�: Gwyna_Events) �� ����� � ���.
4. ��� ��� �� �� ��� ������. ���� ���� ���� ���
� ����� ��� ��� �� �� ��� ���� � ������ �� �
� �� ���� �� ����.
5. �� �� policy � �� �� �� ��� ������. � ��� ��� ��
��� BAROC ��� ���� �� ����. ��� � ��� ����� �
���� ��� ���� �����. ��� policy� �� ��� � � ��
� ��� ��� � ���� ��� ���� �� �� policy� ����
�. �� �� ��� ��� ��� ��� ���� �� ��� �� �� �
� ����.
�� ��, Cisco Cat 5000 ���� �� �� ���� ������
Cisco_Cat5000_Event�� ���. � ��� ��� cisco_cat5000.baroc ��
cat5000_auto.baroc ��� � Cisco ���� �� ��� ��(�����)�
� ���. Cisco_Cat5000_Event ���� �� ��� Cisco_Event ��
�� �� ������ � ���.
cat5000 ���� � �� �� ���� ������ ��, �� ���
Cisco_Cat5000_Env_Event� ������ Cisco_Cat5000_Event� �� ���
��� ���� cat5000_env.baroc ��� �����. �� �� ���(�:
Cisco_Cat5000_Env_Temp � Cisco_Cat5000_Env_Volatage)� �
42 IBM Tivoli Enterprise Console: � �� ���
Cisco_Cat5000_Env_Envent� �� ������ ���� ��� ��� ��
BAROC �� cat5000_env.baroc� �� � ���.
6. ��� �� ��� ���� �� ��� �� ��� ���� ������.
��� ��� ��
��� ��� ��� ��� ��� ��� � � ��� �� ��� ��� �
����. ��� ��� ��� ��� �� ���.
��� ��� ��� ����� �� ���� �� ������. ��� ��� �
����.
TEC_CLASS: class_name ISA super_class_name DEFINES { attribute_definitions; }; END
�: BAROC �� ��� ���� �����.
��� ��� ��� �� �� ��� ����, �� �� ��� ����,
��� �� �� �� �� � ���.
��� ���� �� ��� � ����. �� ��� � �� EVENT � ��
����. �� ����� tecad_logfile.baroc BAROC ����� ��� Su_Success
� Su_Failure ��� ���� �� ��� ��� ��� ��� �����. � �
��� �� �� ��� Logfile_Su ������ �����, �� ����� ��
��� Logfile_Base ������ ���� ����. Logfile_Base ���� �� �
�� � ��� EVENT ���(��� ��)��� �����. ��� ISA ��
� � ���. ��� ��� �� ��� �� �� ��� 47 ���� ����� �
�����.
TEC_CLASS: Logfile_Base ISA EVENT DEFINES { source: default= "LOGFILE"; sub_source: default= "LOGFILE"; sub_origin: default= "N/A"; adapter_host: default= "N/A"; msg_catalog: default= "none"; msg_index: default= 0; repeat_count: default= 0; pid: STRING, default="N/A"; severity: default = WARNING; }; END TEC_CLASS: Logfile_Su ISA Logfile_Base
� 2 � ��� ��� � 43
DEFINES { from_user: STRING, dup_detect = yes; to_user: STRING, dup_detect = yes; on_tty: STRING, dup_detect = yes; severity: default = WARNING; }; END TEC_CLASS: Su_Success ISA Logfile_Su; END TEC_CLASS: Su_Failure ISA Logfile_Su; END
��� �� ��
��� ��� ��� ���. ��� ��� ���� ���� ��� ����
�� ���� �� �� ����. �� �� ��� ��� ��� ��� � �
����, ��� ������, �� �� ���� ��� ����� � � ��
�. �� ��� 8 ���� ���� ���� ���� ��� �� ��� �����
�. ��� ���� �� ���� �� �� �� ��� IBM Tivoli Enterprise
Console ��� ���� ������.
��� �� ��� ���� � ��� ���� �������� �����. �
�� ��� ��� ��� � �� ��� ����, ������ ��� �� ��
�� � ���.
�� ��, ��� ��� � ��� EVENT� ���� BAROC ��� � ��
� WARNING� ��� ��, � ���� �� ������ �� ���� �
���. �� ��, Su_Failure ��� ���� ��� ��� �� CRITICAL� �
�� � ���.
�� ��� ��� �� ����, �� ��, �� � �� ��� �� ��(facet)
�� �����.
attribute_name: type, facet1, ...;
�� ��
�� ��� � � � � �����.
�� ��� Person ��� ���� �� �� ��� name, address, employer �
hobbies� �����.
TEC_CLASS: Person ISA EVENT DEFINES { name: STRING, dup_detect=YES;
44 IBM Tivoli Enterprise Console: � �� ���
address: STRING, dup_detect=YES; employer: STRING; hobbies: STRING; };
�: ��� object�� ��� ���� ����. ��� ����.
�� ��� ��
��� ��� ��� ��� � � ���.
v � ��(�: INTEGER, REAL, STRING, INT32, ENUM). ENUM( )� �
��� � � �� � � �� �����. �� ��� 50 ���� � �
��� ������.
v LIST_OF ��� ��� � �� ��
��� �� ��� ��� ��� ��� � ���� ���. ��� ��� ��
�� �����. ���� �� ��� � ��� ����.
[complex_type] simple_type
��� ��� ����.
complex_type
���� �����. ���� �� ��, � �� SINGLE���. ���
��� ����.
LIST_OF
� �� �� ��. ��� ��� �� � ��� ��� ��
��. �� ����� ��� ��� � ��� ��� ��� �
����.
acl: LIST_OF STRING, default=[admin];
SINGLE
� �
simple_type
� ��� �����. � ��� �����. ��� ��� ����.
ENUM
�
INT32
32� �� �
INTEGER
29� �� �
� 2 � ��� ��� � 45
REAL
�� �
STRING
�� 255��� � �
�� ��(facet)
��(facet)� ��� �� �� ��� ���� � �����. ��� �� ��(facet)
�� �� � � ��� � ���.
default
��� �� � �� �����. � �� �� �� ���� �� ���
�� ���� ��� � �����. � ��(facet)� � ����. ��� �
�� ����.
default=value
default �� �� �� ��� ��� ���.
�� ����� � � WARNING� ��� ��� ������ ����
�. ��� ��� 50 ���� � ���� ��� �� �� ����
��.
severity: SEVERITY,
parse
��� ���� ��� �� ��� � �� ��� �����. ��� �
� �� ��� � ���� �� ���� ����. � �� YES�
��. ��� ��� ����.
parse=value
��� ��� ����.
no ���� ��� �� �� � ����.
yes ���� ��� �� �� � ���.
parse=no� ��� ��� �� ���� ��� ��� �� ��� �
� ��� ������, ���� �� ��� PARSING_FAILED ��� �
� �����.
�����, parse=no� ��� ��� ��� ��� �� �� ����� �
����. �� ����� date_reception ��� ��� ��� ���� �
���� �� ���� �� ����� ������ �����.
date_reception: INT32,
46 IBM Tivoli Enterprise Console: � �� ���
� INT32 ��� ��� ���� ��� ��� �� �����,
463 ���� �pointeroffset�� ������.
dup_detect
���� ���, � �� ���� ��� ��� �� ����
�.
�: dup_detect ��(facet) ��� ��� �����. � ���� ��
��� �� ���� � ���� � ��� �� ����� � �
��� ��� ���.
�� ���� dup_detect ��(facet)� yes�� ���� ��� �� �
�� �� �� �� �� �� ��� ��� ���� �� ���
�����. �� ��, �� ��� ��� ��� ������.
TEC_CLASS: Person ISA EVENT DEFINES { name: STRING, dup_detect=yes; city: STRING, dup_detect=yes; employer: STRING; hobbies: STRING; };
�� �� � �� ��� �� �� ���� �� ���� ��� �
����( ���� �� ��� ����� �� �).
<"Joe", "Lafayette", "ABC Widgets", "Computers"> <"Joe", "Lafayette", "XYZ Widgets", "Ham Radio">
� ���, dup_detect� no���.
��
��� ��� ��� ISA �� ��� ���� �� ��� ����� � ���
��� � ��� ���. ��� ������ ����� �� ��� ���� �
� ����. IBM Tivoli Enterprise Console� � �� �����.
������ ��� ��� �� ������ �� ����. ������ ���
��� �� ����� �� ��� ������� ��� ����.
������ �������� ��� �� � � ��(facet)� ��� � �, �
�� ��� ��� �� �� ����.
������ � ��� � �� ��� �� ������ �����. ��
������ ��� ��� ������ �����.
������ ���� �� ������� �� ���� ���.
� 2 � ��� ��� � 47
��� �� ��� ��� ��� � ������ ���� � ��� ����
�. ��� �� ��� ���� �� ��� �� �� �� ����� ���. �
�� ��� ��� ����.
v fire_on_non_leaf ���� �� � � �(�� ��� 80 ���� �����
��)
v �� ��� �� ��� ��� ����� �
�: � ��� �� ���� �� �� ����� � �� �� ��� �
� ���.
event: _event of_class _class
event: _event of_class _
����� ���� ����, ��� � � ��� �� � ��� �� ��
���� �� ���� ����(fire_on_non_leaf ���� �� � ��� ��
�). �� ������ �� ���� ������ �� ������ �� ��
��� �� � ���.
�� ��� � ��� �� �����.
��� ��� ��� BAROC ��� ����� � ��� ��� BAROC �� �
��� ��� �����. BAROC ��� ��� �� BAROC ��� ��, �
�� �� ��� 26 ���� �� ��� ��� � ��� �� ���� ����
IBM Tivoli Enterprise Console �� � ��� ����� wrb ��� �����
�.
�� ��� � �� � ����, ��� ��� ��� EVENT���. � ��
� ��� ��� �� �� ��� ���� ���� �� ��� ���. �
��� ���� ��� ���� �� �� �� �����. �� �����
� ���� �� ��� ��� ��� �����.
48 IBM Tivoli Enterprise Console: � �� ���
TEC_CLASS: EVENT DEFINES { server_handle: INTEGER, parse = no; date_reception: INT32, parse = no; event_handle: INTEGER, parse = no; source: STRING; sub_source: STRING; origin: STRING; sub_origin: STRING; hostname: STRING; fqhostname: STRING; adapter_host: STRING; date: STRING; status: STATUS, default=OPEN; administrator: STRING, parse = no; acl: LIST_OF STRING, default = [admin], parse = no; credibility: INTEGER, default = 1 , parse = no; severity: SEVERITY, default = WARNING; msg: STRING; msg_catalog: STRING; msg_index: INTEGER; duration: INTEGER, parse = no; num_actions: INTEGER, parse = no; repeat_count: INTEGER; cause_date_reception: INT32, parse = no; cause_event_handle: INTEGER, parse = no; server_path: LIST_OF STRING; }; END
�� ��
�� ����� UNIX �� �� ��� ���� �� ��� ��� ���
� tecad_logfile.baroc ��� ��� �����. ��� � ��� �� �� ��
���.
EVENT Logfile_Base Logfile_Su
� 2 � ��� ��� � 49
Logfile_Su_Success Logfile_Su_Failure **********************************************************
TEC_CLASS: Logfile_Base ISA EVENT DEFINES { source: default= "LOGFILE"; sub_source: default= "LOGFILE"; sub_origin: default= "N/A"; adapter_host: default= "N/A"; msg_catalog: default= "none"; msg_index: default= 0; repeat_count: default= 0; pid: STRING, default="N/A"; severity: default = WARNING; }; END TEC_CLASS: Logfile_Su ISA Logfile_Base DEFINES { from_user: STRING, dup_detect = yes; to_user: STRING, dup_detect = yes; on_tty: STRING, dup_detect = yes; severity: default = WARNING; }; END TEC_CLASS: Su_Success ISA Logfile_Su; END TEC_CLASS: Su_Failure ISA Logfile_Su; END
�� ��
� �� ��� �� ��� �� � ��� �����. � ���� � �
��� �� �� � � ���� �� � ���. �� ����� ��� �
��� ��� ��� ��� SEVERITY ��� �����.
ENUMERATION SEVERITY 10 UNKNOWN 20 HARMLESS 30 WARNING 40 MINOR 50 CRITICAL 60 FATAL END
50 IBM Tivoli Enterprise Console: � �� ���
� BAROC ��� ���� ��� ���� �� ���� ���. ��
� � ����� �� ��� ���� �� �� ��� ���. ����
� � root.baroc � tec.baroc ��� �����.
��� ���� �� CLOSED �� �� � ��, CLOSED ����
���� ��� �� ���. � ��� �� CLOSED �� �� �� �
�, CLOSED ���� ���� ���, �� ���� �� ���� �� ����
��� �� ��� �� ���.
��� ��� �� �� �� �� � �� ����
��� ���� �� �� �� �� ���� ���� ��� �����. �� �
�� �� ���� ���� � ���. ����, ENUMERATION �� �
�� ��� � �� �� �� ���� ���� ���. ��� ��� �
� ��, ENUMERATION �� � �� ���. �� � �
�����. �� �� ��� ���� � �� ����� ��� ��� ��
� ���� � ���.
�� ��, �� 6000�� ���� SNMP �� ��� �� ������. � �
� � �� SNMP_Error_xxxx ��� ��� �� ��� �� ��� ����
���� ���, ��� xxxx� �� �����. � �� � ��
ENUMERATION �� ��� ���� ����(�: 6000�� � � ���� �
� ID� �� SNMP_ERROR_ENUM). �� ��, SNMP_ERROR_ENUM ���
error_type ��� �� SNMP_Error ��� ��� ��� ������.
root.baroc � tec.baroc �� ��
root.baroc � tec.baroc BAROC ��� ���� ���� ��� � ����
�� �����. root.baroc ��� �� ���� tec.baroc� �� �����. � �
�� ��� ��� �� ���� �� � ��� ��� ��� ���.
�: � ��� �� ��� ���� ����. ��� � ���� ���� �
� BAROC ��� � ��� �� ���� ���.
��� BAROC �� ���
�� ��� � ��� ��� �� �� ���� � ���� �� ���
BAROC ��� ����� �� �� �����. � ��� �� �� �� wrb
�� �� � ��� �� � ���. wrb �� ��� �� �� �����.
� �� � ��� ���� � �� ��� 26 ���� �� ��� ��� � �
�� �� ���� ������.
� 2 � ��� ��� � 51
1. � ��� ����� �� ��� �� ��� ��� ���� ����� �
�����.
2. � ����� �� ��� ������.
wrb -delrbclass filename rule_base
3. � ���� � ��� ������. ��� ��, ��� ��� �� �� ��
� �� -before �� -after ��� �� � ���. � ��� ��� ���
�� �� ��� � �� �� ���.
wrb -imprbclass filename.baroc rule_base
4. � ���� �������. � ��� � ���� ��� �� � ��� ��
� �����.
wrb -comprules rule_base
��� ��� BAROC ��
�� ��� ��, � ���� BAROC ��� �� � � ���� UTF-8
�� ���. BAROC ��� � ��� ��� �� UTF-8 ���� ����
���. wiconv ��� ���� BAROC ��� UTF-8 ���� �� �
���. wiconv ��� �� �� ��� Tivoli Management Framework ����
������.
v � �� STRING ��� ��� ���� ��, UTF-8 �� ������ �
� ���.
v ��� ������ ���� ����.
UTF-8 �� �� ���, ��� ��� ��, �� ��, �� � ��
�� �� � ����. UTF-8 � � �� ��� �� �� ��� 37 ��
�� ��� ��� � ���� ������.
52 IBM Tivoli Enterprise Console: � �� ���
� 3 � � �� ��
� ��� � �� ��� �������. �� � ��� �� ����� �� �
��� ��, ��� �� ���� �� �� �� �� ��� ��, �� ��� �
� ���� ��� ��� �� �� ���.
��� ��� ����, � ���� � �� ��� ��� ���� ������.
� ���� ���� �� � �� � � ��� ��� ��� ���.
�� � ��� �� �����. � ��� ��� ���� �� �, ��� ��
��� ���� �� ���� �� ����. ���� �� ���� �� �
���, � ��� ��� �� ��� �����.
��� ��� � ��� ��� � ����� � ������ ����� ��
�� � ���. �� ��, ��� � ��� �� �� ���� �� ���
� ��� ��� ��� �� � � � ����� � �� ��� ��
��� ������ ���� � ���.
��� ��� �� ��
�� ��� TEC_Notice ��� “� ��� �� �: � ��”� ��� ���
� 5%� ���� ����. ���� ��� ���� ����.
�: ��� ��� ��� ��� �� ��� � � �� ��� ��� � �
���. ��� IBM Tivoli Enterprise Console ��� ��� � ��� ���
��� ���� ���� ���� �����.
��� TEC_Notice ���� ���� �� ��� ��� ��� ��� ��
�� ��� ��� ��� ��� ��� ����. ��� ����� ��� ��
�� ���, IBM Tivoli Enterprise Console Reference Manual�� wsetesvrcfg �
�� �� ��� ������. Tivoli ������ ��� �� ��� �� �
� ���� ��� ����� �� �� ���.
��� ��
���� ���� �� � ��� ���� �� � ����� �� �� �
� ���. ���� �� �� ��� �� �� �� � �� �����. �
� � ���� � ��� ���� � �� ��� �����, � ��� � ��
� ��� � �� �� �� � � �� �� �� � �����. � �� �� �
�� ��� ���� �� � � �� �� �� ������. �� ��,
commit_action, commit_rule � commit_set �� �� ���� �����.
© Copyright IBM Corp. 2003 53
���� �� ���� ���� ��� � ��� �����, ���� ��
� � �� �� ��� � ��� ������� �����.
� ��� ���� �� ��� �����.
1. ���� � ���: �� ��, ���, �� ��, wpostemsg �� postemsg
������ ��� ���
2. ����� �� ���: �� ��, generate_event �� �� ��� ���
� ��� ����� �� ���� �� �� ��, � ���� ��� �
��� ���� �����. ����� �� ���� ���(FIFO) �
�� �����. ����� �� ��� � �� ����� ��� �� ��
��� ����� ���.
3. �� �� ��: �� ��, change_event_administrator, change_event_severity
�� change_event_status �� �� ��� ���
� ��� �� �� ��� �� �� �� � ���� � �� �����
�� ���� ��� �� ���� FIFO ��� �����.
4. ��� ��: �� ��, redo_analysis �� �� ��� ���
� ��� ��� ��� �� �� ��, � ���� � �� ����� �
� ���� ���� �� �� �� ��� ��� �� ��� ��� FIFO �
�� �����. ��� ��� ��� ��� ���� �� �� � � ��
� ����� � ��� �� �����.
5. �� �� ��: �� ��, ��� ��� �� ��� � ��� �� ���
�� �� ���
� ��� �� �� ��� �� �� ��, � ���� � �� �����
�� ���� ���� �� �� �� ��� �� ��� ��� ��� ��
�� �� ��� FIFO ��� �����. �� ��� ��� �, �� �
����. �� ��� �� �� �� �� �� ���� �����.
54 IBM Tivoli Enterprise Console: � �� ���
��� � ��
� ��� set_timer �� � ���� ��� ��� �� ���� ����
�� �� �� ����. ��� ���, ���� �� �� �� ��
����. �� ��, �� Su_Success ���� ��� � � �� �� �� ���
�� � ��, �� Su_Success ���� ��� � ��� ����� ���� �
� �� �� � ���.
�� �� ��
����� �� ���, �� �� �� � ��� ��� ��� ���� ��
�� �� ���� ��� �����. ��� ��� ����� �� ��� ���
�� ���� �� �����. �, � ���� � ���� �� �� �����
���� ��� � ��� �� ���� ����.
�� �
�� �� � �� �� ����� �� �����.
v commit_action, commit_rule � commit_set �� ���� ���� � ���
�� ���� ��� ��� ���� ������. �� �� ����� ��
� � ��� ����� ���� ���.
� 3 � � �� � 55
v ��� ��� �� �, � ���, ��� �� �� ��� �� �� ��� �
��� ��� ���� ����. �� ��� ��� ���� ������.
v ��� ��� where �� �� ��� ���� �� �� �� �� ���� �
�� � ���� �� �� ��� �� � �� ����.
56 IBM Tivoli Enterprise Console: � �� ���
� 4 � � �� ��
� �� � ��� ���� ��� �� ��� �� � ��� �����. � ��
� ��� ���� � ��� �� �� ��� ��� ��� ���� ��
�.
�� �� ��
�� �� � �� ����� �� �� �� ��� �����.
�� ��
BAROC �� ��� ��� ���� � ��� �� ���� �� ��
��� ��� ��, �� �� ���� ���� ����, � � � .
��� �� �� �� ��(_), a - z(���) � 0 - 9��
�.
� ��� ��, �� �� ���� ��� �� �� � . � �
�� ��� �� �� ���� �� ���� ����� ���
�� � � ��� ���. ��� �� �� �� ��(_),
a - z(���) � 0 - 9���. � ���� �� ��� ���
�� �� � ����.
� �� � ��� �� �� ��� filename.rls ���� ���. � �
��� � ��� � ��� � ��, .rls �� �� ��� �
���� ���� ����. ��, � �� ��� � �� ��
�� ����.
� � � � ��� filename.rpk ���� ���.
� �� � ��� �� �� ��� �� � ���. ���, ��
� ���� � ��� ������ �� ���. � �� ��
��� �� ��� ��� �� ���. � ��� � � �
� � ��, ����� ��(_)� ��� �� ��
�� ��� �����. � ��� ���� ����, � ��
� � �� � �� � � ��� ������.
� �� � �� ��� ��� ��� �� � ��� ������ �
� � ���. � �� ��� ��� ��� ��� �� ��
�. � �� ��� � � �� � ��, �����
��(_)� ��� �� �� �� ��� �����. � �
� ��� ���� ����, � �� � � �� � �
� � � ��� ������.
�� 58 ���� ����� ������.
© Copyright IBM Corp. 2003 57
��
�� ��� ��(_) �� ���� �� � ��, � ���� ��� ���
��. �� � ���� �� ���� ��� ��� ���� ��� ���� �
���.
��� ��� ���� ����. ��� ������ ��� ��� ����
�� ��� ��� ��� �������.
�: �� �� �, �� ��� ��� ��� ������. ��� ��� ��
���� �� ��� ���� �� ��� �� ��� �� ��� � �
���. �� ��, _no_value ��� ������ �� ��� ����� �
� �� ��� �� ����_origin � _no_value ��� ��� ��� ��
�������.
where [origin:_origin equals _no_value]
��� ���� �����. ��� ��� ����, ���� ��� ��� ���
��. ��� ���� ��� ��� ��� � ���� � �� ���, ���
��� ���� �� ��� ���� ��� ��� ���� �� �� �� ���
��� ����. Prolog �(�: read � write)� � ��� ����� ��� �
�� � ���. �� ��� 468 ���� �read� � 489 ���� �write�� �
�����.
��� ���� � � ��� ��� �� ���, �� � � �����
� �� ���. �� ��, Level_1� ��� ��� ��� 'Level_1'� �
� ����.
�� ��� ��� ���� ���, �� �� � �� �� �����.
�� �� ��� TEC_Start ����� ����� ����, TEC_Start ��� �
�� ��� ���� ������ ��� ���.
rule: unquoted_single_class1: ( event: _event of_class _class % The name of the event class is stored in variable % _class. where [ msg: equals ’unquoted event filter 1’ ], action: ( set_event_message(_event,’msg changed to %s’, [_class]) ) ).
58 IBM Tivoli Enterprise Console: � �� ���
rule: unquoted_single_class2: ( event: _event of_class TEC_Start % The name of the event class is stored in variable % TEC_Start. To filter on event class TEC_Start only, % specify ’TEC_Start’ (within quotes) where [ msg: equals ’unquoted class filter 2’ ], action: ( set_event_message(_event,’msg changed to %s’, [’TEC_Start’]) ) ).
�� ��
�� ��� � � �� � �� ��� ��� � � ��� ���� �� �
����. �� ��� ��� ��� ����.
v �� � ��� ��� � ��� ��� ����� �� ��� ��� �
���. � ��� ���� ��� ��� �� �� �� �� ���
�� ����� ������ � ��� � ���.
v � �� �� �� ��� ��� � ��� � � ��� ���� ���
����. ��� �� �� ��� �� �� �� ��� ���� �
�� �� ����.
�� �� ���� � ���� ��� �� �� �� ��� �� ��� where �
���� � �� �� � �� �� �� �����.
rule: maintenance_started: (event: _event of_class ’TEC_Maintenance’ where [origin: _origin])
��� ��
��� ��� � ��� ��� �� � � ���� �� � � ���, �
� ����� ��� � � ��� ���� �� �����. �� ����(�:
���)� ��� ���� � ���� �� ���� ��� ���� � ��
� ��� �� �� ���.
��� ��� ��� ���� ���� ���� � �� ����, �� � � ��
�����. �� �� �� �� ��, �� ����� ��� �� ���� ��
�� � ��� �� ���� �� ��� ���� � ��� � ���. �� �
� � � ���� ����. �� ����� ��� ���� ��� ��
��� ������. �� � � �� ���� � � � ���. �� ��
� ����, �� �� ��� ��� � ���.
� 4 � � �� �� 59
��� ��� ��� ��� ������ �� �� ���� ��� � ���. �
� ��, origin � sub_origin ��� ���� 2�� � �� � ���. ��
������ atomconcat � set_global_var �� ���� �� ������.
atomconcat([_origin, _sub_origin], _key), set_global_var(’My group key’, _key, ’My value’)
��� ��� ��� �� �� ��(�: ��, � , �� �)� � � ���.
��� �� ���� �����, �� ���� ���([ ])� �����. �� �
�� ���� �� ��� � ���, �� ������ �� ��� ����
�����.
set_global_var(’My group key’, _key, [’a’, ’b’, ’c’]), % Assign global variable values. get_global_var(’My group key’, _key, [_var1, _var2, _var3], [’’, ’’, ’’]) % Retrieve global variable values into regular values % The default initialization values (’’) are null.
��� �� �
��� �� ��� �� �� �� �� ���. �� ����, � �� �
�� [i] � [o] ���� �� �� �� ��, � � �� ��� ��
�� � ����� ����� �� �� � �� �� ������ �� �
����.
�� ��� ��� �� �� �� �� _into� �����. ��� ��� ���
� �� ��, �� _init ��� ���� _into� �� ��� �����.
get_global_var(_groupkey[i], _key[i], _into[o], _init[i])
�� ��� ��� ��� _to� �����. _groupkey � _key �� ��� �
��� ���.
set_global_var(_groupkey[i], _key[i], _to[i])
�� ��� ��� �� �� ��� ��� _to ��� ������.
reset_global_grp(_groupkey[i], _to[i])
�� ��� � � ��� �� �� ��� �� ��� ��� �� _key �
_into �� ��� ���� �����. _groupkey �� ��� ���� �
��. � �� ��� ���� ���� � ��� � ���. _key� ���
��� set_global_var �� ���� �� �� � � ������ �� �
�����.
get_global_grp(_groupkey[i], _key[o], _into[o])
��
� ���� � ��� ����� �� ��� � ���. �� ��,
'WARNING', 'TEC_Error' � 'on'� � � �����.
60 IBM Tivoli Enterprise Console: � �� ���
� ���� ������ ������. �� ��, 9, 5.4 � 0xFF1953� � �
�����.
��
��� �� � � � ���� �� ��� ���. /* � */ ��
��� �� � ���� ��� ���� ����� �� �����. �
��� ���� �� ��� �� �� �� � ���. �� � ��
� �� ��(%)���. � � �� � �� � �� ���� ����. ��
� ��� ���� �� �� ��� �(nest)�� � ����. %� /*
*/ �� �� �� � ��, � ��� ��� ��� ���� ���
��.
BAROC ���� � � � ��� �� ��(#)���.
� ��
� ���� �� � ��� �� ���� ��� ����� ����, �� � ��
� �� ��� �����. ��� � ��� �� ��� 11 ���� �� ����
���.
v � �
v �� �
v �� �
v � �
v �� �
� �� ��� ��
BNF(Backus Naur Form) ���� � �� �� �� ��� �� HTML
��� ��� ��� �� ��� ���.
$BINDIR/../generic_unix/TME/TEC/BOOKS/HTML/rulep.html
��� �� CD� �� ��� ���.
/BOOKS/HTML/rulep.htm
��� � ��� �� ��� �� � ��� �����.
� �� ��
�� ����� � �� �� ��� �����.
rule: rule_name: ( description: ’description_text’,
� 4 � � �� �� 61
directive: directives, event: event_filter where [ attribute_conditions ], action: action_name: ( action_body ) ).
��� ����
v ��� ��� 70 ���� ���� ���� ���� ���.
�
1. ��� � � ��� ��� ���� ��� Printer_Error_Cleared ���� �
�����.
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. ��� � � ��� ��� ��� ���� ��� 90� �����. ��
� ���� ���� ���� ���, �� �� �(64 ���� ���
�� �� ���� �� 1� ��� �� ��)� ����.
rule: print_assist : ( event: _event of_class within [’Printer_Paper_Out’,
62 IBM Tivoli Enterprise Console: � �� ���
’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, ’’) ) ).
�� � �� ��
�� ����� �� �� �� ��� �����.
change_rule: rule_name: ( description: ’description_text’, directive: directives, event: event_filter, where [ attribute_conditions ], sender: sender_filter, attribute: attribute_change_filter, action: action_name: ( action_body ) ).
��� ����
v �� �� ����� �� � � ��� �� ��� �����.
v �� �� �� ��� ����� � ����.
v ��� ��� 70 ���� ���� ���� ���� ���.
v �� �� � �� �� ��� 74 ���� ��� � ���� ���� ��
�.
�
�� �� � ��� ��� ����� ���� tec_print� �� ���� ����
�. � ���� �� ���� ��� ���� �����(num_actions ��� 1�
��)� ��� � �����.
� 4 � � �� �� 63
change_rule: print_chg_assist : ( event: _event of_class within [’Printer_Paper_Out’, ’Printer_Toner_Low’, ’Printer_Offline’, ’Printer_Output_Full’, ’Printer_Paper_Jam’, ’Printer_Error_Cleared’, ’Printer_Door_Open’ ] where [ hostname: _hostname, status: _status outside [’CLOSED’], num_actions: equals 1, msg: _msg ] , attribute: status set_to _new_status within [’CLOSED’], action: ( exec_program(_event, ’scripts/TEC_Send_Mail.sh’, ’"TEC - %s: %s" tec_print "The following condition for printer \ %s has been fixed:\n\t%s"’, [_new_status, _msg, _hostname, _msg], ’YES’) ) ).
��� � �� ��
�� ����� �� �� �� ��� �����.
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 ) ).
��� ����
v ���� �� ��� ��� ��� �� �� �� ����.
v ��� ��� 70 ���� ���� ���� ���� ���.
64 IBM Tivoli Enterprise Console: � �� ���
v �� � ��� 76 ���� ��� � ���� ���� ���.
v ��� 234 ���� ���� � set_timer �� �����. ��� ��
�� � � ��� 62 ���� 2� �����. ��� ���� �� � �
�� 2� �����.
v TEC_Tick ��� ���� �� ��� ��� ���. �, ���� �� �
�� ����. ���, ���� ���� ��� ��� ���� � �� �
���.
v ��� �� � � � timer_info ����� ���� �� ��� ���
�� � ���. ��� ��� timer_info� �� ��� ��� ��� �
� �� ����. timer_info� ���� � ��� ��� �� � �
� �� � � ��� � � ���.
�
1. �� �� � ��� ��� ��� ��� ��� ��� ��� ��� �
�� �� ��� ���� ���� ��, �� � ���� �� ��� �
��� �� �� ���� tec_print� ����. 61 ���� �� �� �� �
��� �� 2� ��� ��� �� � �� ����.
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. �� �� � ��� �� 1 �� �� �� ��� ����� �� �
��� �� ���� ���� FATAL� ����. �� 2 ��� � �� �
��� �����.
� 4 � � �� �� 65
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’) ) ).
� � �� ��
�� ����� � �� �� ��� �����.
simple_rule: rule_name: description: ’description_text’ directive: directives event: event_filter where [ attribute_conditions ] when: event_conditions: event_actions
��� ����
v ����� ��� ���� ���� _event � _class ��� � ��� ��
� ����. �� ��� � ���� ����� �����.
v �� ��� �� �� � ���. �, � �� �� �� ��� ���
��� ����.
– n minutes_after_event_reception(n� ��)
– event_acknowledged
– event_closed
– event_received
– n �� frequency_exceeds m(m � n� ��)
– severity_downgraded
– severity_upgraded
v �� �� � ��� ��� �� � ���. �, � �� �� �� �
�� ��� �� �� ��� ����.
66 IBM Tivoli Enterprise Console: � �� ���
��� �� ��
change_event_severity ��� ��� �� � �� �����. ���� �� ��, ��, ��, ��, �� � ���
� � � ���.
��: change_event_severity(new_severity)
change_event_status �� ��� �� � �� �����. ��� OPEN, RESPONSE, ACK � CLOSED� �
� ���.
��: change_event_status(new_status)
drop_duplicate_event �� �� CLOSED� �� �� ��� �� � ���� ��� ��� �� � ���
(�� �� �). ��, �� ���� repeat_count ��� �� ���� �� ��� ��
�� �����.
��: drop_duplicate_event(time_window)
exec_program �� ��, ���� �� �� ���� �����. � � ��� $BINDIR/TME/TEC
���. ��, ���� �� ���� ��� ��� �� ���� �����. � ���
��� �� �� �� ��� 154 ���� �exec_program�� ������. exec_program
� �� �� �� �����.
�: � ��� exec_program ��� ��� ��, ��� ��� _arg_list �� �� �
� ����. _arg_list �� �� �� �� �� � � exec_progrma � �� ��
� ����.
��: exec_program(prog_name, _format_string, _arg_list, watch_status)
exec_task ��� ��� ������� ���� �����. � ���, ���� ��� ��� ��
���� �����. � ��� ����� ��� ������ �� ��� ���� ����
�. � ��� ��� �� �� �� ��� 160 ���� �exec_task�� ������.
exec_task � �� �� �����.
�: � ��� exec_task ��� ��� ��, ��� ��� _arg_list �� �� ��
����. _arg_list �� �� �� �� �� � � exec_task � �� ��� ���
�.
��: exec_task(task_name, format_string, _arg_list, watch_status)
forward_event ���� �� ��� ��� ����. � ���� TEC_RULES ������ �
tec_forward.conf ��� ServerLocation ��� ���� � ���. tec_forward.conf �
�� �� �� ��� 177 ���� �forward_event�� �� ��� ������.
��: forward_event()
set_event_message ����� msg ��� �� ���� �����. �� �� ���� �� ��� ��� �
� � ���. � ��� ��� �� �� �� ���
227 ���� �set_event_message�� ������. set_event_message � �� �� ��
�����.
�: � ��� set_event_message ��� ��� ��, ��� ��� _value �� ��
�� ����. _value �� �� �� �� �� � � set_event_message � ��
��� ����.
��: set_event_message(_format, [ _value])
v � �� ��, �� �� �� ��� ��� ��� � ��� ��� �
���� ��� ���� ����.
v ��� ��� 70 ���� ���� ���� ���� ���.
� 4 � � �� �� 67
�
�� � � ��� 5 �� su ��(switch user)� �� �� � � ����
Su_Failure ���� ��� FATAL� �����.
simple_rule: escalate_su_failure: description: ’Escalate more than 3 su root failures in 5 minutes.’ event: Su_Failure where [ to_user: equals ’root’ ] when: frequency_exceeds 3 within 5 minutes: change_event_severity(’FATAL’).
�� � �� ��
�� ����� �� �� �� ��� �����.
correlation_rule: rule_name: description: ’description_text’ directive: directives event_relation: event_class1 operator event_class2 within: integer minutes when: [ event_class1.attribute1 equals event_class2.attribute2 ]
��� ����
v event_relation �� ��� ��� ����.
cancelled by
cancelled by ��� ���� ��� ���� ��� ��� ��� �
��� �� �����.
cancels
cancels ��� ��� ��� ���� ��� ���� ��� ����
�� �����.
caused by
caused by ��� ��� � ���(� ���)� ���� � �
��(� ���)� �����. � ������� date_reception �
event_handle� � ���� cause_date_reception � cause_event_handle
��� �����. � ���� �� �� �� � ���� �� ��
� �����. � ���� ��� �� �� ����� �� �
���� �� ��� ����.
causes ���� � ���(� ���)� ��� � ���(� ���)� �
����. � ������� date_reception � event_handle� � �
68 IBM Tivoli Enterprise Console: � �� ���
��� cause_date_reception � cause_event_handle ��� �����. �
�� � ���� ��� �� �� ����� �� �� ���
� �� ��� ����.
v when ��� ��� event_class_name. attribute� �����. ���, attribute
� event_class_name ��� ���� �� ��� �����.
v equals ��� �� �� ��� �� �����.
v �� �� ��, ��� ��� � �� ��� �� �� �� ��� ��
���� ���� ����.
�
��� �� �� � ��� � ���� � �� ���� �� �� ����
���, �� �� ���� �� �� ���� ���� � �� ��� ��� �
� � ���.
��
��� �� ���� �� ���� �� ��� �� �� �����. ��
�� ���� �� �� ����. ���� ����� ��� ���� ����
�� ��� ��� ���. ��� � �� ��� �����.
correlation_rule: fan_fail_causes_temp_warn: description: ’This rule links a fan failure event and a temperature warning event on the same computer.’ event_relation: Fan_Failure_Notification causes Temperature_Warning within: 10 minutes when: [ Fan_Failure_Notification.hostname equals Temperature_Warning.hostname ] correlation_rule: temp_warning_causes_temp_shutdown: description: ’This rule links a temperature warning event and a temperature shutdown event on the same computer.’ event_relation: Temperature_Warning causes Temperature_Shutdown within: 15 minutes when: [ Temperature_Warning.hostname equals Temperature_Shutdown.hostname ]
� 4 � � �� �� 69
v ��� ��
v �� � ��
v �� � ��
��� ��
��� ��� ��� ��� ��� �����, � ��� ���� ��
�� ������. ���� ��� �� �� ���, �� �����. ��� �
�� �� ��� ���� ��� ���� �� ����� � ����� ��� �
���. ���� ���� ���� ���, �� �� �� �����.
�� ���� �� ���� �� ��� ���� ��� ��� ��� ��
� ���. � ��� ���� ��� ��� �� �� �� �� ��
� �� ����� ������ � ��� � ���. � ��� ��� �
���� ��� ��� ��� ����� �� �����.
�� � ��� �� � ���� ��� ��� ��� ���� ��� ���
���� �� �� ��� �� � ���. � ��� � � ��� ����
��� ����. ��� �� �� ��� �� �� �� ��� ���� �
�� �� ����.
��� ��� � ���� �� � ����� ��� ����
�. � ��� �� ��� �� �� ��� �� � �, ���� �� ��
��� _event���. ��� � ��� � � �� �� ���� �� � �
�� ��� ��� �����. � � �� ��� � ��� �� � ����.
of_class ��� _event ��� ���� � �� �� �� ��� �� � ��
� ��� ��� �����. � �� �� ��� �� ��� �� � ���
�. of_class ��� �� ��� ��� ��� �� ��� �� �����.
��� ��� ��� ���� ���� �� ��� ���� �����
�� �� ������. �� ��� ��� ��� ���� �� ���� ���
��� �����.
_ _ ��(� �� �)� �� ����� ���, ���� ��
� ���� ���� �������. � ��� �� ���� �� �
�� ��� ���� ��� ��� �� ��� ����. �� �� �
�� ��� �� ��� ���� �� ���� �� ���� ��� ��
�� ��� �� ��� �������.
event: _event of_class _
_class _class ��� ���� ��� ���� ���� ������
�. �� �� ��� ��� �� ��� ���� �� ���� �� ��
�� _class ��� ��� ���� ���� �������.
70 IBM Tivoli Enterprise Console: � �� ���
event: _event of_class _class
class_name
��� ��� ���� ��� �����. �� ��� ����
Printer_Error_Cleared ��� ����� �����.
event: _event of_class ’Printer_Error_Cleared’
�: class_name� ���� ������� ��� ��� �� �
� class_name� ����� �� ���� �� �����.
fire_on_non_leaf ���� ���� �� �� ��, class_name� �
����(�� ����� )�� ��� ��� �� �� ����
�.
_class within [class_name1,...]
� ��� ��� ��� � �� ��� ��� ���� �� �����
�. ���� ��� �����, ��� ��� �� �� ���
��.
��� �� ��� ��� ��� ������� ��� ��� �� ��
������ ����� �� ���� �� �����.
fire_on_non_leaf ���� �� ���, ��� ���� ������ �
� ��� ��� �� � �� �����. ��� ��� ��� ��� �
�� ��� ���� ��� �� � ���. ��� ��, ���� ��
�� ��� ��� ��� ��� ��� ���. ��� ���
���� �� �� � � � ���� � �� ��� ��� ���
� �� ��� �����.
event: _event of_class within [’Printer_Paper_Out’, ’Printer_Toner_Low’, ’Printer_Offline’, ’Printer_Output_Full’, ’Printer_Paper_Jam’, ’Printer_Door_Open’ ]
�: � ��� _class ��� ���� ��� �� ���� �� ���
��� ��� �� � ���. �� ��, ��� ��� �� ��
� �� �� � ���. ���� �� �� � ��,
_class ��� ��� ��� ���� �������.
event: _event of_class _class within [’Printer_Paper_Out’, ’Printer_Toner_Low’, ’Printer_Offline’,
� 4 � � �� �� 71
’Printer_Output_Full’, ’Printer_Paper_Jam’, ’Printer_Door_Open’ ]
�� ����� ��� LIST_OF �� ���� ��� ��� �����.
;Class file
TEC_CLASS: Logfile_Base ISA EVENT DEFINES { alist: LIST_OF STRING, default=[’Printer_Paper_Out’, ’Printer_Toner_Low’, ’Printer_Offline’]; }; END
;Rules file print_reset: ( event: _event of_class ’Printer_Error_Cleared’ where [ status: equals ’OPEN’, alist: _aclasslist ], reception_action: ( first_instance( event: _prt_ev of_class within _aclasslist where [ status: outside [’CLOSED’] ], _event - 3600 - 3600 ), change_event_status(_prt_ev, ’CLOSED’) ) ).
_class outside [class_name1, ...]
� ��� ��� ��� ���� �� ��� ��� ���� �� ���
���. ���� ���� ��� ��� ��� ��� ��� �� �
��. ���� ��� �����, ��� ��� �� �� ��
�� ����. ��� �� ��� ��� ��� ������� ��� �
�� �� �� ������ ����� �� ���� �� ���� �
���. fire_on_non_leaf ���� ���� �� ���, ��� ��� �
� �� ��� ���� ������ �� �� ���� ����. ��
��� ���� ��� � � ���� ���� ����.
event: _event of_class outside [’Printer_Paper_Out’, ’Printer_Toner_Low’, ’Printer_Offline’, ’Printer_Output_Full’, ’Printer_Paper_Jam’, ’Printer_Door_Open’ ]
�: � ��� _class ��� �� �� _class�� ��� �� �� ��
� ���.
72 IBM Tivoli Enterprise Console: � �� ���
�� ��: �� ���� ��� ��� �� � ��� � �� �� �
���. �� ��� ��� ��� where ����. �� ��� ����
�� �� �� �� ��� �� ���� � ��� ���� ����. �� �
� �� ��� �� ��� ��� ���� � ���. ��� ��� _class
��� ����, ��� �� �� ��� ���� ����.
���� �� ��� ����� �� ��� ��� ��� �� ��
�� ����. ���� ��� ��� ��� �� � �� �� ��� ���
�� �����.
�� ��� �� �� ��� �� � ���. where �� where ���� ��
���� ���� �� ���� ����. where �� �� �� ��� ���
��� �����. �� ��� ���� ���� � where �� ��� ���.
v �� �� ���. �� ��� �� �� ����� � ����.
comparison_operator
�� �� �� �� ���. �� ��� ��� ����.
– equals
– greater_than
– greater_or_equals
– smaller_than
– smaller_or_equals
– within
– outside
within ��� �� �� ��� � ��� ��� ��� ���
�� ��, outside ��� �� �� ��� �� �� ��� ��
� ������.
�� ��� �� ��� �� OPEN� ��� ������. OPEN�
��� ���� ��� ������ ���, ������ �� ��
� � ������ ��� ����.
where [status: equals ’OPEN’],
�� ��� �� ��� �� OPEN �� ACK� ��� �����
_status ��� ��� �������.
where [status: _status within [’OPEN’,’ACK’]],
�� ��� �� ��� �� CLOSED ��� �� ��� ����
��.
where [status: outside [’CLOSED’]]
�: ��� ��� ��� �� ��� ��� ����� �����.
� 4 � � �� �� 73
v ��� �� ��� � ����. �� ��� �� _status ��� �� ��
� ��� �������. �� �� � ���� ����.
where [status: _status],
v �� ��� ��. �� ��� �� ���� ��� critical ��� ���
� �� ������. ���� ���� ���, _hostname ��� ���� �
� ���� ���� �������.
where [ status: _status outside [’CLOSED’], severity: equals ’CRITICAL’, hostname: _hostname ],
�� � ��
�� �� �� ��� �� ��� �� � ���.
v �� ��
v �� �� ��
��� ��: �� �� �� ��� �� ��� ��� �� ����� ���
�. �� ��� ��� �� ��� � � ���.
agent ��� ���
engine
� ��
operator(��)
��� � ���� ��
�� ��� �� �� ��� ��� ����.
equals ��� �� �� ��� ������. �� ��� ��� � ��
� ��� ������.
sender: equals engine,
�� ��� ��� ��� ��� ������. � ��� �� ��
� �� � � � �� _sender� ������� ���(_x ���
�� ����� �� � ��).
sender: _sender equals operator(_x),
outside
��� ��� � ��� �� ��� ��� ������. �� ���
��� ��� ��� ������.
sender: outside [agent,engine],
74 IBM Tivoli Enterprise Console: � �� ���
within ��� ��� � ��� ��� ��� ������. �� ��� ��
� �� ��� ���� ��� ����� ���� ��, _sender �
�� �� ��� �������.
sender: _sender within [operator(’root@orange’), operator(’root@red’), operator(’root@blue’) ],
��, �� ������ �� ��� ��� �� ������ � �� ��
� �� � ���.
sender: _sender,
�� �� ��: �� �� �� �� ��� ���� �� �� �� ��� ���
�� ����� ����.
�� �� ��� �� ��� ��� � set_to���. set_to ��� ���
� ���� ��� ��� �����. set_to ��� ���� � ���
� ��� ��� ��� �, �� ��� ��� �� ���. set_to ��� �
��� � ���� � � �� �� ��� � ���. �� ��� ��, �
�� ��� ��� �� ���� � ���� ���.
�� ��� �� �� ���� � ����.
v equals
v greater_than
v greater_or_equals
v smaller_than
v smaller_or_equals
v within
v outside
within ��� �� �� ��� � ��� ��� ��� ����� ��,
outside ��� �� �� ��� �� �� ��� ��� ������.
�: ��� ��� ��� �� ��� ��� ����� �����.
�� ����� ��� �� �� ��� �����.
v �� �� ��� �� ��� CLOSED� ������ �����.
attribute: status set_to ’CLOSED’,
�: �� �� ��� �� �� ���� IBM Tivoli Enterprise Console ���
�� ����� �������. �� �� ���� �����. � ���
� ��� ���, �� ����� �� �� ���.
� 4 � � �� �� 75
v �� �� ��� �� ��� �� �� ��� ������ �����. _newstatus
��� ��� ���� ��� �������.
attribute: status set_to _newstatus,
v �� �� ��� �� ��� ACK �� CLOSED� ������ �����.
_newstatus ��� ��� ���� � ��� �������.
attribute: status set_to _newstatus within [’ACK’,’CLOSED’],
v �� �� ��� repeat_count ��� 5�� � ��� ��� ��� �����.
_newrepeatcount ��� ��� ��� ��� �������.
attribute: repeat_count set_to _newrepeatcount greater_than 5,
v �� �� ��� �� ��� fred, wilma �� betty� ������ ����
�. _newadministrator ��� ��� ���� ��� �������.
attribute: administrator set_to _newadministrator within [’fred’,’wilma’,’betty’],
��� � ��
�� �� �� �� �� ��� �� � ���.
v timer_info ��
v timer_duration ��
timer_info ��: �� �� timer_info ��� set_timer �� timer_info
�� ��� �� ��� �� ����� ����. set_timer �� ���� �
��� ��� ���� � �����. set_timer �� timer_info �� �� �
(�: ��, � �� ���� ��(�: ��))� � � ���.
�� ��� timer_info ���� � ����.
v equals
v greater_than
v greater_or_equals
v smaller_than
v smaller_or_equals
v within
v outside
within ��� �� �� ��� � ��� ��� ��� ����� ��,
outside ��� �� �� ��� �� �� ��� ��� ������.
�: ��� ��� ��� �� ��� ��� ����� �����.
�� ����� ��� timer_info ��� �����.
v �� timer_info ��� �� ��� �� 1� ������ �����.
76 IBM Tivoli Enterprise Console: � �� ���
timer_info: equals ’Level 1’,
v �� timer_info ��� �� ��� �� 1 �� �� 2� ������ ���
��. _timerinfo ��� �� ��� ��� �������.
timer_info: _timerinfo within [’Level 1’,’Level 2’],
v �� timer_info ��� �� _timerinfo ��� �� ��� �������.
timer_info: _timerinfo,
timer_duration ��: �� �� timer_duration ��� set_timer ��
timer_duration �� �� ��� �� �� ����� ����. set_timer ��
���� ���� ��� ���� � �����. set_timer �� timer_duration
�� ��� �� ��� �� �� ���� �� ����.
�� ��� timer_duration ���� � ����.
v equals
v greater_than
v greater_or_equals
v smaller_than
v smaller_or_equals
v within
v outside
within ��� �� �� ��� � ��� ��� ��� ����� ��,
outside ��� �� �� ��� �� �� ��� ��� ������.
�: ��� ��� ��� �� ��� ��� ����� �����.
�� ����� ��� timer_duration ��� �����.
v �� timer_duration ��� �� �� ��� 60 � ����� �����
� �����.
timer_duration: equals 60,
v �� timer_duration ��� �� �� ��� 60 �� 90 � �����
������ �����. _timerduration ��� �� �� ��� ��� ��
�����.
timer_duration: _timerduration within [’60’,’90’],
v �� timer_duration ��� �� _timerduration ��� �� �� ����
�������.
timer_duration: _timerduration,
� 4 � � �� �� 77
��
�: � �� ��� ��� �, �� � �� �� �����. � �� 66 �
��� �� �� �� ���� ��� �� � �� � � ��� ����
�. �� �� �� ��� �� 68 ���� ��� �� �� ���� ��� �
� ��� ��� �����.
���� �� � ��� ��� ��� ����, �� ���� � ��
� �� ��� �����. ��� �� ��� �� �� �� ��� ���
� ���. ��� � ��� �� ��� � �� � ���. ��
����� �� �� � ��� ��� �����.
��� ��� �� ��� ����, ��� ����� �����.
v action
v reception_action
v redo_action
��� � �� �� � ��� � ��, � � ��� ��� ���. ��
��� �� ��� ��� ��� ���. ��� ��� ��� ���� ��
�, � ����� ��� ��(�: action_1, action_2 �)� �����.
��� ���� ���� �(�: commit_action �)� ��� �� �, � �
�� ���� ��� �� ��� ��� ��� ��� �����. �� ���
� �� �� ��� ��� ���� �� ����. (���, �� �� � ��
��� Prolog �� �� �� ����.) Prolog �� �� �� ��� �� �
� ��� �� ����� ���, �� � �� ��� ��� �� ��� ���
�� �� �����.
�� ��
��� ��� �� ���� � �� ��� � �����.
action �� ��� ��� �����. � ��� �� ���� �� �����.
reception_action
�� ��� ���� �� ���� �� ��� � �����. � ���
78 IBM Tivoli Enterprise Console: � �� ���
� � ���� ����� ��� ��� � �����.
reception_action� � ��� ����.
�: �� ���� generate_event �� ���� ��� �� ���� �
� ��� ���� ��� reception_actions� ��� �� ���� �
� �����.
redo_action
��� ��� ��� ��� ���� ����� �� �����. ���
��� ���� ����. redo_analysis �� ��� ��� ���.
redo_action� � � ��� ����.
�� ����� �� �� ��� ���� �����.
v oserv_script reception_action� ���� universal_oserv�� ���� WARNING
�� ���� ���� ��� �����. reception_action� ��� ��� �
��� ���� ����.
v link_host �� ��� ��� ��� �� �� �� �� ���� �� ��
���. ���� �� ������, ��� ������ �� ��� ���� �
�� ���.
� ��� �� �� �� redo_action��� ������, ��� �� �� �
����. �� ��� ���� ��� ��� ���� ��� ��� ��� �
��� ��� ����� . ��� ��� �� �� ��� 215 ����
�redo_analysis�� ������.
rule: link_oserv_to_host: ( description: ’Link the universal_oserv to universal_host if they are related’, event: _event of_class ’universal_oserv’ where [probe_arg: _probe_arg, severity: equals ’WARNING’], reception_action: ’oserv_script’: ( exec_program(_event, ’oserv_beep.sh’,’%s’,[_probe_arg], ’YES’) ), action: ’link_host’: ( first_instance( event: _host_ev of_class ’universal_host’ where [severity: within [’CRITICAL’,’FATAL’], probe_arg: equals _probe_arg, status: outside [’CLOSED’] ]), set_event_status(_event,’ACK’),
� 4 � � �� �� 79
link_effect_to_cause(_event, _host_ev) ) ).
���
���� �� � � ���. � �� �� � �� ���� directive: ���
���� �����. ��� �� � ��� ���� �����, ���� ���
�����(�: directive: fire_on_non_leaf, profile). ���� ��� �� ���
��.
fire_on_non_leaf
�� �� �, ����� ���� �� �� �� �� ��� ��
�. � ���, �� �� �� ��� ���� ��� �����. ��
�� ��� � ��� �� ��� �� ���.
�� ����� ��� ��� �����. � �� ��� � ��� ��
� EVENT� ��� ��� ���� ��� �� �� ���� ����
���. �� �� ���� � ��� ������ �����.
rule: test_rls: ( directive: fire_on_non_leaf, event: _evt of_class within [ ’EVENT’ ] where [ ], reception_action: action0: ( drop_received_event ) ).
profile
� �� ����� �� ��� ���. � ���� ����� � �
� �� ��� ���� �� ��� �� � �� ����. profile �
��� � ��� �� �� �� � �� �� � ���. �� wrb
-comprules -profile ��� ���� �� � ���� ����� ��
���. ����� � ��� �� � ����. �� ��� 264 ���
� �� ������� ������.
trace � ��� ��� �� ��� ���. trace ���� � ��� �� ��
�� � �� �� � ���. �� wrb -comprules -trace �� �� �
�� �� �� ���� �� � ���� �� �� ���. ��� �
��� �� � ����. �� ��� 259 ���� �� ���� ���
���.
80 IBM Tivoli Enterprise Console: � �� ���
� �� ��
�� ��� � �� �����. �� ����� �� ����� �����
� �� ����. � ��� �� ���� Prolog ��� ��� �� �,
��� �� ����� �� �� ����� �� ���. �� ��� ��
��� �� ���� ��� �� ����� �� ��� � �� ���.
57 ���� � 4 � �� �� ���� Prolog� �� ��� �� ��� ��
���� �� ���.
� ���� IBM�� ��� �� �� �����. �� �� �� �� ��
���� ��� ����� ���. �� �� � �� ��� �� �� �
��� �� ��� ���.
� �� �� � ��
� �� �� ������. ��� ��� �� ��� �� �� � �� ��
�� ���� �� ���. �� 88 ���� �� �� �� �� � �
�� �� �����.
��� ��
� �� ��� �� ���� ���� ���� ��� ��� �� �� �
� ���� �� � �� �, ���, � � ��� ���� ��� �
�� ���� ����. �� ��� ��� ���� ��� ��� �� ��
� ��� ���� �����.
239 ���� � 5 � ��� ���� � �� ���� �� �� ��� ���
��.
�� ��� � ��� �� � �� ���.
� ��
all_clear_targets ��� ��� ���� ��� ��� �� ���� ��
���.
any_clear_target ��� ��� ���� ��� ��� �� � ����
�����.
any_clearing_event �� ���� ��� ��� �� ���� �����.
attr_condition ��� ���� � ���� �� �� �� ��� ��
���.
attr_exception ��� ���� �� ���� �� ��� ��� ��
��� �����.
attr_sequence ��� ���� ���� ��� �� ���� ��� �
� �����.
clears ��� ���� �� ��� ���� �� ��� ���
� �����.
� 4 � � �� �� 81
� ��
create_clearing_event ��� ���� �����.
create_event_sequence ��� �� ���� ��� �����.
first_causal_event � ���� ��� � � ���� �� ��� �
�� ����.
first_effect_event � ���� ��� ��� ����� �� �� � �
��� �� ��� ��� ����.
first_related_event �� ���� ��� ����� �� �� ���� ��
��� ��� ����.
is_clearing_event ���� create_clearing_event �� create_event_sequence
�� � ��� ����� ������ ������.
link_effect_to_cause � ���� � ���� �����.
unlink_from_cause � ����� � ����� ��� �����.
��� �� ��
� �� ����� ����� ��� ���� �� � �� ���
� ��� ���� �� ��� ��� ���� ����. �� ���� �� ��
� �� �� ���� �� ���� ���� �� ���� � �����. �
�� �� � �� ���� � � ���� �� ��� ��� ����.
v ��� ��� ���� � ����� � ���� �����.
v ��� ��� ���� �����.
v ���� ��� ��� ���� ��� ���.
v � ���� ���� �����.
v ��� �� � ��� �� ���� ����.
v ��� ��� ��� �����.
���� �� ��, ��� �� ��� �� ��� �� � ���.
v ��� ���
v �� ��
v �� ����� �� ��� ��� �� �� ��� �� ��
v ��� ��� � �� �� ���� �� ��� �� �� ��� �
�� ��� ��� �� ���
v �� � �� �� ���
v �� �� ��� �� ��� �
v ����� ���� ���� ��� ��
82 IBM Tivoli Enterprise Console: � �� ���
�� ��� � ��� �� � �� ���.
� ��
all_duplicates ��� �� �� � �� � ��� ��� ���
� ���� �� � � �����.
all_instances ��� ��� ��� ��� ���� �� � � ��
���.
create_cache_search_criteria ��� �� ��� �� ��� �� �����.
first_duplicate ��� �� �� � �� � ��� ��� ��
� ���� �� � � �����.
first_instance ��� ��� ��� �� ���� �� � � �
����.
print_cache ��� ��� ��� �����.
search_cache create_cache_search_criteria �� ��� ��� ��
�� ��� ��� ��� �����.
��� ����:
v ��� �� � ��� ��� ��� ��� ���� �� �� �� ��
���� ���, �� ��� �� ���� � ��� �����.
v �� � �� ���� �� �� �� � �� �� �� � ��� �
��. �� �� � �� ���� ���� � �����
���� ���� ��� ���� �� �� �� ���� �� ���
�� � ��� ���. ���� ���, �� �� �� ��
�� �� ������ �� 0�� �����. �� � �� �� ���� �
��, �� ��� ����.
v ��� � �� ��� redo_analysis, �� � �� �� � �� ��
�, ���� ��� ���� � � ��� ���� ��� � ���.
� ���: � ���� �� ��� �� �� ���� ��� �����
�.
v dup_detect facet� YES� ��� �� ��� �� �� �
v dup_detect facet� YES� ��� ��� ���, ���� �� ���� ��
��.
�: ��� �� ����� � ���� ���� � ���� �� � ���.
�� ��� 73 ���� ��� ���� ������.
����� � ���� ��� ������� ���� ��, �� ���� �
��� �� ���� ��� �� �� � �����.
� ���� first_duplicate � all_duplicates �� �����.
� 4 � � �� �� 83
�� ��
�� �� � �� ��(�:� �� ��, � �� �� �� � ���� �� �
�)� ���� ����.
��� ���� ��, �� � ���� �� � ��� �� ��� ��
�� �� � ��� �� �� ��� ���, ��� � ��� �� ���
�� �����. �� ���� � ��� � ��� ���� ��� ��� �,
� �� �� � ���� �� ���� � ���.
�� ��� � ��� �� � �� ���.
� ��
commit_action � �� �� ��� ��� �����.
commit_rule � �� ��� ��� �����.
commit_set � ��� ��� ��� �����.
BAROC �
�� �� � ��� �� ����� ��� BAROC ��� ���� ����.
�� ��� � ��� �� � �� ���.
� ��
bo_add_at_slotval_begin ��� ��� ��� � �� ��� �����.
bo_add_at_slotval_end ��� � �� �� ��� ��� �����.
bo_get_class_of ���� ���� ����.
bo_get_class_slots ��� ���� �� �� ��� ����.
bo_get_enum_options � ��� ����.
bo_get_slotval ������ ��� �� ����.
bo_is_defined_for_class ��� ��� ���� �� ������ � ���.
bo_is_direct_super_of ��� ���� �� ��� ���� � �����
� � ���.
bo_is_super_of ��� ���� �� ��� ���� ������ �
���.
bo_remove_from_slotval �� � ������ �� ����.
bo_reset_default_slotval ���� �� �� �� � ��� ������.
bo_set_slotval ��� �� �� �����.
print_class_tree ��� ��� �� �� ��� �� � ������ �
�� ����� �����.
��� �
�� �� ���� ��� ���� � ��� �� ���� ����.
create_event_criteria �� ���� ��� �� � �����. ��� ��
check_event_criteria �� �� �� � ���� ��� �� �����. �� �
84 IBM Tivoli Enterprise Console: � �� ���
�� � � ��� ��� ��� �� �� �� ���� �� �� �
�� � �� ���� ��� � ���.
�� ��� � ��� �� � �� ���.
� ��
check_event_criteria ���� �� ��� ���� �� �� ����
�����.
create_event_criteria � � �� �� � � � ��� � . ��� � �
check_event_criteria � � create_cache_search_criteria
�� �����.
��� �
�� �� ��� �� ��� ���� ���� � ��� �� ���� ��
��.
�� ��� � ��� �� � �� ���.
� ��
init_event_activity ��� � ���� ��� �� �� �� ����
�.
print_event_activity init_event_activity �� ��� ��� � ���� �
����.
reset_event_activity �� ��� �� �� �� �� 0�� ������.
update_event_activity print_event_activity_report �� ��� �� ��� �
�� �����.
�
�� �� ��� �� �� ��� �� ���� ������ � �� �� ��
� ��� ���� � ��� �� ���� ����. ��� ���� ��
�� ���. �� ��� � ��� �� � �� ���.
� ��
check_all_thresholds �� ���� �� ���� �� ���� �� �
����.
check_threshold �� ���� ���� ���� �� ���� ��
�����.
create_threshold ���� �����.
�� � �
�� �� ��� �� � �� ���� �� �� � � ��� �� ���
��. �� � � �� Perl ���� ���� Tivoli Management Framework�
�� ���� �� ����. �� �� � ��� ���� � log_error �
� ���� ��� �� �� �� ��� ���� TEC_Error ���� ��
� 4 � � �� �� 85
��. �� ��� � ��� �� � �� ���.
� ��
re_after_match ��� �� � �� ���� � ��� ��� �
�� �� ��� �� ��� � ���� �����.
re_before_match ��� �� � �� ���� � ��� ��� �
�� �� ��� �� ��� � ���� �����.
re_create �� �� � � �� � �� �� � �� ��
���.
re_match ��� �� � �� ���� � ��� ��� �
�� ��� �����.
re_search_string ��� �� � �� ���� � ��� ��� �
���.
re_substitute ��� �� � �� ���� � ��� ��� �
��, ��� ���� � � � ���� �����.
re_substitute_global ��� �� � �� ���� � ��� �� ���
���, �� ��� ���� � � � ���� �
����.
��� ��
��� ��� �� �� ��� �� �� ��� ��� ���� ����. ��
� ��� 59 ���� ���� ���� ���� ���.
�� ��� � ��� �� � �� ���.
� ��
erase_globals �� ������ ��� �� �� �� ��� ��� �
���.
get_global_grp ��� �� �� �� ��� ��� �� ����.
get_global_var ��� ��� �� ����.
get_globals �� ��� ��� ����.
global_exists ��� ��� ��� �� ��� � ���.
load_globals ��� ��� ���� �� ���� �����.
reset_global_grp ��� �� �� �� ��� ��� �� ������.
save_globals �� ��� ��� ������ ��� �����.
set_global_var ��� ��� �� �����.
�� �
�� �� ��� ��� ��� �� ���� ����.
86 IBM Tivoli Enterprise Console: � �� ���
�� ��� � ��� �� � �� ���.
� ��
convert_ascii_time �� ��� �� �����.
convert_gm_time �� �� �� ���� ��� �� ��� �����.
convert_local_time �� �� �� �� �� ��� �� ��� ����
�.
get_gm_time ���� ��� � � � ��� ����.
get_local_time � �� �� ��� ����.
get_time ��� � � �� ��� � ��� ����.
resolve_time �� ��� ��� ����.
�� � ��� ��
�� �� ��� �� ���� ��� �����.
� ��
exec_program ���� �����.
exec_program_local ���� �� ���� �����.
exec_task ���� ��� �������� �����.
exec_task_local ���� �� ��� ��� �������� ��
���.
�� � �� �
�� �� ��� ��� �� � ��� ��� ����� �����.
� ��
add_to_repeat_count ���� repeat_count ��� �� �����.
change_event_administrator ���� ��� �����.
change_event_severity ���� ���� �����.
change_event_status ���� ��� �����.
decrement_slot ��� �� �� ��� �� ���.
get_attributes ��� �� �� ����.
increment_slot ��� �� ��� �� �� �����.
place_change_request �� �� ��� �����.
re_split_event_id server_path ��� ��� ��� �� ���.
set_event_administrator ���� �� ��� �����.
set_event_message ���� msg ��� �����.
set_event_severity ���� ���� �����.
set_event_status ���� ��� �����.
� 4 � � �� �� 87
�� �
��� �� �� ����.
�� ��� � ��� �� � �� ���.
� ��
check_and_increment_count init_count �� �� ��� ��� � ���.
clear_closed_events ��� ����� �� ��� ���� ����.
drop_change_request �� �� ��� �� �� ��� ���� �� ���
�.
drop_received_event �� ��� �� ���� ����.
forward_event ���� ��� ��� �����.
generate_event �� ���� ����.
get_config_param � �� �� ��� ����.
init_count ��� ���� �����.
ip_node_unreachable ���� �� � �� ����� ��� ��� ��
���.
re_mark_as_modified ��� ������� ���� �� ��� �����.
re_send_event_conf ���� �� ��� ��� ����.
redo_analysis ���� �� �� �����.
remove_bslashes ��� ���� ���� ��� �����.
set_timer ���� ��� �����.
���
�� �� ��� ��� �� �� ����� �� ����.
�� ��� � ��� �� � �� ���.
� ��
log_error � ��� ���� �� ���� ����.
set_detailed_debugging �� �� � ��� �� ��� ���.
set_log_error_source log_error �� �� �� �� ������ ��
�� �� �� ID� �����.
trace_it �� �� � �� ��� � �� ��� �����.
� �� �� ��� �
�� ��� � �� �� ���� � �� ���.
88 IBM Tivoli Enterprise Console: � �� ���
add_to_repeat_count ���� repeat_count ��� �� �����.
��: add_to_repeat_count(_event, number)
��: � �� ����� ��� � ���� �� ���� � �����.
� ���� ��� � �� ���� repeat_count ��� � �� ���� �
���� �����.
��:
_event repeat_count ��� ���� ���
number
�� repeat_count �� �� ���� �
�: �� ����� ��� ���� �� ���� ���� �� �����.
1. ��� �� ��� ���� ���� ���� �� ���� ��
�� � ���� �� �� �����. �� �� �� �� 10���.
2. � ���� ���� ���� ��� ���� repeat_count ��� 1 ���
�, �� ��� ���� ����, � �� �� � ��� �����.
�� ���� ���, �� ��� ���� ����� ���� ��� ���
�����.
rule: printer_problem:( event: _event of_class within [’Printer_Paper_Out’, ’Printer_Toner_Low’, ’Printer_Offline’, ’Printer_Output_Full’, ’Printer_Paper_Jam’, ’Printer_Door_Open’], reception_action: ( first_duplicate( _event, event: _printer_ev where [ status: outside [’CLOSED’] ], _event - 600 - 600 ), commit_rule, add_to_repeat_count(_printer_ev, 1), drop_received_event ) ).
��: first_duplicate
� 4 � � �� �� 89
all_clear_targets ��� ��� ���� ��� ���� �� ���� �����.
��: all_clear_targets(_clear_event, _target_event )
--��--
all_clear_targets(_clear_event, _target_event, time_before, time_after)
��: � �� _clear_event� ��� �� ���� �� ��� ��� ���
� �����. ��� ��� ���� _target_event� �����.
time_before � time_after �� ���� �� ��, ��� �� � �� ��
� ��� 2 (1 � � 1 �)� �����. � �� �� �� � ���
�� �� ��� �� ��� ��� ���.
��:
_clear_event
��� ����� �
_target_event
_clear_event� ��� ���� ��� ��� ����� �. � ���
���.
time_after
_clear_event� ��� �� �. � �� ��� �� �� �� ��
� ���� � �����.
time_before
_clear_event� ���� �� �. � �� ��� �� �� �� �
�� ���� � �����.
�: �� ��� ���� �� ��� �� ���� �� ��� ���
����. ��� ���� ��� � �� �����. � �� � ����� �
��� ���� �� �� ���� ������.
rule: ’clear_target_events’:( event: _clr_ev of_class ’EVENT’, action: ’search_for_target’:( all_clear_targets(__clr_ev, _tgt, 3600, 0), set_event_status(_tgt, ’CLOSED’) ) ).
��: any_clear_target, create_clearing_event, create_event_sequence
90 IBM Tivoli Enterprise Console: � �� ���
all_duplicates ��� �� �� � �� � ��� ��� ��� � ���� �� � � ��
���.
��: all_duplicates(_event, event: _duplicate where attribute_conditions)
--��--
all_duplicates (_event, event: _duplicate where attribute_conditions, _referenceEvent
-time_before -time_after)
��: � ��� � ��� ����� ���� ����. ���, all_duplicates
�� � �� � �� ��� �����. � ��� all_duplicates �� �
� �, �� �� ����� �� ��� �� �� ���� �� �
� ��� �����.
� ���� ���� �� ������ ��� ��� ���� ��
��. � ���� �� �� ��� 83 ���� �� ����� ������.
��:
_event � ����� �
_referenceEvent
� ��� �� �� �� �� ����� �
event:_duplicate where attribute_conditions
��� �� ��� �� ��� ��� �����. _duplicate� ��� �
�� � ����� �� �������. �� ��� 70 ���� ��
�� ���� ������.
-time_after
�� ��� �� �
-time_before
�� ��� �� �
�: �� ����� �� ��� ���� �� �����.
1. ��� �� OV_NODE_DOWN ����� ���� 600 �� �
�� � �� �� ��� ��� �����.
2. � ���� ���� �� ���� ���� �� ���� ��
���.
rule: dup_nfs_not_resp:( event: _event of_class ’OV_NODE_DOWN’ where [severity: _severity],
� 4 � � �� �� 91
action: dup_event_severity:( all_duplicates(_event, event: _dup_OV_ev where [status: outside [’CLOSED’] ], _event -300 -300 ), set_event_severity(_dup_OV_ev, _severity) ) ).
��: first_duplicate
92 IBM Tivoli Enterprise Console: � �� ���
all_instances ��� ���, �� � �� � ��� ��� ��� ���� �� � � ���
��.
��: all_instances(_event, event: _eventInstance of_class class where
attribute_conditions)
--��--
all_instances(_event, event: _eventInstance of_class class where attribute_conditions,
_referenceEvent -time_before -time_after)
��: � ��� � ��� ����� ���� ����. ���, all_instances
�� � �� � �� ��� �����. � ��� all_instances �� ��
�, �� �� ����� �� ��� �� �� ���� �� �
� ��� �����.
��:
_event � ����� �
_referenceEvent
� ��� �� �� �� �� ����� �
event: _eventInstance of_class class where attribute_conditions
��� �� ��� �� ��� ��� �����. _eventInstance� ���
� ��� ���� �� �� �������. �� ��� 70 ��
�� ���� ���� ������.
-time_after
�� ��� �� �
-time_before
�� ��� �� �
�: �� �� ��� �� ��� Pascal �� �� ��
NFS_SERVER_NOT_RESPONDING ���� �� �����.
action: ( all_instances(_event, event:_nfs_ev of_class ’NFS_SERVER_NOT_RESPONDING’ where [server: equals ’Pascal’]), set_event_status (nfs_ev, ’CLOSED’) )
��: first_instance
� 4 � � �� �� 93
any_clear_target ��� ��� ���� ��� ��� � �� � ���� �����.
��: any_clear_target(_clear_event, _target_event)
--��--
any_clear_target(_clear_event, _target_event, time_before, time_after)
��: � �� _clear_event� ��� �� ���� �� ��� ��� �
�� � �����. ��� ���� _target_event� �����.
time_before � time_after �� ���� �� ��, ��� �� � �� ��
� ��� 2 (1 � � 1 �)� �����. �� �� �� �� � ��
� �� �� ��� �� ��� ��� ���.
��:
_clear_event
��� ����� �
_target_event
_clear_event� ��� ���� ��� �� ����� �. � ��
� ���.
time_after
_clear_event� ��� �� �. � �� ��� �� �� �� ��
� ���� � �����.
time_before
_clear_event� ���� �� �. � �� ��� �� �� �� �
�� ���� � �����.
�: �� ��� ���� �� ��� �� ��� ���� �� �
�� ��� ����. ��� ���� ��� � �� �����.
rule: ’clear_target_event’:( event: _clr_ev of_class ’EVENT’, action: ’search_for_target’:( any_clear_target(_clr_ev, _tgt, 3600, 0), set_event_status(_tgt, ’CLOSED’) ) ).
��: all_clear_targets, create_clearing_event, create_event_sequence
94 IBM Tivoli Enterprise Console: � �� ���
any_clearing_event �� ���� ��� ��� � �� ���� �����.
��: any_clearing_event(_event, _clear_event)
--��--
any_clearing_event(_event, _clear_event, time_before, time_after)
��: � �� _event� �� ��� � � �� ��� ���� �� ��
� ��� ��� � �����.
time_before � time_after �� ���� ���, ��� �� � �� �� �
� 2 (1 ��, 1 ��)�� �����. � �� �� �� ���� ���
� �� �� ��� �� ��� ��� ���.
��:
_clear_event
_event� �� ��� �� ��� ����� �. � ��� ���.
_event ��� ���� ��� � ����� �
time_after
_event� ��� �� �. � �� ��� �� �� �� ��� ��
�� � �����.
time_before
_event� ���� �� �. � �� ��� �� �� �� ��� �
��� � �����.
�: �� ��� ���� ��� �� ��� ���� �� ���
��� ����. ��� ���� ���� ���� �� ���� ��
� �����. � �� � ����� ����, ���� �� �� ���� �
�����.
rule: ’check_for_clear’:( event: _ev of_class ’EVENT’, action: ’search_for_clear’:( any_clearing_event(_ev, _clr, 3600, 0), set_event_status(_ev, ’CLOSED’), commit_set ) ).
��: create_clearing_event, create_event_sequence
� 4 � � �� �� 95
attr_condition ��� ���� � ���� �� �� �� ��� �����.
��: attr_condition([classes], [attribute_conditions])
��: � �� ��� ���� �� ��� ���� �� �� ��� ����
� �����. create_event_sequence �� event_details ���� �� ���
�� ���. (create_event_sequence �� attribute_conditions �� ���
���� �� ���� �� �� ��� �����.)
��� ���� �� �� ��� clears �� �����.
��:
classes
�� ����, �� ��� ��� �� ��� ��� ���� ��(�:
[‘upsOnBattery’, ‘lowBattery’, ‘upsDischarged’])
attribute_conditions
��� ���� classes �� ��� ��� ���� ����� ���
�� �� ��� ��. �� ��� �����. �� ��� ��� ���
�� �� ��� �����(�: [severity,equals,‘HARMLESS’]) � ��
��� �����, �(nest) ��(�: [[severity,equals,‘HARMLESS’],
[hostname,equals,orange]]� ������.
��� ����, � �� �� �� �� ��� �� �� ����� 140
���� �create_event_criteria�� �� attribute_conditions � ��� �
�����.
�: �� ����� ���� ��(APC(American Power Conversion) ���
�� �� �� � IBM Tivoli Distributed Monitoring)��� ��� ���� ��
��� ��� �����. APC ���� �� �� ����� ���� � ��
� �� ��� �����. Tivoli Distributed Monitoring� universal_host ���
� probe_arg ��� ���� �� �� ����� �����.
attr_condition �� ��� ����� universal_host ���� ��� �� �
� ��� �����. (� ���� ��� �� �� FATAL�� ���.)
attr_exception ���� �� ��� ����� ����� ��� �� ��
�� �����.
create_event_sequence( [’upsOnBattery’, ’lowBattery’, ’upsDischarged’, ’universal_host’], [’hostname’, [’status’,’outside’,[’CLOSED’]]
96 IBM Tivoli Enterprise Console: � �� ���
[ clears(’powerRestored’,[ ], [’upsOnBattery’],[ ]), clears(’returnFromLowBattery’,[ ], [’lowBattery’],[ ]), clears(’dischargeCleared’,[ ],[’upsDischarged’],[ ]), clears(’universal_host’, [ [’severity’, equals,’HARMLESS’] ] [’universal_host’], [ ]), attr_condition(’universal_host’, [’severity’,equals,’FATAL’]), attr_exception(’hostname’,’universal_host’, ’probe_arg’) ] ),
��: attr_exception, create_clearing_event, create_event_sequence
� 4 � � �� �� 97
attr_exception ��� ���� �� ���� �� ��� ��� �� ��� �����.
��: attr_exception(attribute, [classes], exception_attribute)
��: � �� ��� ��� �� ���� �� � ��� ���� �� ���
���� �� �� ��� ���� � �����. create_event_sequence ��
event_details ���� �� ��� �� ���.
�� ��, ���� ��� ���� hostname ���� ��� ��� ����
���� ������. �� ���� ��� probe_arg ��� ��� ���
��� �����. �� ��� �� � ���� ����� ����
attr_exception �� ���� �� �� ��� �� �� ���.
��� ��� �� � �� ��� � attr_exception �� ���� ���.
��:
attribute
�� ��� � ��. � ��� ��� ��� �� create_event_sequence
�� attribute_conditions �� ���� ���.
classes
attribute� �� �� ��� ��� ���� ��
exception_attribute
attribute� � �� ��
�: �� ����� ���� ��(APC ��� �� �� �� � Tivoli
Distributed Monitoring)��� ��� ���� �� ��� ��� �����. APC
���� �� �� ����� ���� � ��� �� ��� �����. Tivoli
Distributed Monitoring� universal_host ���� probe_arg ��� ���� �
� �� ����� �����. attr_exception ���� ���� ����� �
�� �� �����.
create_event_sequence([’upsOnBattery’, ’lowBattery’, ’upsDischarged’, ’universal_host’], [’hostname’, [’status’, ’outside’, [’CLOSED’]], [attr_exception(’hostname’, ’universal_host’, ’probe_arg’)] )
��: create_event_sequence
98 IBM Tivoli Enterprise Console: � �� ���
attr_sequence ��� ���� ���� ��� �� ���� �� �� �����.
��: attr_sequence(class, attribute=[value_sequence])
��: � ��, ��� ��� �� ��� ���� �� �� ���� ��
� ��� ��� ���� �� �����. create_event_sequence �� event_details
���� �� ��� �� ���. �� ��� �� � � ��� �� ��
� ���� ����� ��� ���� ��� �� �����.
�: � � � �� ��� ��� ���� � ��� ��� �� ��� ��
� ���.
��:
attribute
�� �� ��� ���� ��� ��
class ��� �� ��� ���� ��
value_sequence
��� ���� ��� ���� �� �. � �� ��� �����.
�: �� ����� Compaq �� ���� ���� �� ��� ��� ����
�. � ���� �� �� ���(cpqTape3PhDrvStatusChange)���.
cpqTapePhyDrvCondition �� �� ��� ���� ��� OK ��� ��� �
���� �����.
��� ��� ��� � � ��� ���� �� ���� �� �� ���� ��
� ��� � � ���, �� �� � ��(���� ������ ��� ���
��)� attr_sequence �� ���� ���.
create_event_sequence( [’cpqTape3PhyDrvStatusChange’], [’hostname’, [’status’,’outside’,[’CLOSED’]]] [attr_sequence( ’cpqTape3PhyDrvStatusChange’, ’cpqTapePhyDrvCondition’=[’Degraded’, ’Failed’]) ] )
��: create_event_sequence
� 4 � � �� �� 99
bo_add_at_slotval_begin ��� ��� ��� � �� �� �� �����.
��: bo_add_at_slotval_begin(_event, _attribute, _value)
��: � �� _value �� _event ����� _attribute� �� � ��� ��
�� �����. � �� _attribute� ��� ��� �� ��� �� �
���.
��:
_attribute
_event�� ��� ��
_event ����� �
_value ��� �� �
�: �� ��� acl ��� ���� �� �����. � ��� ��
�� Su_Success ���� ����� �����.
rule: baroc_example: ( event: _event of_class _class, % _class is unified with Su_Success. action: ( % Before the call, the ’acl’ attribute contains % [admin]. bo_add_at_slotval_begin(_event, ’acl’,’user’) % Now the ’acl’ attribute contains [user,admin]. ) ).
��: ��
100 IBM Tivoli Enterprise Console: � �� ���
bo_add_at_slotval_end ��� ��� ��� � �� �� �����.
��: bo_add_at_slotval_end(_event, _attribute, _value)
��: � �� _value �� _event ����� _attribute ��� �� � ���
�� �����. � �� _attribute� ��� ��� �� ��� �� ��
��.
��:
_attribute
_event�� ��� ��
_event ����� �
_value ��� �� �
�: �� �� �� acl ��� �� �� �����. � ��� ����
Su_Success ���� ����� �����.
rule: baroc_example: ( event: _event of_class _class, % _class is unified with Su_Success. action: ( % Before the call, the ’acl’ attribute contains % [admin]. bo_add_at_slotval_end(_event, ’acl’,’senior’) % Now the ’acl’ attribute contains [admin,senior]. ) ).
��: ��
� 4 � � �� �� 101
bo_get_class_of ���� ���� ����.
��: bo_get_class_of(_event, _classname)
��: � �� _classname�� _event� ��� ���� ��� ����.
_classname� ��������, �� �� ���� ��� ��� �� �
�����.
��:
_classname
_event� ��� ��
_event ����� �
�: �� ����� ���� ��� ��� �� �� �����. �
��� ���� Su_Success ���� ����� �����.
rule: baroc_example: ( event: _event of_class _class, % _class is unified with Su_Success. action: ( bo_get_class_of(_event, _classname) % _classname is unified with ’Su_Success’. ) ).
��: ��
102 IBM Tivoli Enterprise Console: � �� ���
bo_get_class_slots ��� ���� �� �� ��� ����.
��: bo_get_class_slots(_classname, _attributes)
��: � �� _attributes ����� �� ��� ��� _classname� �� �
� ��� ����. ��� ���� ��� �� ��, �, ���� �� ���
�� ��� ���, �������� ��� ��� ���.
��:
_attributes
��� ��� ���� ��� ��� �� ��
��� ��� �� �� ��� �����.
1. ��
2. �� ��
3. �� ��
4. parse facet� �� ��
5. dup_detect facet� �� ��
��� ��� ��� �� ���� �� ���.
slot(attribute_name,complex_type, element_type,parse_setting,dup_detect_setting,’’)
_classname
��� ���� ��
�: �� ����� ���� ���� �� �� ��� �� ��
� �� �� �����. � ��� ���� Su_Success ���� �
���� �����.
rule: baroc_example: ( event: _event of_class _class, % _class is unified with Su_Success. action: ( bo_get_class_slots(_class, _slots) ) ).
�� ��� � ���� _attributes� �����. � ��� �� ��� ���
�� � �� IBM� �� ����� ���� ���.
[slot(server_handle,SINGLE,INTEGER,NO,NO,’’), slot(date_reception,SINGLE,INT32,NO,NO,’’), slot(event_handle,SINGLE,INTEGER,NO,NO,’’), slot(source,SINGLE,STRING,YES,NO,’’), slot(sub_source,SINGLE,STRING,YES,NO,’’), slot(origin,SINGLE,STRING,YES,NO,’’),
� 4 � � �� �� 103
slot(sub_origin,SINGLE,STRING,YES,NO,’’), slot(hostname,SINGLE,STRING,YES,NO,’’), slot(fqhostname,SINGLE,STRING,YES,NO,’’), slot(adapter_host,SINGLE,STRING,YES,NO,’’), slot(date,SINGLE,STRING,YES,NO,’’), slot(status,SINGLE,STATUS,YES,NO,’’), slot(administrator,SINGLE,STRING,NO,NO,’’), slot(acl,LIST_OF,STRING,NO,NO,’’), slot(credibility,SINGLE,INTEGER,NO,NO,’’), slot(severity,SINGLE,SEVERITY,YES,NO,’’), slot(msg,SINGLE,STRING,YES,NO,’’), slot(msg_catalog,SINGLE,STRING,YES,NO,’’), slot(msg_index,SINGLE,INTEGER,YES,NO,’’), slot(duration,SINGLE,INTEGER,NO,NO,’’), slot(num_actions,SINGLE,INTEGER,NO,NO,’’), slot(repeat_count,SINGLE,INTEGER,YES,NO,’’), slot(cause_date_reception,SINGLE,INT32,NO,NO,’’), slot(cause_event_handle,SINGLE,INTEGER,NO,NO,’’), slot(pid,SINGLE,STRING,YES,NO,’’), slot(from_user,SINGLE,STRING,YES,YES,’’), slot(to_user,SINGLE,STRING,YES,YES,’’), slot(on_tty,SINGLE,STRING,YES,YES,’’)].
��: ��
104 IBM Tivoli Enterprise Console: � �� ���
bo_get_enum_options � ��� ����.
��: o_get_enum_options(_enumname, _options)
��: _enumname � �� � �� ��� _options ��� �����.
��:
_enumname
� ��
_options
�� ��� �
�: �� ��� ���� �� SEVERITY � �� �� ���
��� ����. � ��� ���� Su_Success ���� ����� �
����.
rule: baroc_example: ( event: _event of_class _class, % _class is unified with Su_Success. action: ( bo_get_enum_options(’SEVERITY’, _options) % _options is unified with [UNKNOWN, % HARMLESS,WARNING,MINOR,CRITICAL,FATAL] ) ).
��: ��
� 4 � � �� �� 105
bo_get_slotval ������ ��� �� ����.
��: bo_get_slotval(_event, _attribute, _value)
��: � �� _event ����� _attribute �� �� ����. �� _value�
�����. _value� �� �� ����� _attribute� �� ��� ��� �
� ���.
��:
_attribute
�� � ��� ��
_event ����� �
_value _attribute �� �
�: �� ��� ������ sub_source ��� �� ����. � ��
� ���� Su_Success ���� ����� �����.
rule: baroc_example: ( event: _event of_class _class, % _class is unified with Su_Success. action: ( bo_get_slotval(_event, ’sub_source’,_sub_source) % _sub_source is unified with ’su’. ) ).
��: bo_set_slotval
106 IBM Tivoli Enterprise Console: � �� ���
bo_is_defined_for_class ��� ��� ���� �� ������ � ���.
��: bo_is_defined_for_class(_attribute, _classname)
��: � �� _attribute ��� _classname ���� ���� �� ����
�.
��:
_attribute
� ��
_classname
�� ��� �� � ��� ���
�: �� ��� ���� �� ��� pid�� ��� ��� �� �
����. � ��� ���� Su_Success ���� ����� ����
�.
rule: baroc_example: ( event: _event of_class _class, % _class is unified with Su_Success. action: ( bo_is_defined_for_class(’pid’, _class) % Succeeds. ) ).
��: ��
� 4 � � �� �� 107
bo_is_direct_super_of ��� ���� �� ��� ���� �� ������ � ���.
��: bo_is_direct_super_of(_super_classname, _classname)
��: _super_classname� _classname� � ������� �����.
��:
_classname
_super_classname� � �����
_super_classname
_classname� � �����
�: �� ��� ���� Logfile_Su ���� � ������ ��
���. � ��� ���� Su_Success ���� ����� �����.
rule: baroc_example: ( event: _event of_class _class, % _class is unified with Su_Success. action: ( bo_is_direct_super_of(’Logfile_Su’, _class) % This predicate succeeds because % ’Logfile_Su’ is a % direct superclass of ’Su_Success’. ) ).
��: ��
108 IBM Tivoli Enterprise Console: � �� ���
bo_is_super_of ��� ���� �� ��� ���� ������ � ���.
��: bo_is_super_of(_super_classname, _classname)
��: � �� _super_classname� _classname� � �� �� �������
�����.
��:
_classname
_super_classname� �����
_super_classname
_classname� �����
�: �� ��� ���� Logfile_Base ���� ������ ���
��. � ��� ���� Su_Success ���� ����� �����.
rule: baroc_example: ( event: _event of_class _class, % _class is unified with Su_Success. action: ( bo_is_super_of(’Logfile_Base’, _class) % _class was instantiated to ’Su_Success’ % in event filter. % This predicate succeeds because % ’Logfile_Base’ is a superclass % of ’Su_Success’. ) ).
��: ��
� 4 � � �� �� 109
bo_remove_from_slotval �� � ������ �� ����.
��: bo_remove_from_slotval(_event , _attribute , _value)
��: � �� _value �� _event ����� _attribute ��� �� � ���
��� ����. � �� _attribute� ��� ��� �� ��� �� �
���.
��:
_attribute
_event�� ��� ��
_event ����� �
_value _attribute��� � ��
�: �� ��� acl ������ ��� �� ����. � ��� �
��� Su_Success ���� ����� �����.
rule: baroc_example: ( event: _event of_class _class, % _class is unified with Su_Success. action: ( % Before the call, the ’acl’ attribute contains [admin]. bo_add_at_slotval_end(_event, ’acl’,’senior’), % Now the ’acl’ attribute contains [admin,senior]. bo_add_at_slotval_begin(_event, ’acl’,’user’), % Now the ’acl’ attribute contains [user,admin,senior]. bo_remove_from_slotval(_event, ’acl’, ’admin’) % Now the ’acl’ attribute contains [user,senior]. ) ).
��: ��
110 IBM Tivoli Enterprise Console: � �� ���
bo_reset_default_slotval ���� �� �� �� � ��� ������.
��: bo_reset_default_slotval(_event , _attribute )
��: � �� _event ���� _attribute ��� � �� �������.
��:
_attribute
_event�� ��� ��. �� ���.
_event ����� �
�: �� ����� � ��� �����. � ��� ����
Su_Success ���� ����� �����.
rule: baroc_example: ( event: _event of_class _class, action: ( bo_reset_default_slotval(_event, ’sub_source’) % The slot ’sub_source’ for the event % under analysis is set back to ’su’. ) ).
��: ��
� 4 � � �� �� 111
bo_set_slotval ��� �� �� �����.
��: bo_set_slotval( _event, _attribute , _value)
��: � �� _attribute ��� �� _event ����� _value ��� ����
�.
place_change_request ��� ���, �� �� � ��� �� ���� ���
����.
��, place_change_request�� ��, bo_set_slotval� ��� ������ �� �
�� � �� �� �� �� ���� ����. �� ���� ���� ���
�� �� ������ �� � �� �� �� � ��� �� ���� �
� �����. ���, � ���� �� �� ���� �� ��� bo_set_slotval�
���� ��, ��� ���� �� ����. ��� ����� ����� ��
�, re_mark_as_modified �� ��� ��� ������.
��:
_attribute
�� ��
_event �� ���� �� ��� �
_value ��� �� � �
�: �� ����� ���� hostname ��� � myhost� ����
�� �����.
bo_set_slotval(_event, hostname, ’myhost’)
��: bo_get_slotval, place_change_request, re_mark_as_modified
112 IBM Tivoli Enterprise Console: � �� ���
cancel_all_timers ���� ��� �� ��� �����.
��: cancel_all_timers(_event)
��: � �� ���� ��� �� ��� �����.
��:
_event �� ��� ��� ����� �
�: �� ��� �� ��� ���� ����� � ���� ��� �� ��
� �����. � ��� ���� ����� � ���� �� �� �� �� �
�� ����� �����.
rule: cancel_timers:( event: _ev of_class ’EVENT’, action: cancel_timers:( first_effect_event(_ev, _effect, 300, 300), link_effect_to_cause(_effect, _ev), cancel_all_timers(_effect) ) ).
��: cancel_timer
� 4 � � �� �� 113
cancel_timer ���� ��� ��� ��� �����.
��: cancel_timer(_event , _timer_duration, _timer_info)
��: � �� �� �� �� �� �� ���� ��� ��� ���
�����. ���, ���� ���� _event �� ���� ���. ����
�� �� ������ �� ��� �� �� Prolog �� ��(�� �)� �
� �� ���� ���. ������ �� ��� ��� ��� ����
��� ��� ���� ���.
��:
_event ��� �� ����� �
_timer_duration
��� �� ��( �). � �� ��� ��� � �����. �� �
�� 234 ���� �set_timer�� ������.
_timer_info
�� ��. � �� ��� ��� � �����. �� ��� 234 ��
�� �set_timer�� ������.
�: �� ��� ��� ��� ���� ���� �� ��� ��� ���� 5
��� ��� �����. 5 ��� ��� � ���� �� � �� �
� ��� ���� ��� ��� ��� � ���� �� � � ���� �
� ����� ���.
���� ����, ��� ��� �� 5 �� ��� ��� ���� �� ��
��.(��� ���� create_event_sequence �� �����.) ����
���� ��� ��� � ���� � ���� ���� �� ���� � �
��� ���� � ��� �����. ��� ���� ����� ���
� ��� ��� 5�� ����(��� � ���� ����� ��� ��)
��� �����.
��� � ���� 5 �� � �� ����, ��� ��� ���� �
���� � ���� ���� � ��� ���� ���� ��� �
����.
create_trouble_ticket �� ��� �� � ��� ��� �����. � ���
�� � scripts/create_trouble_ticket.sh�� ��� �� ��� �
�� ����� ����� �� ��� ���.
rule: set_timer_delay:( event: _ev of_class ’EVENT’,
114 IBM Tivoli Enterprise Console: � �� ���
action: perform_correlation:( first_related_event(_ev, _related, _type, 300, 300), ( _type == ’c’, link_effect_to_cause(_ev, _related), commit_set ; cancel_timer(_related, 300, _info), link_effect_to_cause(_related, _ev) ) ), action: set_timer:( set_timer(_ev, 300, 0), commit_set ) ). timer_rule: create_trouble_ticket:( event: _ev of_class ’EVENT’, timer_duration: equals 300, action: create_ticket:( exec_program(_ev, ’scripts/create_trouble_ticket.sh’, ’%ld’, [_ev], no) ) ).
��: cancel_all_timers
� 4 � � �� �� 115
change_event_administrator ���� ��� �����.
��: change_event_administrator(_event, new_administrator )
��: � �� ��� ���� administrator ��� ���� �� ��� ���.
��� �� �� ��� �� �� ��� ���� �� ��� ��� ���
�.
��:
_event ��� �� ����� �
new_administrator
� ��� ��
�: �� ����� ���� administrator ��� bjones� ����
�� �����.
change_event_administrator(_event, bjones)
��: set_event_administrator
116 IBM Tivoli Enterprise Console: � �� ���
change_event_severity ���� ���� �����.
��: change_event_severity( _event, new_severity)
��: � �� ��� ���� severity ��� ���� �� ��� ���. �
�� ��� �� ��� �� �� ��� ���� �� ��� ��� ���
�.
��:
_event ���� ��� ����� �
new_severity
� ��� ���
�: �� ����� ���� severity ��� CRITICAL� ����
�� �����.
change_event_severity(_event, ’CRITICAL’)
��: set_event_severity
� 4 � � �� �� 117
change_event_status ���� ��� �����.
��: change_event_status(_event, new_status)
��: � �� ��� ���� status ��� ���� �� ��� ���. ���
�� �� ��� �� �� ��� ���� �� ��� ��� ����.
��:
_event ��� ��� ����� �
new_status
� ��� ��.
�: new_status �� �� ACK�� OPEN ���� ��� ��� �
���.
�: �� ����� ���� status ��� ACK� ���� �� �
����.
change_event_status(_event, ’ACK’)
��: set_event_status
118 IBM Tivoli Enterprise Console: � �� ���
check_all_thresholds �� ���� �� ���� �� ���� �� �����.
��: check_all_thresholds(_referenceEvent , _name , _count)
��: � �� ���� ����� ���� �� ��� ���� ���� �
� �� �����. ��� �� ���� �� � � �����. � ���� �
�� �� � ���� ���� ���� �� �� _name � _count �� �
����.
��:
_count ���� ���� ���� �. � ��� ���.
_name �� ���� ��. � ��� create_threshold �� �����.
_referenceEvent
���� ����� ���� �� ��� ���� �� �� ���.
��� � ������.
�: �� ��� NT_Performance_Alert ���� ��� ��� �� ���� �
� ��� ��� �����.
check_all_thresholds(’NT_Performance_Alert’, _name, _count)
��: check_threshold, create_threshold
� 4 � � �� �� 119
check_and_increment_count ��� ����� �� ���� ���.
��: check_and_increment_count(_key1, _key2, _max_count, _cur_count)
��: � �� �� ��� ����� �� _max_count �� ���. �
� _max_count�� ��� �� ���� �� _cur_count� �����. � �
� �� _max_count�� �� �� ���� _cur_count� ������ ��
��.
�: ��� �� � ��� init_count �� ����, ��� � ���
� ���� check_and_increment_count �� ���� �� � ���.
check_and_increment_count �� ����� ��� 0 ��� ����
�� ��� 1� �����. � ���� ��� � �� ��� ���
�� �� ��� ��� �� �� ���. ���� ��� ��� �� �
� � ��� ����� �� ��� ���.
��� �� ��� � �� �� ���� � �����. _key1 � _key2� �
� �� ��� � ����� ��� � ���. �� ��, ��� ���
�.
v ��� ����� �� ���� �� �� �� ���� ��, �� � ��
� ��� ��� � ��� ���� �� ��� ���� event_class, hostname
��� ���� ��� � ���(�: perf_alert,orange).
v ����� ���� �� ��� �� �� �� ���� �� �� � ��
� ��� ���� � ��� ��� �� ��� ���� failure, component
��� ���� ��� � ���(�: paper_jam,flr4rm23).
��� ��� ��� �� ��� �����.
��:
_cur_count
��� �� � �. � ��� ���.
_key1 ��� �� 1� � ��. ����� ���.
_key2 ��� �� 2� � ��. ����� ���.
_max_count
��� �� ���. � �� ���� �� �����. ����� �
��.
�: �� ��� ��� ��� Printer_Jam� ��� �� ���� ���� �
� ��� �� ���. ��� ��� failure,component ��� ���� ����
�. Printer_Jam ���� hostname ���� ��� ���� �����.
120 IBM Tivoli Enterprise Console: � �� ���
��� ��� �� ���� �� ���� check_and_increment_count �� �
� � ���� �����. �� ���� �� ��� �� �� �� ���
�� �� �� ���� ���.
���� �� �� �� 5� �� � ���� ���, �� ���� �� �
�� init_count �� ���� 0�� ������. �� � � � ����
check_and_increment_count � �� �� ���� �� � ����� Prolog
��� ELSE ��� � ����.
rule: printer_jam: ( event : _ev of_class ’Printer_Jam’ where [hostname: _hn within [’flr4rm23’, ’flr3rm12’, ’flr1rm11’, ’flr6rm9’ ], action: check_count: ( (check_and_increment_count(printer_jam,_hn,5,_count) ; % ELSE clause follows exec_program(_ev,’scripts/notify.sh’, ’Printer failure on %s’, [_hn], no), init_count(paper_jam,_hn,0) ) ) ).
��: init_count
� 4 � � �� �� 121
check_event_criteria ���� �� ��� ���� �� �� ���� �����.
��: check_event_criteria(criteria_name, event )
--��--
check_event_criteria(criteria_names_list, operator, event)
��: � �� ���� create_event_criteria �� ���� ��� ��� �
� �����. �� ���� �� �� �����.
�� �� ��� ��� ���� � ��� �� ���� ����.
��:
criteria_name
�� ��� �� ��. � ��� create_event_criteria �� ����
���.
criteria_names_list
�� ���� �, �� ��� �� ��. �� ��� create_event_criteria
�� �������. � �� �� ��(�: [criteria1, criteria2])�� �
����.
event �� �� ��� ���� ��
operator
��� �� ��� ���� � �� ���� �� �����. �
�� ��� ����.
all �� �� ��� �� ���� � �����. �, � ��
�� criteria1� criteria2� � ��� �� �� � �� �
����.
any �� ��� � ��� ��� �����. �, � ����
criteria2� ��� � ���� �� �����.
�:
1. �� �� �� ���� �� ���� �� � ��� �� ���� ���
���� � ���. � ����� �� ��� �� create_event_criteria
�� ����� �� harmless_heartbeat � harmless_maintenance� ��� �
�����. � ��� �� ����, �� ���� ���� ���� ��
� �� �� �� �����.
rule: filter_event: ( event: _event of_class _class where [ ],
122 IBM Tivoli Enterprise Console: � �� ���
reception_action: check_criteria: ( check_event_criteria([harmless_heartbeat, harmless_maintenance ], any, _event ), drop_received_event, commit_rule ) ).
2. �� ��� ���� �� ���� create_event_criteria �� ��
142 ���� �� 2� ��� �� �����.
check_event_criteria(’db_critical’, _ev)
��: create_event_criteria
� 4 � � �� �� 123
check_threshold �� ���� ���� ���� �� ���� �� �����.
��: check_threshold(threshold_criteria_name, _referenceEvent, _count)
��: � �� ��� ���� ����� ���� �� ��� ���� ��
�� �� �� �����. �� ����� �����.
1. ��� ���� ��� ��� �� �� ��� ����� ��� �� �
� �����. � �� create_threshold �� _max_report_freq �� ��
�����.
2. �� �� ��� ��� ����, create_threshold �� �����. �� �
� �� �� �����, ��� ��� ��� �����. ��� ��� ��
�� ���� �� ����.
a. ��� �� � �� ���� ���(create_cache_search_criteria ��
��� ��)
b. �� ��� ��� � �� � �� � ���(create_threshold ��
_window �� ��� ��)
c. ��� �� �� ��� ���� ��� ���(create_threshold ��
_count �� ��� ��)
3. ���� ���� ���� check_threshold �� ���� _check_count ��
� ���� ���� �� �����.
���� ��� ���� � ��� not ��� ���� ���� �� �
���.
��:
_count ��� �� ���� ���� �. � ��� ���.
_referenceEvent
���� ����� ���� �� ��� ���� �� �� ���.
��� � ������.
threshold_criteria_name
�� ��� �� ��. � ��� create_threshold �� �����.
�: �� ��� �� ���� create_threshold �� ��� �� ���
� �� �����. � ��� ��� ����.
v ��� �� ��� db_critical_threshold���.
�: �� �� create_threshold �� TEC_Start ���� �� ���� ��
� � � � ��� ���.
124 IBM Tivoli Enterprise Console: � �� ���
v create_cache_search_criteria �� �� ��� ��� �� � �� ���
db_critical_search���.
v ���� �� �� �� �� ���� ���� 600���.
v ���� �� � ��� ���� � � ��� ����.
v ���� ����� �� ���� �� 300��� �� � ���.
�� ��� �� ���� �� ��� ��� �� ���� �� �
�� �� � �� �� �����. _event �� ���� �� �� �� 10
� ��� db_critical_search� ��� � �� ���� � �� ���� ��
�� check_hold �� ���� ��� 5 ��� �� ���� ����.
create_threshold(’db_critical_threshold’, ’db_critical_search’, 600, 3, 300) % Define the threshold criteria.
check_threshold(’db_critical_threshold’, _event, _count) % Apply the threshold criteria to received event.
��: check_all_thresholds, create_cache_search_criteria, create_threshold
� 4 � � �� �� 125
clear_closed_events ��� ����� �� ��� ���� ����.
��: clear_closed_events
��: � �� ��� ����� �� ��� ���� ����.
��: ��
�: �� ��� �� ��� ��� ��� �� � ��� ��� ��� ���
����.
print_cache(’/tmp/before’), clear_closed_events, print_cache(’/tmp/after’)
��: ��
126 IBM Tivoli Enterprise Console: � �� ���
clears ��� ���� �� ��� ���� �� ��� ���� �����.
��: clears(class, [attribute_conditions ], [target_events ],
[target_attribute_conditions ])
--��--
clears(class, [attribute_conditions], [target_events], [target_attribute_conditions],
[attribute_exceptions])
--��--
clears(class, [attribute_conditions ], [target_events ], [target_attribute_conditions
], create_reverse_lookup)
--��--
clears(class, [attribute_conditions], [target_events], [target_attribute_conditions],
[attribute_exceptions], create_reverse_lookup)
��: � �� �� ��� ���� �� ��� ���� ����� ���� �
� ���� ��� ���� � �����. create_event_sequence �� event_details
� ��� �� ��� �� ���.
�� �� ��� � create_event_sequence �� attribute_conditions �� �
�����, target_attribute_conditions �� � ���� ���.
�: ��� ��� ���� ��� ���� ���� �� ����. ��� ��
�� �� ��� ��� ��� ���� ��� create_clearing_event ��
���� ��� ���� �� � ���.
��:
attribute_conditions
���� ��� ���� ��� ��� ��� �� �� ��� ��. �
�� �� ���� �� ��� ��� ���.
� ��� ����� �� ��� ��� �� �� �� � � ��.
�� ��, ���� HARMLESS� � �� ���� ���� �
�� ����� ������ ��� ��� [severity,equals,
‘HARMLESS’]� � ���.
�: �� �� �� ��� ��� ���� �� �� ���� ��
��� ���� ���� �� ����.
� 4 � � �� �� 127
��� ����, � �� �� �� �� ��� �� �� ��
��� 140 ���� �create_event_criteria�� ��
attribute_conditions � ��� ������.
�� ��
�� ��� �� ��� �� ��� ��. �� ��� ��
� �� ��� ��� �� ��� �� ��� �� �� ��
� �� ��� ���(�: [hostname]).
class ��� ���� ��� ���
create_reverse_lookup
� ��� ���� �� �� � ���� ������ �����. �
� � ���� ��� ���� ��� � ��� ���� ��� ��
�� �� �� ���� ���(��� �� ��� ���� ��� �
��� �� �� ���� �� ���). � �� �� ��� yes �
� no���. � �� ���� ��� � �� no���.
target_attribute_conditions
��� ���� �� ����� target_events �� � � ���� ��
� �� �� ��� ��. create_event_sequence �� attribute_conditions
�� ��� �� ��� ��� ���� � ���.
target_events
class ���� ���� ��� ��� ���� ��
�: �� ��� Compaq �� ���� ���� �� ��� ��� �����.
� ���� �� �� ���(cpqTape3PhDrvStatusChange)���.
cpqTapePhyDrvCondition �� �� ��� ���� ��� OK ��� ��� �
���� �����.
clears �� ��� ���� OK ��� ��� cpqTapePhyDrvCondition ���
� cpqTape3PhyDrvStatusChange ����� �����.
create_event_sequence( [’cpqTape3PhyDrvStatusChange’], [’hostname’, [’status’,’outside’,[’CLOSED’]]] [ attr_sequence( ’cpqTape3PhyDrvStatusChange’, ’cpqTapePhyDrvCondition’=[’Degraded’,’Failed’]), clears( ’cpqTape3PhyDrvStatusChange’, [ [’cpqTapePhyDrvCondition’,equals,’OK’] ], [’cpqTape3PhyDrvStatusChange’], [ ]) ] ),
��: create_clearing_event, create_event_sequence, is_clearing_event
128 IBM Tivoli Enterprise Console: � �� ���
commit_action � �� �� ��� ��� �����.
��: commit_action
��: � �� � � ���� �� �� �� � ��� �� � �
� � ��� � ��� ��� ��� ����.
��: ��
�: �� ����� all_instances �� ��� � �� �� � �� �
�� ���� � �� �� ���� �� �����. � ��� �� �
� ��� ��� ���� ����. ���, �� � � � ��� ���
���� ����.
reception_action: action1: ( all_instances( _event, event: _dup_down_ev where [ status: outside [’CLOSED’] ], _event - 600 - 600 ), add_to_repeat_count(_dup_down_ev, 1), drop_received_event, commit_action ),
��: ��
� 4 � � �� �� 129
commit_rule � �� ��� ��� �����.
��: commit_rule
��: � �� � � ���� �� �� �� � ��� �� � �
� � ��� � ��� ��� ���� ���� ���. ��, ���
� �� � � ���� �� �� ��� �� �� ���� ���.
��: ��
�: �� ����� all_instances �� � �� �� � �� � ���
���� � �� �� ���� �� �����. � ��� �� �� �
�� ��� ���� ��, � � ��� � ��� �� �� ��� ��
���� ��� ����. ���, �� � ��� �� ����
����.
reception_action: ( all_instances( _event, event: _dup_toner_ev where [ status: outside [’CLOSED’] ], _event - 600 - 600 ), add_to_repeat_count(_dup_toner_ev, 1), drop_received_event, commit_rule ),
��: ��
130 IBM Tivoli Enterprise Console: � �� ���
commit_set � ��� ��� ��� �����.
��: commit_set
��: � �� ��� ���� ���� ���.
v � � ���� �� �� �� � ��� ��
v � ��� � ��� ��� ��
v ���� �� � � ���� �� �� �� ��
v ���� �� �� �� �� � ��� �� �� �� �
��: ��
�: �� ����� all_instances �� � �� �� � �� � ���
���� � �� �� ���� �� �����. � ��� �� �� �
�� ��� ���� �� �� � ���� � ��� �� �� ��� ��
���� ��� ����.
reception_action: ( all_instances( _event, event: _dupper where [ status: outside [’CLOSED’] ]), drop_received_event, add_to_repeat_count(_dupper, 1), commit_set ),
��: ��
� 4 � � �� �� 131
convert_ascii_time �� ��� �� �����.
��: convert_ascii_time(_time_structure, _time_string )
��: � �� �� ��� ��� ���� �� �����. _time_structure�
convert_ascii_time � �� ������ ���. _time_string� � ���
���.
��:
_time_string
_time_structure� � ��
_time_structure
�� �� ��� �����. ��� _time_epoch �� �� �� �� �
�� �� ���� � get_time �� �� ��� ���� ��
� ����.
�: �� ����� �� ������ � �� ��� �� �� �� ���
� � ���� ���� time_string ��� � � ���� �� �����.
get_local_time(_time_local_struct), convert_ascii_time(_time_local_struct, _time_string), bo_set_slotval(_event, time_string, _time_string)
��: bo_set_slotval, get_local_time
132 IBM Tivoli Enterprise Console: � �� ���
convert_gm_time �� �� �� ���� ��(GMT)� �� ��� �����.
��: convert_gm_time( _time_epoch, _time_gm_struct )
��: � �� �� �� �� GMT� �� ��� �����. _time_epoch�
convert_gm_time � �� ������ ���. _time_gm_struct� � ���
���.
��:
_time_epoch
�� �� �� �����. ��� _time_local_struct �� �� �� ��
��� �� ���� � get_local_time �� �� ��� ����
��� ����.
_time_gm_struct
�� ��� GMT ���� �����. ��� _time_epoch �� �� �
� �� ��� �� ���� � get_time �� �� ��� ��
�� ��� ����.
�: �� ����� �� ��� �����.
1. �� �� �� �� �
2. ���� �� time_epoch ��� ���� �
3. �� �� �� GMT ��� ���� �
4. GMT ��� � � ���� �
5. ���� time_string ��� � � ���� �
�� ��, time_epoch ��� � ��� � � time_string ��� ��� �
� �� �� � �����.
get_time(_time_epoch), bo_set_slotval(_event, time_epoch, _time_epoch), convert_gm_time(_time_epoch, _time_gm_struct), convert_ascii_time(_time_gm_struct, _time_string), bo_set_slotval(_event, time_string, _time_string)
��: bo_set_slotval, convert_ascii_time, get_time
� 4 � � �� �� 133
convert_local_time �� �� �� �� �� ��� �� ��� �����.
��: convert_local_time( _time_epoch, _time_local_struct )
��: � �� �� �� �� �� ��� �� ��� �����. _time_epoch
� convert_local_time � �� ������ ���. _time_local_struct� �
��� ���.
��:
_time_epoch
�� �� �� �����. ��� _time_local_struct �� �� �� ��
�� �� ���� � get_local_time �� �� ��� ���� �
�� ����.
_time_local_struct
�� ��� �� ��� �����. ��� _time_epoch �� �� �
� �� ��� �� ���� � get_time �� �� ��� ��
�� ��� ����.
�: �� ����� �� ��� �����.
1. �� �� � �� �
2. ���� �� time_epoch ��� ���� �
3. �� �� �� �� �� ��� ���� �
4. �� �� �� ��� � � ���� �
5. ���� time_string ��� � � ���� �
�� ��, time_epoch ��� � ��� � � time_string ��� ��� �
� �� �� � �����.
get_time(_time_epoch), bo_set_slotval(_event, time_epoch, _time_epoch), convert_local_time(_time_epoch, _time_local_struct), convert_ascii_time(_time_local_struct, _time_string), bo_set_slotval(_event, time_string, _time_string)
��: bo_set_slotval, convert_ascii_time, get_time
134 IBM Tivoli Enterprise Console: � �� ���
create_cache_search_criteria ��� �� ��� �� ��� �� �����.
��: create_cache_search_criteria(search_name, criteria_name, attributes,
dup_detect)
--��--
create_cache_search_criteria(search_name, criteria_name, attributes, dup_detect,
returnOrder)
��: � �� ��� �� ��� �� ��� �� �����. ��� ���
� �����.
v �� ��� ���� � search_cache �
v ��� ��� ���� �� �� ���� create_event_criteria �
�� �� ��� ��� �� � ���� ����� � ���� ����
��� ��� ���� ����. �� ��, ��� ���� ��� ��� ���
� ��� �� [A,B,C,D,E]� ������, ���� ��� ���� � �
� �� ���� ��� �� �����. �, C ���� ����� �� �� ��
���� C ���� �� �� ����, ���� E ���� ����� ����
�����. ���� ���� ���� ����� �� ��� A ���� ����
�� ����, � �� �� ��� B ���� ���� �� �����. �� ��
� ���� ���� � �� ���� �� ���� � �� � ���.
� �� ��� �� �� �� TEC_Start ���� �� ��� ��� ���
� ���. ��� ��� �� �� ��� ���� �� � � �����.
��:
attributes
� ��� �� ���� �� ��� ���� �� ��. �
�� �� ��(�: [hostname,severity])�� �����.
criteria_name
�� �� ��� ��� � �� ��� ���� ���� ��. ��
create_event_criteria �� ���� ���.
dup_detect
� ��� ��� ����� ��� ��� �����. ��� ���
����.
no � ��� ��� ����� ���� ����.
yes � ��� ��� ����� �����.
� 4 � � �� �� 135
return_order
�� �� ��� �� ��� ��� ��� ���� ��� ��� �
����. � �� ���� ���, � �� random���. ��� ��
� ����.
order �� �� ��� �� ��� ��� ��� ���� ����
�.
random
��� ���� ���� �����.
search_name
�� �� ��� ��. � ��� search_cache �� �� �����.
�: �� ��� db_critical ��� �� ���� db_critical_search �� ��
���. � �� db_critical ��� �� ��� hostname ��� �� ���
� �� � �� ���� ����. return_order �� ���� ��� �
�� ���� � �� ��� ���� ���� ��� � � random� �
����.
create_cache_search_criteria(’db_critical_search’, ’db_critical’, [’hostname’], yes )
��: create_event_criteria, search_cache
136 IBM Tivoli Enterprise Console: � �� ���
create_clearing_event ��� ���� �����.
��: create_clearing_event(class, [attribute_conditions], [target_events],
[target_attribute_conditions])
--��--
create_clearing_event(class , [attribute_conditions] , [ target_events] ,
[target_attribute_conditions], [attribute_exceptions])
--��--
create_clearing_event(class , [attribute_conditions] , [ target_events] ,
[target_attribute_conditions], create_reverse_lookup)
--��--
create_clearing_event(class , [attribute_conditions] , [ target_events] ,
[target_attribute_conditions], [attribute_exceptions], create_reverse_lookup)
��: � �� ����� ��� ��� �� ��, �� ��� ��� ���
� �� ��� ��� ��� �����.
� �� ��� ���� ��� ���� �� ��� ��� ��� ���� �
�� ��� ��� ��� ��� � ���.
��:
attribute_conditions
��� ���� ���� ���� �� ���� �� ��� �� ���
��. ��� �� ���� �� ��� ��� ���.
� ��� ����� �� ��� ��� �� �� �� � � ��.
�� ��, ���� HARMLESS� � �� ���� ���� �
�� ����� ������, ��� ��� [severity,equals,
‘HARMLESS’]� � ���.
��� ����� �� ��� �� ��� ���. �� �
� ��� ��� ���� ��� ����� �� ���� ���
�� �� �� ��� � �� ��� ����.
�: �� �� �� ��� ��� ���� �� �� ���� ��
��� ���� ��� � ���.
� 4 � � �� �� 137
��� ����, � �� �� �� �� ��� �� �� ��
��� 140 ���� �create_event_criteria�� ��
attribute_conditions � ��� ������.
�� ��
�� ��� �� ��� �� ��� ��(�: [hostname]). � �
�� ��� ���� ��� ����� �� ���� ��� ��
�� �� ��� � �� ��� ����.
attribute_exceptions
��� ���� �� ���� �� ��� ��� �� ��� �����.
� �� �� ��� ��� � �� �� �� ��� �� �
�� ��� ��� ��� ��� ���. �� ��, Tivoli Distributed
Monitoring� �� �� ��� ��� ���� probe_arg ��� ��
� ���.
�� ���� ��� ��� �� ��� �� �� ��� ���
� ���� �� � ���. �� ��� � �� �� ��� ���� �
����� attribute_exceptions �� ���� ��� �� ����
�.
attr_exception � �� �� attribute_exceptions �� ���� � �
����. �� ����� 98 ���� �attr_exception�� ������.
class ��� ���� ��� ���
create_reverse_lookup
� ��� ���� �� �� � ���� ������ �����. �
� � ���� ��� ���� ��� � ��� ���� ��� ��
�� �� �� ���� ���(��� �� ��� ���� ��� �
��� �� �� ���� �� ���). � �� �� ��� yes �
� no���. � �� ���� ��� � �� no���.
target_attribute_conditions
��� ���� �� ����� target_events �� � � ���� ��
� �� �� ��� ��. ��� �� ��� � � �, ��� ��
�� �� ���� ��� ���� ���� ��� �� ��� ��
�� ��� ���� � ���.
target_events
class ���� ���� ��� ��� ���� ��
�:
138 IBM Tivoli Enterprise Console: � �� ���
1. � � �� � � � � �� or igin � � � �� ���� ����
CiscoLinkDown ���� �� ��� ���� �����. �� � ���
� CiscoLinkUp ���� ���� CiscoLinkDown ��� �� �� �� �
���� ���� ����.
create_clearing_event(’CiscoLinkUp’, [ ], [’CiscoLinkDown’], [’origin’], no)
2. �� ��� cpqDa3PhyDrvStatusChange ���� �� ��� ���� ���
��. � ���� cpqDaPhyDrvStatus ��� ��� �� hostname �� �
� ���� ����, ���� ���� Fail � �� ���� ��� OK �
� �� � ���.
��� ���� ��� ���� � ��� ���� �� ����� �� �
� �� �� ���� ���� �� target_events ��� �����.
create_clearing_event( ’cpqDa3PhyDrvStatusChange’, [ [’cpqDaPhyDrvStatus’,equals,’OK’] ], [’cpqDa3PhyDrvStatusChange’], [’hostname’, [’cpqDaPhyDrvStatus’,not_equals,’OK’] ], no),
��: clears, create_event_sequence, is_clearing_event
� 4 � � �� �� 139
create_event_criteria ���� �� �� �����.
��: create_event_criteria(criteria_name , class , fire_on_non_leaf ,
attribute_conditions)
��: � �� ���� ��� ���� � ���� �� �����. ��
check_event_criteria ��� ��� � ��� ����, create_cache_search_criteria
��� �����.
� �� ��� �� �� �� TEC_Start ���� �� ��� ��� ����
���. �� �� ��� ���� �� � � �����.
��� � �� �� ��� �� � ���. ��� 198 ���� ���� �
log_error �� �� � ���.
v ��� ���� �� � ���.
v �� �� ��� ���� � ���.
��:
attribute_conditions
�� ���� �� �� ��� �����. ��� �� ��� � ��� �
��� �����. attribute_conditions �� ��� ��� ��� ��
��� �����. �� ��, �� ��� �� ��� ��� �� �
�� �����.
[[’attribute’, operator, ’value’], [’attribute, operator, ’value’]]
�:
1. �� � ��� �� �� ���. �� ��, greater_than ��
� � STRING ����� ��� ��� �� ��� �� � ��
��. ��� �� �� ���� ���� �� �� ������.
2. �� ��� SINGLE ��� ��� ��� ��� ��� � ���.
3. matches ��� Tivoli Management Framework�� ���� ��
�� Perl �� � � ��� �����.
4. ENUM ��� �� �� ��� �� ���� ����.
5. LIST_OF �� ��� ��� �� ���� ���� ����.
�� ��� ��� SIMPLE ��� ��� �� �� � � ��� �
�� ���. � �� ���� ��� ��� ���� ���� �
� �����. ��� 73 ���� ��� ����� ��� ��� �� �
���.
140 IBM Tivoli Enterprise Console: � �� ���
�� �� ���
ENUM, INTEGER, REAL equals greater_than greater_than_equal
less_than less_than_equal not_equals outside
within
STRING equals not_equals matches outside within
class �� ��� ��� ��� ���. � �� �� ��(�: [‘NT_SNMP’,
‘NT_Server_Start’])�� �����.
� ��� �� ���� �� �� � create_cache_search_criteria
�� � �� �� � return_order �� ���� ��, ���� ��
� ���� ��� ����.
�� ��� 135 ���� �create_cache_search_criteria�� ������.
criteria_name
criteria� �� ��� ��
fire_on_non_leaf
�� ���� ����� �� �� ���� � �� ��� � ��
��� �����. �� �� ����.
no � �� �� ����� � ��� ��� � ���.
yes � �� �� ���� �� ��� ���� � ��� ��� �
���.
�:
1. �� ����� �� ��� �� � �� ���� �� �����. �
�� ��� example_criteria���. ��� create_cache_search_criteria �
�� ���� �����. � �� TEC_DB ���� ���� �� ����
�� � ���.
�: � ��� �� ��� ����. � �� ��� ���� ��� �� �
��� �� �������.
create_event_criteria(example_criteria, ’TEC_DB’, no, [[’hostname’, equals, ’chair’ ], [’hostname’, not_equals, ’chair1’ ], [’hostname’, matches, ’ch.*r’ ], [’repeat_count’, within, [5]], [’repeat_count’, outside, [10,15]], [’repeat_count’, equals, 5], [’repeat_count’, not_equals, 6], [’repeat_count’, greater_than, 4], [’repeat_count’, greater_than_equal, 5], [’repeat_count’, less_than, 6], [’repeat_count’, less_than_equal, 5],
� 4 � � �� �� 141
[’severity’, within, [’MINOR’]], [’severity’, outside, [’FATAL’,’HARMLESS’]], [’severity’, equals, ’MINOR’], [’severity’, not_equals, ’FATAL’], [’severity’, greater_than, ’HARMLESS’], [’severity’, greater_than_equal, ’MINOR’], [’severity’, less_than, ’CRITICAL’], [’severity’, less_than_equal, ’CRITICAL’] ] ),
2. �� ��� db_critical ��� �� �����. � �� ���������
��� TEC_DB ���� CRITICAL� �� �� � ���� �����.
severity ��� � � 60� �� ENUM ���� �����. � ��� ��
������ �� ��� DB_SRV� ����� �����.
create_event_criteria(’db_critical’, ’TEC_DB’ yes, [[’hostname’,matches, ’DB_SRV*’], [’severity’, greater_than_equal, ’CRITICAL’] ] )
3. �� ��� ups_problem ��� �� �����. � �� ��� homer�
��� upsOnBattery, upsBatteryLow �� upsBatteryDischarged ���� ��
���.
create_event_criteria(’ups_problem’, [’upsOnBattery’, ’upsBatteryLow’, ’upsBatteryDischarged’], yes, [[’hostname’,equals,’homer’]] )
��: check_event_criteria, create_cache_search_criteria
142 IBM Tivoli Enterprise Console: � �� ���
create_event_sequence ��� �� ���� ��� �����.
��: create_event_sequence([event_sequence], [attribute_conditions])
--��--
create_event_sequence([event_sequence], [attribute_conditions], [event_details])
��: � �� ��� ��� ���� ���� �� � ���� ��� �� �
�� ���� � �����. ��� ��� ��� ��� ��� ��� ���(�
���� � ��)���.
� ��� ��� �� �� �� � ��� �� ���� ���� �� �� �
�� �� �� �����. ��� �� �� ��� TEC_Start ���� �� �
��� ���� �� � ���.
��:
attribute_conditions
��� ����� ���� ���( ���� ���� �
� ���)� �� ���� �� ��� �� ��� ��. ��� �
� ���� �� ��� ��� ���.
� ��� ����� �� ��� ��� �� �� �� � � ��
(�: �� ��, [severity,equals,‘HARMLESS’]). � ��� ��� �
�� ��� �� ���� �����. ��� ���� ���� �
����� ���� �� ��� 96 ���� ��� attr_condition
�� ���� ���.
��� ����, � �� �� �� �� ��� �� �� ��
��� 140 ���� �create_event_criteria�� ��
attribute_conditions � ��� ������.
�� ��
�� ��� �� �� ��� �� ��� ��. �� ���
��� �� ��� ��� �� ��� �� ��� �� �� �
�� �� ��� ���(�: [hostname]. � ��� ��� �
��� attr_exception� �� � ������ ���� � �
����. attr_exception �� 98 ���� ���� ���.
event_details
��� ��� ��� �� ��� ���� ��� ���� �� ��
����� ���� �� ��. �� � � �� �� �� ����
�.
� 4 � � �� �� 143
� ��
attr_condition ��� ���� � ���� �� �� �� ���
�����.
attr_exception ��� ���� �� ���� �� ��� ���
�� ��� �����.
attr_sequence ��� ���� ��� ���� ��� �� ���
� ��� �� �����.
clears ��� ���� ���� �� ��� ���� ��
���.
event_sequence
���� ������ ��� ��� � ��� ��� ��� ��(�:
[’upsOnBattery’, ’lowBattery’, ’upsDischarged’]).
�:
1. �� ��� ��� ���� ��� ��� �����. ���� ���� �
�(APC ��� �� �� �� � IBM Tivoli Distributed Monitoring)���
�� ���� ���. ��� �� �� �� ��� ��� 240 ���� �
��� �����.
��� ���� ��� ���� ���� ����� upsOnBattery ����
��� ����� �����. ��� ��� ���(universal_host)� Tivoli
Distributed Monitoring�� ����. ���� ��� ��� ���� clears
�� ��� ��� ���� ����. ��� �� �� �� ���� ���
�� ��� �� �� �� �� �����.
Tivoli Distributed Monitoring universal_host ���� �� �� ���� �
� �� probe_arg ��� ���� ���(��� �� �� �� ���� ��
� �� ��� ��) �� ��� �����. ���� � �� probe_arg
��� ��� �� �� �� ���� ��� �� ���� �� ���. �
� ��� �� ���� ��, create_event_sequence �� event_details �
��� �� attr_exception �� ��� �����.
���� �� ��� �� � universal_host ���� ���� FATAL�
����. ���� �� �� ���� �� ���� ��� HARMLESS�
�����. � ��� �� ���� ���� ��� ��� ���� ��
����. ���� FATAL ��� universal_host ���� ��� �� �
� �� ���� ����� ���� ��, create_event_sequence ��
event_details �� attr_condition �� ��� ���. ��, universal_host
���� ���� HARMLESS ��� ��� ������.
���� �� � clears �� �� attribute_conditions �� ��� ���
� ��� ����� �� ��� ���� ���� � �����. hostname �
144 IBM Tivoli Enterprise Console: � �� ���
�� hostname� create_event_sequence� �� attribute_conditions �� �
��� ��� ��� ��� ���.
� �� clears �� �� attribute_conditions �� �� �� universal_host
���� ��� ��� ��� ��� ��� � ��� ���� �����.
create_event_sequence� event_details ���� �� create_event_sequence
� � attr_exception �� �� attribute_conditions ��� hostname �
� ��� ��� ���� ��� ��� �� ��� ��� ����� ��
��.
create_event_sequence( [’upsOnBattery’, ’lowBattery’, ’upsDischarged’, ’universal_host’], [’hostname’, [’status’,’outside’,[’CLOSED’]] [ clears(’powerRestored’,[ ], [’upsOnBattery’],[ ]), clears(’returnFromLowBattery’,[ ],[’lowBattery’], [ ]), clears(’dischargeCleared’,[ ],[’upsDischarged’], [ ]), clears(’universal_host’, [ [’severity’, equals,’HARMLESS’] ] [’universal_host’], [ ]), attr_condition(’universal_host’, [’severity’,equals,’FATAL’]), attr_exception(’hostname’,’universal_host’, ’probe_arg’) ] ),
2. �� ��� ��� ���� ��� ��� �����. � ��� �� ����
���� ��� Compaq Insight Manager��� �� ���� ���. �
��� ��� 241 ���� ���� �����.
� ���� ��� ���� cpqTapePhyDrvCondition ��� ���� ��
���� ���� ����. �� OK � ��� ��� ���� �����.
� ��� ��� ��, �� �� � �� ��(���� ������ ��� �
�)� ���� �� create_event_sequence �� event_details ���� �
�� attr_sequence �� ���� ��� �� � ���.
event_sequence �� � ��� ���� �� ��� ��� ����� �
��� ���� �����. ��� cpqTapePhyDrvCondition ��� �����.
��� ���� �� ��� �� attr_sequence �� � ����� clears
��� target_attribute_conditions �� ���� ����.
create_event_sequence( [’cpqTape3PhyDrvStatusChange’], [’hostname’, [’status’,’outside’,[’CLOSED’]]] [
� 4 � � �� �� 145
attr_sequence( ’cpqTape3PhyDrvStatusChange’, ’cpqTapePhyDrvCondition’=[’Degraded’,’Failed’]), clears( ’cpqTape3PhyDrvStatusChange’, [ [’cpqTapePhyDrvCondition’,equals,’OK’] ], [’cpqTape3PhyDrvStatusChange’], [ ]) ] ),
3. � ��� �� ��� ��� ��� ��� ���. ��� ���� ���
� ��� ��� �����. ��� � ����� � ��� ��� �� ��
�� ��� �� ����. � ���� cpqHe3ThermalSystemFan �
cpqHe3ThermalCpuFan ��� ���� cpqHe3ThermalTemp ��� �� ��
� �������. � ��� ��� �� ���� ��� Compaq Insight
Manager��� �� ���� ���. � � ���� darkest shade,
��� ���� next lightest, ��� � ���� lightest���.
create_event_sequence �� ��� �� ��� ��� �� ��� ��
� �� �� �� ��� � ��� ��� ��� ���� � ��� �
�� ��� ���� � ��� � ���.
��� ����� �� ���� ���� �� ��� ������ ���
� ���� ���� ����� ���� �� ��� ���� ���. ��
� ��� �� ���� �� ���� �� �� �� ��� ��� �
��. � � �� � �� �� � �� � ���.
146 IBM Tivoli Enterprise Console: � �� ���
�� create_event_sequence �� � ��� �� ���� ��� ��� �
�� ���� �����. �� �� cpqHe3ThermalTempDegraded ���
� cpqHe3ThermalCpuFanFailed ���� �� ��� ��� ��� ��
�� �� �����.
create_event_sequence( [’cpqHe3ThermalSystemFanDegraded’, ’cpqHe3ThermalSystemFanFailed’ ’cpqHe3ThermalTempDegraded’, ’cpqHe3ThermalTempFailed’], [hostname, [’status’, equals, ’OPEN’]], [ clears(’cpqHe3ThermalSystemFanOK’, [ ], [’cpqHe3ThermalSystemFanDegraded], [ ]), clears(’cpqHe3ThermalTempOK’, [ ], [’cpqHe3ThermalTempDegraded], [ ]), clears(’cpqHe3ThermalConfirmation’, [ ], [’cpqHe3ThermalTempFailed], [ ]) ] ), create_event_sequence( [’cpqHe3ThermalCpuFanFailed’, ’cpqHe3ThermalTempDegraded’], [hostname, [’status’, equals, ’OPEN’]], [ clears(’cpqHe3ThermalCpuFanOK’, [ ], [’cpqHe3ThermalSystemFanFailed], [ ]) ] ),
��: ��
� 4 � � �� �� 147
create_threshold ���� �����.
��: create_threshold(threshold_criteria_name, cache_search_criteria_name,
_window, _count, _max_report_frequency)
��: � �� ��� ���� ���� �� ��� ��� ��� �� ��
���. ��� check_threshold �� � �����. ��� �� �� ��
TEC_Start ���� �� ��� ��� ���� ���. �� �� � � �
����.
��:
_count ���� �����. �� ��, ��� 5� 6�� ���� ���� ���
� ���� ����� �� ����.
_max_report_frequency
���� �� �� ��� ���� �� �� �� �� � �� �
�( �)� �����.
_window
���� �� � �� ���� ���� �� �� �� �� ��
�����. �� �� � ��� �� ���� �� ���
���. �� �� �� ���� �� � ��� �� �����. ��
��, 600(10)� �� �� �� ���� 5 � �� 5 �� ���
� �� ���� ���� ���� �� ���� �� ����.
cache_search_criteria_name
��� �� ��� �� � �� ���� ��� ��. � ��
create_cache_search_cri ter ia �� ������� . � ��
create_threshold � �� ��� ���� ���.
threshold_criteria_name
��� �� �� ��� ��. � ��� check_threshold ���� �
����.
�: �� ����� �� ��� �� ���� �� �����. � ���
��� ����.
v ��� �� ��� db_critical_threshold���.
v create_cache_search_criteria �� �� ��� ��� �� � �� ���
db_critical_search���.
v ���� �� �� �� �� ���� ���� 600���.
v ���� �� � ��� ���� � � ��� ����.
v ���� ����� �� ���� �� 300 � ��� ���.
148 IBM Tivoli Enterprise Console: � �� ���
create_threshold(’db_critical_threshold’, ’db_critical_search’, 600, 3, 300)
��: check_threshold, create_cache_search_criteria
� 4 � � �� �� 149
decrement_slot ��� �� ��� ����� �� ���.
��: decrement_slot(_event, _attribute_name, _by_value, _trigger)
��: � �� ��� �� ��� ����� �� ���.
�: ����� �� �� �� ��� ���� ����� ���� �� ����
�������.
��:
_attribute_name
�� ��
_by_value
� �
_event �� ����� �
_trigger
� �� ��� ���� �� �� ��� ��� ��� �����. �
�� ‘YES’, yes, ‘NO’ �� no���.
�: �� ����� � ���� �����.
decrement_slot(_event,host_down,1,no)
��: increment_slot
150 IBM Tivoli Enterprise Console: � �� ���
drop_change_request �� �� ��� �� �� ��� ���� �� ����.
��: drop_change_request
��: � �� �� �� ��� �� �� ��� ���� �� ����.
��: ��
�: �� ����� ���� ��� ACK �� CLOSED� ���� ��� �
�, ���� ��� Root-myHost-region� ���� �� ��� ���� ���
� msg ��� � ���� ���� �� �����. �� ��� ��� �� �
� ��� �� �� ���� ��� ����.
change_rule: deny_state_change_of_TTs:( event: _event of_class _class, sender: _sender equals operator(_x), slot: status set_to _new_status within [’ACK’, ’CLOSED’], action: ( _sender \== operator(’Root_myHost-region’), bo_set_slotval(_event,’msg’,’modification denied !’), drop_change_request ) ).
��: ��
� 4 � � �� �� 151
drop_received_event �� ��� �� ���� ����.
��: drop_received_event
��: � �� �� ���� �� �� �� ���� ���� ��
�.
��: ��
�: �� �� ���� ��� � NFS_NOT_RESPONDING ���� �� �
� �� ���� ��� ������� ���� ��� ���� �� ����
�. ��� repeat_count ���� ��� ��� �� ��� ��� �����.
rule: dup_nfs_not_resp:( event: _event of_class ’NFS_NOT_RESPONDING’, action: dup_and_drop_event:( first_duplicate(_event,event: _dup_nfs_ev where [status: outside [’CLOSED’] ] ), add_to_repeat_count (_dup_nfs_ev, 1), drop_received_event ) ).
��: ��
152 IBM Tivoli Enterprise Console: � �� ���
erase_globals �� ������ ��� �� �� �� ��� ��� ����.
��: erase_globals(_group)
��: � �� ��� �� �� �� ��� ��� �� ������ ���
�.
��:
_group
��� � �� �
�: �� ��� Maintenance ��� �� ��� ��� �� ������ ��
��.
erase_globals(’Maintenance’)
��: ��
� 4 � � �� �� 153
exec_program ���� �����.
��: exec_program(_event, file_name, _format_string, _arg_list, watch_status)
��: � �� ���� �����. ���� �� ��� ���� � ��
�.
�: exec_program� �� Null �� � �� ��� � ��� ��� ���
��� � ���. �� exec_program�� ��� �� ��� ����
���� �����.
��:
_arg_list
[1, 2, 3] ���� ���� �� �(�� ���� ��)� ��. trigger
���� �� ��� �� �� ��� ��� ���� �� ����.
�� ��, msg �� �� $msg �� ����� �� � ���. ���
� ��� ��� �� �� �� ��� �� �� ��� IBM Tivoli
Enterprise Console �� � ��� ���� ������.
�� � �� �� �� ��� ���� � ��� ���� ���
� ���. �� � � ��� ��� � ��� ���� �� �� �
� ���. �� � � �� ��� ���, � ��� []� �� �
��� � ���� ���. ���� ���� ��� 256� �����.
_event ���� ��� ���� ����� �. � ���� �� ��� �
� ���� ���� �� ����. ��� � ��� ��� �� �
� �� ��� �� �� ��� IBM Tivoli Enterprise Console �� �
��� ���� ������.
_format_string
��� �� � ���� �� �� � . %s (STRING), %d (INTEGER)
� %ld (INT32) �� ��� � ���� ���� �� � �����
�� � � ��� � ���.
file_name
�� ���� �� � �� ��. �� ��� $BINDIR/TME/TEC �
����� ��� � ���.
watch_status
��� ��� ���� ��� ��� �����. watch_status ��
‘YES’ �� ‘NO’� � ���. � �� ������ �� ���.
‘YES’ ��, �� �� ��� ��� � ��� � � � ���.
�: �� ����� � ��� �����.
154 IBM Tivoli Enterprise Console: � �� ���
exec_program(_event, % Pass in the event pointer for access to % its environment variables. ’scripts/send_notice’, % Program path/name. ’-m "%s" -s %s’, % Format string. [_msg, _severity], % Argument list. ’YES’) % Watch status. )
_format_string �� %s �� ��� ���� msg � severity ��� ���
��. send_notice ���� �� ���� �� � �� ��� �� � ���
��.
send_notice -m "Su to root failed for Joe" -s CRITICAL
msg ��� �� send_notice ��� �� � �� ����� �� �� ��
� �� ����� ��� ������.
��: exec_program_local, exec_task, exec_task_local
� 4 � � �� �� 155
exec_program_local ���� �� ��� ���� �����.
��: exec_program_local(_name, _event, file_name, format_string, _arg_list,
watch_status)
��: � �� ���� �� ��� ��� �� �����. (���� � �
�� ���� � ��� ����.) watch_status �� ’YES’� ���� �
� ���� ��� �, TASK_COMPLETE ���� ����. � ���� �
�� ��� �� ����� ���. TASK_COMPLETE ��� ����
tec.baroc ��� ���� ���. ��� �� ��� ��� ����.
command
���� �� ��� ��
end_time
���� ��� ��
execution_msg
��� �. � ���� � � ��� �� ��, � � � �
�� �� �������� � �� �����. � ��� 512��
� ���� ���.
exit_status
���� �� ��� �� ���� �� ��
start_time
���� ��� ��
task_name
���� ��� ��. ��� �� _name �� �������.
task_number
��� ��� �� ID. � ID� 1�� ���� ���� ��� ���
�� 1� �����.
task_status
���� �� �� ��
trigger_event_id
exec_program_local �� ��� ��� ���� ID
� �� �� � � � �� �� �����. �� �� ���� ���
��. �� �� ���� ��� � ��� ��� ��� �� �� ���
� � ���.
��:
156 IBM Tivoli Enterprise Console: � �� ���
_arg_list
[1, 2, 3] ���� ���� �� �(�� ���� ��)� ��. trigger
���� �� ��� �� �� ��� ��� ���� �� ����.
�� ��, msg �� �� $msg �� ����� �� � ���. ���
� ��� ��� �� �� �� ��� �� �� ��� IBM Tivoli
Enterprise Console �� � ��� ���� ������.
�� � �� �� �� ��� ���� � ��� ���� ���
� ���. �� � � ��� ��� � ��� ���� �� ���
� ���. �� � � % �� ��� ��� � ��� []� ��
���� � ���� ���. ���� ���� ��� 256� ����
�.
_event ���� ��� ���� ����� �. ���� �� ��� ��
���� ���� �� ����. ��� � ��� ��� �� �
� �� ��� �� �� ��� Tivoli Management Framework ����
������.
_format_string
��� �� � ���� �� �� � . %s (STRING), %d (INTEGER)
� %ld (INT32) �� ��� � ���� ���� �� � �����
�� � � ��� � ���. �� � � ���� ���,
_format_string �� ’’( �� �����) ���� ��� ���. 154
���� �exec_program� ����� �� � ��� �����.
_name
���� �� ��. ���� TASK_COMPLETE ����� ���
� � �����.
file_name
�� ���� �� � �� ��. �� ��� $BINDIR/TME/TEC �
����� ��� � ���.
watch_status
TASK_COMPLETE ���� ��� ��� �����. ��� ���
����.
‘NO’ ���� ��� � TASK_COMPLETE ���� ��� ���
�. � �� ������ �� ���.
‘YES’ ���� ��� � TASK_COMPLETE ���� ����. �
�� ������ �� ���.
�: �� ����� �� ��� �����.
1. program_start ���, ls(list) ���� TEC_DB ���� ��� � ����
�. ���� �� ���� �����.
� 4 � � �� �� 157
v ���� list_tmpdir��� ��� �����.
v ���� ���� �� �� �� ����.
v ���� ��� � TASK_COMPLETE ���� ����.
2. program_result �� �� ��� �� ���� �� list_tmpdir�� ��
� task_name ��� TASK_COMPLETE ���� ��� �� �����.
3. program_result �� process_program_result ��� ��� �����.
a. TASK_COMPLETE ������ execution_msg ��� �� �� _results
��� �� �����. � ��� � �����.
b. _results� OK � ��� �� ����.
c. �� OK ��� ���� ok �� �����. ���� ���, not_ok
�� �����.
rule: program_start: ( event: _event of_class ’TEC_DB’ where [ ], reception_action: start_it: ( exec_program_local(’lst_tmpdir’,_event,’ls /tmp’, ’’,[ ],’YES’) ) ). rule: program_result: ( event: _event of_class ’TASK_COMPLETE’ where [task_name: _task_name equals ’lst_tmpdir’, % Test for program name. If passed, assign % value to variable. task_number: _task_num % Assign task_number attribute value to % variable. ], reception_action: process_program_result: ( bo_get_slotval(_event,execution_msg,_results), % Get value of execution_msg attribute and assign to % variable. Attribute is a list type. member(_result_line,_results), (_result_line == ’OK’ -> % Test each element for OK value. ok % OK value found in list. Run ok predicate. ; % Else. do_not_ok_thing
158 IBM Tivoli Enterprise Console: � �� ���
% OK value not found in list. Run not_ok % predicate.) ) ).
��: exec_program, exec_task, exec_task_local
� 4 � � �� �� 159
exec_task ���� ��� �������� �����.
��: exec_task(_event, task_name, format_string, _arg_list, watch_status)
��: � �� ���� ��� �������� �����. ���� �� ��
� ���� � ���. Tivoli Enterprise Console ���� ���� ���� IBM
Tivoli Enterprise Console �� � ��� ����� �����.
�: exec_task� �� Null �� � �� ��� � ��� ��� ��� ��
� � ���. ��, exec_task� ��� �� ��� �������� �
����.
��:
_arg_list
[1, 2, 3] ���� ���� �� �(�� ���� ��)� ��. trigger
���� �� ��� �� �� ��� ��� ���� �� ����.
�� ��, msg �� �� $msg �� ����� �� � ���. ���
� ��� ��� �� �� �� ��� �� �� ��� IBM Tivoli
Enterprise Console �� � ��� ���� ������.
�� � �� �� �� ��� ���� � ��� ���� ���
� ���. �� � � ��� ��� � ��� ���� �� ���
� ���. �� � � �� ��� ��� � ��� []� �� �
��� � ���� ���. ���� ���� ��� 256� �����.
_event ���� ��� ���� ����� �. � ���� �� ��� �
� ���� ���� �� ����. ��� � ��� ��� �� �
� �� ��� �� �� ��� Tivoli Management Framework ���
� ������.
_format_string
���� �� � ���� �� �� � . %s (STRING), %d
(INTEGER) � %ld (INT32) �� ��� � ���� ���� ��
� ����� �� � � ��� � ���. �� � � ��� ��
���� ��, ���� ��� ��� �� ��� �� ���� ����
�� ��� �� ���.
-l tasklibname -h hostname -a arg1 -a arg2...
154 ���� �exec_program� ����� �� � ��� �����.
160 IBM Tivoli Enterprise Console: � �� ���
�:
1. �� � � -l, -h � -a �� Tivoli Management Framework
wruntask ��� ��� �� ���� . �� ��� Tivoli
Management Framework ���� ������.
2. ��� ��(-t TaskName) � -E wruntask �� �� exec_task �
� �� ����� �����.
task_name
�� ���� ��� �����.
watch_status
��� ��� ���� ��� ��� �����. watch_status ��
‘YES’ �� ‘NO’� � ���. � �� ������ �� ���.
‘YES’ ��, �� �� ��� ��� � ��� � � � ���.
�:
1. �� ����� T/EC ��� ������ Send_Email ���� ��� stumpy
�� ���� �� �����. � �, ��� �� ��� ��� ��
� ��� ��� � �� ��� ���� �����. ��� ��� ���
�� ����. wruntask �� ����� �� �� ���� ��� ���
� �� �����.
exec_task(_event, ’Send_Email’, ’-l "T/EC Tasks" -h "stumpy" -a "%s" -a "%s"’, [’[email protected]’, ’[email protected]’], ’NO’)
wruntask -t Send_Email -l "T/EC Tasks" -h "stumpy" -E -a "joe@company" -a "joe@company"
2. �� ����� MS SQL ������� ����� ���� ������
� Tivoli Distributed Monitoring���� ��� ���� ���� ����
���� �� �����. �� �� ��� �� CRITICAL ���
MSSQLDatabase_LogSpacePercentUsedDB� ������. collection �� ��
����� � ��� ���. � �� � ��� ��� exec_task �
� ���� �� ��� �������.
rule: plain_rule1_42: ( description:’ADSM incremental backup task’, event: _ev1 of_class within [ ’MSSQLDatabase_LogSpacePercentUsedDB’] where [severity: _ev1_severity collection: _ev1_collection, hostname: _ev1_hostname ] , reception_action: action0:( (exec_task(_ev1,
� 4 � � �� �� 161
’ADSMIncBackup’, ’-l MSSQLManagerTasks -h \’@%s:%s\’’, [_ev1_collection,_ev1_hostname], ’YES’ ) ) ) ).
exec_task �� ���� MSSQLDatabase ��� �� ���
master@holon@holon�� ��� � �� ��� ����.
wruntask -t ADSMIncBackup -l MSSQLManagerTasks \ -h @MSSQLDatabase:master@holon@holon -E
��: exec_program, exec_program_local, exec_task_local
162 IBM Tivoli Enterprise Console: � �� ���
exec_task_local ���� �� ��� ��� ��� �������� �����.
��: exec_task_local(_name, _event, file_name, format_string, _arg_list,
watch_status)
��: � �� ���� ��� �������� �� ��� �� �����.
(���� � ��� ���� � ��� ��� ����.) Tivoli Enterprise
Console ���� ���� ���� IBM Tivoli Enterprise Console �� � ��
� ����� �����.
�: � �� �� ���� ��� � ���.
watch_status �� ‘YES’� ���� �� ���� ��� �,
TASK_COMPLETE ���� ����. � ���� ��� ��� �� ����
� ���. TASK_COMPLETE ��� ���� root.baroc ��� ����
���. ��� �� ��� ��� ����.
command
���� �� ��� ��
end_time
���� ��� ��
execution_msg
������� �. � ���� � � ��� �� ��, � �
� ��� �� �������� � �� �����. � ��� 512
��� ���� ���.
exit_status
���� �� ��� �� ���� �� ��
start_time
���� ��� ��
task_name
���� ��� ��. ��� �� _name �� �������.
task_number
��� ��� �� ID. � ID� 1�� ���� ���� ��� ��� �
� 1� �����.
task_status
���� �� �� ��. � �� RUNNING, SUCCESS, FAILURE �
UNKNOWN�� root.baroc ��� �����.
trigger_event_id
exec_task_local �� ��� ��� ���� ID.
� 4 � � �� �� 163
� �� �� � � � �� �� �����. �� �� ���� ����
�. �� �� ���� ��� � ��� ��� ��� �� �� ��� �
� ���.
��:
_arg_list
[1, 2, 3] ���� ���� �� �(�� ���� ��)� ��. trigger
���� �� ��� �� �� ��� ��� ���� �� ����.
�� ��, msg �� �� $msg �� ����� �� � ���. ���
� ��� ��� �� �� �� ��� �� �� ��� IBM Tivoli
Enterprise Console �� � ��� ���� ������.
�� � �� �� �� ��� ���� � ��� ���� ���
� ���. �� � � ��� ��� � ��� ���� �� ���
� ���. �� � � �� ��� ��� � ��� []� �� �
��� � ���� ���. ���� ���� ��� 256� �����.
_event ���� ��� ���� ����� �. � ���� �� ��� �
� ���� ���� �� ����. ��� � ��� ��� �� �
� �� ��� �� �� ��� Tivoli Management Framework ����
������.
_format_string
��� �� � ���� �� �� � . %s (STRING), %d (INTEGER)
� %ld (INT32) �� ��� � ���� ���� �� � �����
�� � � ��� � ���. �� � � ���� ���,
_format_string �� ’’( �� �����) ���� ��� ���. �
� � � ��� ������ ��, ���� ��� ��� ��, ���
�� ���� ���� �� ��� �� ���.
-l tasklibname -h hostname -a arg1 -a arg2...
154 ���� �exec_program� ����� �� � � ��� ����
�.
�:
1. �� � � -l, -h � -a �� Tivoli Management Framework
wruntask ��� ��� �� ���� . �� ��� Tivoli
Management Framework ���� ������.
2. ��� ��(-t TaskName) � -E wruntask �� �� exec_task_local
�� �� ����� �����.
_name ���� �� ��. ���� TASK_COMPLETE ����� ���� �
�����.
164 IBM Tivoli Enterprise Console: � �� ���
file_name
�� ���� �� � �� ��. �� ��� $BINDIR/TME/TEC �
����� ��� � ���.
watch_status
TASK_COMPLETE ���� ��� ��� �����. ��� ���
����.
‘NO’ ���� ��� � TASK_COMPLETE ���� ��� ����.
� �� ������ �� ���.
‘YES’ ���� ��� � TASK_COMPLETE ���� ����. �
�� ������ �� ���.
�: �� ����� �� ��� �����.
1. task_start ���, send_dbadmin ���� TEC_DB ���� ��� � ���
��. ���� �� ���� �����.
v ���� send_dbadmin��� ��� �����.
v ��� ���� �� �� �� ���.
v ���� ��� � TASK_COMPLETE ���� ����.
2. task_result �� �� ��� ��� ���� �� send_dbadmin�� ���
task_name ��� TASK_COMPLETE ���� ��� �� �����.
3. task_result �� process_task_result ��� ��� �����.
a. TASK_COMPLETE ������ execution_msg ��� �� �� _results
��� �� �����. � ��� � �����.
b. _results� OK � ��� �� ����.
c. �� OK ��� ���� ok �� �����. ���� ���, not_ok
�� �����.
rule: task_start: ( event: _event of_class ’TEC_DB’ where [ ], reception_action: start_it: ( exec_task_local( ’send_dbadmin, _event, ’Send_Email’, ’-l "T/EC Tasks" -h "stumpy" -a "%s" -a "%s"’, [’[email protected]’,’[email protected]’], ’YES’ ) ) ).
� 4 � � �� �� 165
rule: task_result: ( event: _event of_class ’TASK_COMPLETE’ where [task_name: _task_name equals ’send_dbadmin’, % Test task name. Assign task_name value to % variable if passed. task_number: _task_num % Assign task_number attribute value to % variable. ], reception_action: process_task_result: ( bo_get_slotval(_event,execution_msg,_results), % Get value of execution_msg attribute and assign to % variable. Attribute is a list type. member(_result_line,_results), (_result_line == ’OK’ -> % Test each element for OK value. ok % OK value found in list. Run ok predicate. ; % Else. do_not_ok_thing % OK value not found in list. Run not_ok % predicate.) ) ).
��: exec_program, exec_program_local, exec_task
166 IBM Tivoli Enterprise Console: � �� ���
first_causal_event � ���� ��� � ���� �� ��� ��� ����.
�: ����� � ��� ���� ����� ��� ����� ��� � ���
� �����.
��: first_causal_event(_effect_event, _cause_event)
--��--
first_causal_event(_effect_event, _cause_event, time_before, time_after)
��: � �� create_event_sequence �� �� ��� ��� ���� �
���� �� ��� ��� ���� �����. ����
create_event_sequence �� ��� ��� ��� ���. �� ��, ��� A,
B, C � D� � ���� ��� ��� ����� ��� D� ��, �
�� A� ���� ��� �� ��� ��� A� �� ���� ����, ��
� B� ���� ��� B�, ��� C� ���� �� ����, ��� �� ��
�� �����.
time_before � time_after �� ���� ���� ��� �� � �� �� 2
(��� 1 ��� 1 )�� � �� �����. � �� �� �� � �
�� �� �� ��� �� ��� ��� ���.
��:
_cause_event
� ���� �� ��� � ����� �. � �� � ��
� ���.
_effect_event
� ���� � � ���� �� �. � ���
���.
time_after
� ���� ��� �� �. � �� ��� �� �� �� ���
���� � �����.
time_before
� ���� ���� �� �. � �� ��� �� �� �� ��
� ���� � �����.
�: �� ��� ��� ��� ��� � ���� �� ��� ��� ���
�. ��� ��� ���� � ���� ����� � ���� �����. �
�� ������� ���� � ���� �� ����. � ��� ���
� �� ���� �� � � � �� ���� ����.
� 4 � � �� �� 167
rule: ’link_effect_to_cause’:( event: _effect of_class ’EVENT’, action: ’search_for_cause’:( first_causal_event(_effect, _cause, 3600, 0), set_event_status(_effect, ’ACK’), link_effect_to_cause(_effect, _cause) ) ).
��: create_event_sequence, first_effect_event, first_related_event
168 IBM Tivoli Enterprise Console: � �� ���
first_duplicate ��� �� �� � �� � ��� ��� ��� ���� ��(�� �)
� ���� �� � � �����.
��: first_duplicate(_event, event: _duplicate where attribute_conditions)
--��--
first_duplicate(_event, event:_duplicate where attribute_conditions, _referenceEvent
-time_before -time_after)
��: � ���� �� �� ������ ��� ��� ���� ����.
� ���� �� �� ��� 83 ���� �� ����� ������.
-time_before � -time_after �� ���� ���� ��� �� � �� �� 2
(1 ��, 1 ��)�� � �� �����. � �� �� �� � ���
�� �� ��� �� ��� ��� ���.
��:
_event � ����� �
_referenceEvent
� ��� �� �� �� �� ����� �
event:_duplicate where attribute_conditions
��� �� ��� �� ��� ��� �����. _duplicate� ��� �
�� � ����� �� �������. �� ��� 70 ���� ��
�� ���� ������.
-time_after
�� ��� �� �
-time_before
�� ��� �� �
�: �� �� ���� ��� � NFS_NOT_RESPONDING ���� �� �
� �� ���� ��� ������� ���� ��� ���� �� ����
�. ��� repeat_count ���� ��� ���� �� ��� ��� �����.
� ��� �� �� ���� ��� 2 �(1 ��, 1 ��)�� � �� ��
� �� ������. � �� �� �� � ��� �� �� ��� �� �
�� ��� ���.
rule: dup_nfs_not_resp:( event: _event of_class ’NFS_NOT_RESPONDING’, action: dup_and_drop_event:(
� 4 � � �� �� 169
first_duplicate(_event,event: _dup_nfs_ev where [status: outside [’CLOSED’] ] ), add_to_repeat_count (_dup_nfs_ev, 1), drop_received_event ) ).
��: all_duplicates
170 IBM Tivoli Enterprise Console: � �� ���
first_effect_event � ���� ��� ��� ����� �� �� � ���� �� ��� ��
� ����.
��: first_effect_event(_cause_event, _effect_event)
--��--
first_effect_event(_cause_event, _effect_event, time_before, time_after)
��: � �� create_event_sequence �� �� ��� ��� ���� � �
��� ��� � ���� �� ��� ��� ��� � �����.
time_before � time_after �� ���� ���, ��� �� � �� �� �
� 2 (1 ��, 1 ��)�� �����. � �� �� �� ���� ���
� �� �� ��� �� ��� ��� ���.
��:
_cause_event
� ���� � � ���� �� �. � ���
���.
_effect_event
� ���� �� ��� � ���� �� �. � �� � ���
���.
time_after
� ���� ��� �� �. � �� ��� �� �� �� ���
���� � �����.
time_before
� ���� ���� �� �. � �� ��� �� �� �� ��
� ���� � �����.
�: �� ��� ��� ��� ��� � ���� �� ��� ��� ���
�. ��� ��� ���� � ���� ����� ��� � ���� ���
��. � �� ������� ���� ��� � ���� �� ����. �
��� ��� � �� ���� �� � � � �� ���� ����.
rule: ’link_cause_to_effect’:( event: _cause of_class ’EVENT’, action: ’search_for_effect’:( first_effect_event(_cause, _effect, 3600, 0),
� 4 � � �� �� 171
set_event_status(_effect, ’ACK’), link_effect_to_cause(_effect, _cause) ) ).
��: create_event_sequence, first_causal_event, first_related_event
172 IBM Tivoli Enterprise Console: � �� ���
first_instance ��� ���, �� � �� � ��� ��� ��� ���� ��(�� �)
���� �� � � �����.
��: first_instance(event: _event of_class class where attribute_conditions)
--��--
first_instance(event: _event of_class class where attribute_conditions,
_referenceEvent -time_before -time_after)
��: ��� ���, �� � �� � ��� ��� �� ���� �� � �
�����.
��:
_referenceEvent
� ��� �� �� �� �� ����� �
event:_event of_class class where attribute_conditions
��� ��� �����. �� ��� 70 ���� ���� ���� ���
���.
-time_after
�� ��� �� �.
-time_before
�� ��� �� �.
�: �� ����� �� ��� ���� �� �����.
1. �� �� ��� � universal_host event� �� ���� �� ��� �
�� �����.
v ��� CLOSED� ����.
v ���� ���� �� ���� �� probe_arg ��� NFS_No_Response
��� ���� �� server ��� �� �� ����.
v ��� ���� CRITICAL���.
v �� �� �� �� ���� ��� 20���.
2. ��� ��� �� ���� ��� ���� ���� ���� FATAL� ��
���.
rule: escalate: ( description: ’escalate host down events when causing NFS problems’, event: _event of_class ’NFS_No_Response’ where [ server: _server],
� 4 � � �� �� 173
action: ’increase_sev’: ( first_instance(event: _down_ev of_class ’universal_host’ where [status: outside [’CLOSED’], probe_arg: equals _server, severity: equals ’CRITICAL’], _event - 600 - 600 ), set_event_severity(_down_ev, ’FATAL’) ) ).
��: any_clear_target
174 IBM Tivoli Enterprise Console: � �� ���
first_related_event �� ���� ��� ����� �� �� ���� �� ��� ��� ����.
��: first_related_event(_referenceEvent, _related_event, _relation)
--��--
first_related_event(_referenceEvent, _related_event, _relation, time_before, time_after)
��: � �� �� ���� ��� ����� �� �� � �� � ���
� �� ��� ��� ����. ����� �� �� ���� ��� ����
���� ����� ��� �� �� ������ ���� ����� �� �� �
��� ����. ��� ���� � ����� _relation �� c ��� �
������. ��� ���� � ����� _relation �� e ��� ���
����. �� ��, ��� A, B, C � D� create_event_sequence �� �� �
��� ��� ��� ����� first_related_event �� �� ����� ���
C� ���� �����, ��� A� �� �� � �� c ��� ��
��� _relation �� ����, ��� �� ��� B� � �� c� ���
_relation�� ����, ��� D� � �� e� ��� _relation�� ����, �
�� �� �� �� �����.
� �� ��� ���� � ���� �� � ��� �� ���, ��� �
���� ���� �� �� � ���� �� � ���� ���. � �� �
�� �� ����� � ���� first_effect_event � �� ��
first_causal_event �� ���� ��� �����.
time_before � time_after �� ���� ���, ��� �� � �� �� �
� 2 (1 ��, 1 ��)�� �����. � �� �� �� ���� ���
� �� �� ��� �� ��� ��� ���.
��:
_referenceEvent
����� �� �� ��� ���� ��� � �� ����� �
_related_event
�� ���� �� ��� ����� �� �� ����� �. � �
� � ��� ���.
_relation
�� ���� �� ��� ���� ��. � �� � ��� ���. �
�� ��� ����.
c �� ���� �� � ���
e �� ����� �� � ���
� 4 � � �� �� 175
time_after
�� ���� ��� �� �. � �� ��� �� �� �� ���
���� � �����.
time_before
�� ���� ���� �� �. � �� ��� �� �� �� ��
� ���� � �����.
�: �� ��� ���� ��� ����� �� �� ���� �� �
�� ��� ����. ��� ��� ���� ��� ���� ����� ��
���� relation �� ��� �� �� � ��� �� � ���� ����
�. � �� ������� ���� ��� ���� �� ����. � ���
��� � �� ���� �� � � � �� ���� ����.
rule: ’link_effect_to_cause’:( event: _ev of_class ’EVENT’, action: ’search_for_cause_or_effect’:( first_related_event(_ev, _related,_relation, 3600,0), ( _relation == ’c’, set_event_status(_ev, ’ACK’), link_effect_to_cause(_ev, _related) ; set_event_status(_related, ’ACK’), link_effect_to_cause(_related, _ev) ) ) ).
��: create_event_sequence, first_causal_event, first_effect_event
176 IBM Tivoli Enterprise Console: � �� ���
forward_event ���� ��� ��� �����.
��: forward_event(_event)
��: � �� ���� ��� ��� �����.
� �� tec_forward.conf ��(rule_base_dir/TEC_RULES ���� �)�� �
�� ��� ��� ����. tec_forward.conf ��� ���� ���� ���� �
� ��� ��� ���� ServerLocation ��� �� �� ��� ���.
�: forward_event �� Tivoli ��� ����� Tivoli region �� ���
�� ��� ���� ��� ��� IP �� �� TCP/IP ��� ���� ��
� ���.
tec_forward.conf ���� TestMode ��� �� � ��� yes���. ��� �
��� ��� ���� ����. ���� ��� ��� ��� ���� ���
� TestMode ��� tec_forward.conf ���� ���� ��� ��� ��
�.
��:
_event � ��� �� ����� �
�: �� ��� ���� CRITICAL �� FATAL ���� tec_forward.conf
��� ��� ��� ��� �����.
rule: escalate: ( event: _evt of_class within [ ’EVENT’ ] where [severity: within [’CRITICAL’, ’FATAL’], reception_action: action0:( forward_event(_evt) ) ).
��: ��
� 4 � � �� �� 177
generate_event �� ���� ����.
��: generate_event(event_class, list_of_event_attributes)
��: � �� ���� ����� ��(�: ��� ���)��� �����
��� ��, ��� �� ��� ����.
��:
event_class
�� ���� �� ��� ���
list_of_event_attributes
�� ���� �� ��. ��� �� ��� ���� ��� ����
���.
[attribute1=value1, attribute2=value2,...]
�: �� ��� � �� ���� TradingDBDown ���� ���� ����.
action: ( generate_event(’TradingDBDown’, [source=’SNMP’, origin=_origin, hostname=_host, msg=’Trading DB host is down’] ) )
��: ��
178 IBM Tivoli Enterprise Console: � �� ���
get_attributes ��� �� �� ����.
��: get_attributes(_event, [ attribute_name=_attribute_value, ...] )
��: � �� ��� ��� �� ��� �� ��� ��� �������.
�� �� �� ���� �� ���.
��:
_attribute_value
�� ��� ���� ��
_event �� �� ��� ���. � ������.
attribute_name
�� � ��� ��
�: �� ��� ������ hostname, severity � status �� ��
��� �� �� _hostname, _severity � _status ��� �������.
get_attributes(_event,[hostname=_hostname, severity=_severity, status=_status ] )
��: ��
� 4 � � �� �� 179
get_config_param � �� �� ��� ����.
��: get_config_param(_name, _variable, default)
��: � �� $BINDIR/TME/TEC/.tec_config ��� ��� � �� �� ��
�� �� ��� �����.
_name �� ��� ���� ���, default �� _variable �� ����
�.
��:
_name �� ��� ��
_variable
�� ��� ��� �� ��
default
_name� �� ����� ��� ���� �� �� _variable� �� �
�: �� ��� _tec_rule_host ��� chair� �����. tec_rule_host ��� �
�� ���� ����, ��� not set ��� ����� ����. �� .tec_config
�� ��� �� �����.
#.tec_config settings #tec_rule_cache_size=10000 #tec_rule_cache_full_history=86400 #tec_rule_cache_non_closed_history=155520 #tec_rule_cache_clean_freq=3600 tec_rule_trace=YES tec_rule_trace_file=/tmp/rules.trace tec_rule_host=chair tec_server_handle=5
get_config_param(tec_rule_host,_tec_rule_host,’not set’)
��: ��
180 IBM Tivoli Enterprise Console: � �� ���
get_global_grp ��� ��� �� ��� ��� �� ����.
��: get_global_grp(_group,_key,_value)
��: � �� ��� ��� �� ��� ��� �� �� ������ ���
�. � �� ���� ��� � ���� ��� ��� ��� �� _value�
�������. _value � _key� � ��� ���.
��:
_group
��� �� �� �
_key ��� �� �. � ��� ���.
_value �� �. � ��� ���.
�: �� ��� Maintenance ��� �� �� ��� ��� ����.
get_global_grp(’Maintenance’, _key, _value),
��: get_globals, get_global_var
� 4 � � �� �� 181
get_global_var ��� ��� �� ����.
��: get_global_var(_group, _key,_value,_default)
��: � �� �� ������ ��� ��� ��� �� �� �� _value�
�����. ��� �� ��� _default� ���� _default� _value� �
�����. _value� � ��� ���.
��:
_default
� �� �� ��� �� �
_group
��� �� �� �
_key ��� �� �
_value �� �. � ��� ���.
�: �� �� �� ��� �� ����.
1. �� �� Maintenance ��� ��� �� �� ���� origin �
�� �� �� � �� ����. �� �� �� �� ���, �� off� ��
���.
2. ���� ���� ��� �� �� ��� ��� ��� � � �����.
3. � � ���, ���� ���� � ��� �����.
rule: check_maint_mode: ( event: _event of_class _event_class where [ origin: _origin ], reception_action: ( get_global_var(’Maintenance’, _origin, _maint_mode, ’off’), _maint_mode == ’on’, drop_received_event, commit_rule ) ).
��: get_globals, get_global_grp
182 IBM Tivoli Enterprise Console: � �� ���
get_globals �� ��� ��� ����.
��: get_globals(_group, _key,_value)
��: � �� �� �, � � ��� ��� ��� �� �� �����. �
�� � ��� ���. � �� ��� ��� � ���� ��� ��� ��
� ��� �� � �� �� �������.
��:
_group
�� �
_key �
_value �� �
�: �� ����� � ���� �����.
get_globals(_group,_key,_value)
��: get_global_grp, get_global_var
� 4 � � �� �� 183
get_gm_time ���� ��(GMT)� � � � ��� ����.
��: get_gm_time(_time_gm_struct)
��: � �� GMT� � � � ��� ����. _time_gm_struct� � ��
� ���.
��:
_time_gm_struct
�� ��� GMT ���� �����. ��� _time_epoch �� �� �
� �� �� �� ���� � get_time �� �� ��� ���
� ��� ����.
�: �� ����� � ��� GMT� �� �� ��� � � ���� ��
�� time_string ��� � � ���� �� �����.
get_gm_time(_time_gm_struct), convert_ascii_time(_time_gm_struct, _time_string), bo_set_slotval(_event, time_string, _time_string)
��: bo_set_slotval, convert_ascii_time, get_time, resolve_time
184 IBM Tivoli Enterprise Console: � �� ���
get_local_time � �� �� ��� ����.
��: get_local_time(_time_local_struct)
��: � �� � �� �� ��� ����. _time_local_struct� � ���
���.
��:
_time_local_struct
�� ��� �� ��� �����. ��� _time_epoch �� �� �
� �� �� �� ���� � get_time �� �� ��� ���
� ��� ����.
�: �� ����� � �� �� ��� �� ��� �� �� ��� �
� ���� ���� time_string ��� � � ���� �� �����.
get_local_time(_time_local_struct), convert_ascii_time(_time_local_struct, _time_string), bo_set_slotval(_event, time_string, _time_string)
��: bo_set_slotval, convert_ascii_time, get_time, resolve_time
� 4 � � �� �� 185
get_time ��� ���� 1970 1� 1� 00:00:00 ���� ��(GMT) �� ��
� ��� � � � ��� ����.
��: get_time(_time_epoch)
��: � �� ��� � � �� ��� � ��� ����. _time_epoch�
� ��� ���.
��:
_time_epoch
�� �� �� �����. ��� _time_local_struct �� �� �� ��
��� �� ���� � get_local_time �� �� ��� ����
��� ����.
�: �� ����� �� �� �� �� ���� time_epoch ��� �� ��
���� �� �����.
get_time(_time_epoch), bo_set_slotval(_event, time_epoch, _time_epoch)
��: bo_set_slotval
186 IBM Tivoli Enterprise Console: � �� ���
global_exists ��� ��� �� ��� � ���.
��: global_exists(_group, _key)
��: � �� � _key� ���� �� � _group�� ��� ��� � ���.
��� ���� �� �����.
��:
_group
� ��� �� �� �
_key � ��� �� �
�: �� ��� �� �� ���� origin ��� ��� Maintenance
��� ��� ��� ��� �� � ���.
global_exists(’Maintenance’,_origin)
��: ��
� 4 � � �� �� 187
increment_slot ��� �� ��� �� �� �����.
��: increment_slot(_event, _attribute_name, _by_value, _trigger)
��: � �� ��� �� ��� �� �� �����.
�: ����� �� �� � �� ��� ���� ����� ���� �� ��
�� �������.
��:
_attribute_name
�� ��
_by_value
�� �
_event �� ����� �
_trigger
� �� ��� ���� �� �� ��� ��� ��� �����. �
�� ‘YES’, yes, ‘NO’ �� no���.
�: �� ����� � ���� �����.
increment_slot(_event,host_down,1,no)
��: decrement_slot
188 IBM Tivoli Enterprise Console: � �� ���
init_count ��� ���� �����.
��: init_count(_key1, _key2, _value)
��: � �� _key1 � _key2 �� �� ���� ��� �����. ���
_value �� ��� �����. �� ��� 0�� �����.
� ��, �� ����� �� ���� �� � ����
check_and_increment_count �� � �����.
�:
1. ��� init_count �� �� � ���� ��� check_and_increment_count
�� ��� � �� �� �� �� � ��� ���� 0�� ��
���.
2. � ���� ��� � �� ��� ����� �� ��� ��� ��
�� ���.
3. ���� ��� ��� �� �� � ��� ����� �� ��� ��
�.
��� �� ��� � �� �� ���� � �����. _key1 � _key2� �
� �� ��� � ����� ��� � ���. �� ��, ��� ���
�.
v ��� ����� �� ���� �� �� �� ���� �� �� ��� �
�� ��� � ��� ���� �� ��� ���� event_class, hostname �
�� ���� ��� � ���(�: perf_alert,orange).
v ����� ���� �� ��� �� �� �� ���� �� �� ��� �
�� ���� � ��� ��� �� ��� ���� failure, component ��
� ���� ��� � ���(�: paper_jam,flr4rm23).
��� ��� ��� �� ��� �����.
��:
_key1 ��� �� 1� � ��. ����� ���.
_key2 ��� �� 2� � ��. ����� ���.
_value ��� ���� �. ����� ���.
�: �� ��� ��� ��� Printer_Jam� ��� �� ���� ���� �
� ��� �� ���. ��� ��� failure,component ��� ���� ����
�. Printer_Jam ���� hostname ���� ��� ���� �����.
� 4 � � �� �� 189
��� ��� �� ���� �� ���� check_and_increment_count �� �
� � ���� 0�� ���� 1� �� �����. ���� �� ��� ��
�� �� ����� �� �� ���� ���.
���� �� �� �� 5� �� � ���� ��� ���� �� ���
init_count �� ���� 0�� ������. �� � � � ����
check_and_increment_count � �� �� ���� �� � ����� Prolog
��� ELSE ��� � ����.
rule: printer_jam: ( event : _ev of_class ’Printer_Jam’ where [hostname: _hn within [’flr4rm23’, ’flr3rm12’, ’flr1rm11’, ’flr6rm9’ ], action: check_count: ( (check_and_increment_count(printer_jam,_hn,5,_count) ; % ELSE clause follows exec_program(_ev,’scripts/notify.sh’, ’Printer failure on %s’, [_hn], no), init_count(paper_jam,_hn,0) ) ) ).
��: check_and_increment_count
190 IBM Tivoli Enterprise Console: � �� ���
init_event_activity ��� � ���� ��� �� �� �� �����.
��: init_event_activity(_file, _event_ exclusions, _attribute_criteria, _threshold)
��: � �� ���� ��� ���� ��� �� ��� �� �����.
��� � ���� ��� ���� ���� �� �� ���. ���� ��
���� ���� ��� ��� �� ����� ��� ��� �� ����� �
� � ���.
� �� ��� �� �� �� TEC_Start ���� �� ��� ��� ���
� ���. ��� �� �� ��� ���� �� � � �����.
��:
_attribute_criteria
�� �� ���� � ��. �� �� ��(�: [source, hostname,
severity])�� ���.
�� ��� � �� �� �� ��� �(nest) ��� � ���. ��
��, [hostname, severity]� ��� ��� � ���. [hostname, severity]
� ��� ����, ��� ���� �� ��� ���� �� ����
�. class ���� ��� ��� ���� �� � ��� ��� � �
��. �� ��, [class, hostname] � ��� ��� ��� ���� �
� ��� ���� �� �����.
_event_exclusions
��� ����� �� ���� ��� ��. � ��(�:
[‘TEC_Heartbeat’, ‘TEC_Maintenance’])� �� �� ���� ���.
_file ���� ��� �� � �� ��
_threshold
�� �� ��� �� ���� ���� �� _attribute_criteria �� �
�
�:
1. �� ����� �� ���� �� �����.
_rep_freq is 20, init_event_activity( ’/tmp/event_activity’, % Report file [’TEC_Heartbeat’, % Do not report these events ’TEC_Maintenance’ ], [source, % Single attribute reporting
� 4 � � �� �� 191
hostname, severity, status, [hostname,severity], % Multiple attribute reporting [class,hostname] % Class reporting ], 5 % Do not report counts less %than this ),
2. ��� � ���� �� � ��� TEC_Tick ���� �� ���� �
��. �� ����� �� ���� �� �����.
rule: configure_event_activity: ( event: _event of_class ’TEC_Tick’ where [msg: _msg equals ’Event Activity Report’, duration: _reporting_frequency], reception_action: start_timer: ( set_timer(_event,_reporting_frequency,_msg), commit_rule ) ).
3. �� ����� ��� � ���� � �� �����.
192 IBM Tivoli Enterprise Console: � �� ���
��: print_event_activity
Event Activity For Server tkennedy From: Thu Mar 02 14:14:02 2000. To : Thu Mar 02 14:14:18 2000. Reporting Frequency: 0 Minutes. Total Events: 3332 Reporting Threshold: 5 ============================================================= Event Class Summary ============================================================= Count Class Name ------------------------------------------------------------- 849 TEC_Tick 848 TEC_DB 822 TEC_Notice 812 TEC_Error ============================================================= Slot Summary ============================================================= Count Slot Criteria ------------------------------------------------------------- 3332 status=OPEN 590 severity=MINOR 574 severity=WARNING 564 severity=CRITICAL 550 severity=UNKNOWN 544 severity=HARMLESS 510 severity=FATAL 12 hostname=midnight.austin.lab.tivoli.com 12 source=69.1.3.30 11 hostname=dhcp12-235.austin.lab.tivoli.com 11 source=69.1.12.235 11 hostname=stingray.austin.lab.tivoli.com 11 source=69.1.5.82 10 hostname=austin.lab.tivoli.com 10 source=69.1.1.6
� 4 � � �� �� 193
ip_node_unreachable ���� �� � �� ����� ��� ��� �����.
��: ip_node_unreachable(_ipaddress, _event)
��: � �� ��� ��� �� � �� IP ��� ������ ��� ��
� IP ��� �� �� ��� ���� �����. _ipaddress� ��� �
���� ����, ��� ���� ��� ���� ��� ��, _event ��
���� TEC_ITS_SUBNET_STATUS� �� ��� ��� �����.
���, � ���� link_effect_to_cause �� ���� �� ���� ����
TEC_ITS_SUBNET ���� ����� � �� � ���. ��� ��� �
�� �� ground(_event)� ���� _event �� ��� ���� ���� �
������. ���� ��, ��� ��� �����.
� �� ����� NetView ����� ���� � netview.rls � ��� ��
�� ���.
��:
_ipaddress
�� � �� IP ��
_event �� ����, � �� IP ��� ���� ���
TEC_ITS_SUBNET_STATUS ���� ��� ��� ���. ����
�� � ���, �� ���� ����.
194 IBM Tivoli Enterprise Console: � �� ���
is_clearing_event ���� create_clearing_event �� create_event_sequence �� � ��� �
��� ������ ��� ������.
��: is_clearing_event(_event)
��: � �� � �� � ��� ���� ��� ��� ����� � ���
��. ���� create_clearing_event create_event_sequence �� � ��� �
��� ����� ��� �� ��� ��� ���� is_clearing_event �� �
����.
��:
_event ��� ���� ��� ����� �
�: �� �� � ��� ���� ��� ���� ��� �����
�. ���� ��� �� �� �� ���� ��� �����. � �� � �
���� ���� ���� �� �� ���� ������.
rule: ’process_clearing_events’:( event: _ev of_class ’EVENT’, reception_action: ’check_for_clear’:( is_clearing_event(_ev), ...
��: create_clearing_event, create_event_sequence
� 4 � � �� �� 195
link_effect_to_cause � ���� � ���� �����.
��: link_effect_to_cause(_effect_event, _cause_event)
��: � ���� cause_date_reception � cause_event_handle ��� �� �
� ��� � ���� �� ��� ��� �����. � ����
date_reception �� �� cause_date_reception ��� ��� � ����
event_handle �� �� cause_event_handle ��� ����.
��:
_cause_event
� ���
_effect_event
� ���
�: �� ��� probe_arg �� ��� ���� � �, universal_oserv ����
universal_host ���� ���� � ��, universal_oserv ���� universal_host
���� �����. �� ���� �� ���� ��, universal_oserv ����
�� status ��� ACK� �����.
rule: link_oserv_to_host: ( event: _event of_class ’universal_oserv’ where [probe_arg: _probe_arg, severity: equals ’WARNING’ ], action: ’link_host’: ( first_instance(event: _host_ev of_class ’universal_host’ where [severity: within [’CRITICAL’,’FATAL’], probe_arg: equals _probe_arg, status: outside [’CLOSED’] ]), set_event_status(_event,’ACK’), link_effect_to_cause(_event, _host_ev) ) ).
��: unlink_from_cause
196 IBM Tivoli Enterprise Console: � �� ���
load_globals ��� ��� ���� �� ���� �����.
��: load_globals(_file)
��: � �� �� ��� ��� ���� �� ���� �����.
��:
_file �� �� ��� �� �� � �� ��
�: �� ����� � ���� �����.
load_globals(’/tmp/globalvars.txt’)
��: save_globals
� 4 � � �� �� 197
log_error � ��� ���� �� ���� ����.
��: log_error(format_string, variable_list, severity)
��: � �� ��� �� ����� �� ��� ��� ��� � ��
� ���� ���. IBM�� ���� �� � �� ��� � �� ��
� �� �� ���� ����� � ��� ���.
� �� �� ��� �� ���� �����.
v ��� ��
v ��� ��� TEC_Error ��� ��
log_error �� ��� �� �� �� ���� ������.
v tell_err �� Prolog �� ���� �� ������. � �� �� ����
�� ��� �����. ��� TEC_Start ����� ���� ���� ���
��� �� �� �� ����� ��, �� ��� ���� � ��� �
� ���. tell_err �� ��� ��� ����.
tell_err(’filename’)
v �� �� ������� �� �� �� � �� � �� ��� �� �
�� �����. �� ��� 233 ���� �set_log_error_source�� �����
�.
��:
_format
�� �� �� ��. �� �� ��� ����.
%c �
%d 10� ����� �� ��
%e �� ����� �� ��
%f 10� ����� �� ��
%g � ���� �� ��(10� �� �� ���).
%o � �� 0�� ���� 8� ����� �� ��
%s �
%u ��� �� 10� ����� �� ��
%x � �� 0x� ���� 16� ����� �� ��
��� �� % �� �� � �� �� �� ��� �� � ��
�.
198 IBM Tivoli Enterprise Console: � �� ���
- �� ��
0 ��� 0�� ���
n �� �� � � ��, n� ��� �� �����.
n.m ��� ��, n� ��� �� ���� m� ��� �� ��� �
����.
severity
�� TEC_Error ���� �� ���� �����.
variable_list
�� ���� ��� ��� ��. ��� ��� �� ���� �� ���
� ���.
�: �� ����� check_data �� �� �� �� ��� ��� ���
��� �(_data)� ���� my_predicate �� �� �� �����.
check_data �� ��� ����. ��� ��� ����.
1. �� ������ �� �� �� my_predicate �� ��� �����. �
�� set_log_error_source �� �����.
2. check_data �� � ��� trace_it �� �� ��� ���. � �� �
�� ��� ��� ����� set_detailed_debugging �� ��� �����
���. trace_it �� � ��� �� ��� ���.
3. check_data �� ���� log_error �� ���� Bad Data ����
my_predicate �� ID� � �� ��� �����. tell_err �� �� ��
� �� � ��� ���� �� ��� �������.
�� check_data �� ���� TEC_Error ���� CRITICAL ���� Bad
Data ��� � my_predicate �� ID� � �����. ��� � �� ID�
���� msg ��� �����.
my_predicate(_data):- set_log_error_source(my_predicate), ( trace_it(check_data), process_data(_data) ; log_error(’Bad Data %s’,[_data],’CRITICAL’) )
��: set_log_error_source
� 4 � � �� �� 199
place_change_request �� �� ��� �����.
��: place_change_request(_event, _attributename, _newattributevalue)
��: �� �� ��� ��� �� ���� �����. � ���� �� �� �
��, bo_set_slotval �� � ��� �� �� �� � ���� � �� ��
���� ���� �� �� � � ���.
��:
_attributename
�� ��
_event �� ��� �� ����� �
_newattributevalue
��� ���� �� �
�: �� ��� hostname ��� myhost ��� �� �� �����.
place_change_request(_event, hostname, myhost)
��: bo_set_slotval, re_mark_as_modified
200 IBM Tivoli Enterprise Console: � �� ���
print_cache ��� ��� ��� �����.
��: print_cache(file_name)
--��--
print_cache(file_name, event:_event of_class class where attribute_conditions)
��: � �� ��� ��� ��� �����. �� �� ��� �����.
v ��� �� ��: �� ��� �� ��
v ��� ��� �: ���� �� ��� ��
��:
event:_event of_class class where attribute_conditions
��� �� �� ���� ���� �� ��� ��� �����. ��
�� ��� ���� ��� �� �� �� _event � ��� ��� �
��� ����.
file_name
��� ��� �� �� � �� ��
�:
1. �� ��� ��� ��� �� ���� /tmp/cache ��� �����.
print_cache(’/tmp/cache/’)
2. �� ��� ��� ���� TEC_Start ���� �� ���� /tmp/cache �
�� �����.
rule: print_cache: ( event: _event of_class _class, reception_action: ( print_cache(’/tmp/cache’, event: _cached_event of_class ’TEC_Start’) ) ).
3. �� ��� ��� ���� �� ��� �� CLOSED �� ����
/tmp/cache ��� �����.
rule: print_cache: ( event: _event of_class _class, reception_action: ( print_cache(’/tmp/cache’, event: _cached_event of_class _cached_class where [status: equals ’CLOSED’]) ) ).
��: print_class_tree, print_event_activity
� 4 � � �� �� 201
print_class_tree ��� ��� �� �� ��� �� � ������ ��� ����� �����.
��: print_class_tree(_file, _class)
��: � �� ��� ���� ��� ���� �� ���� �� �����
��� ��� �� �� ��� �� � ������ ��� ����� �����.
�� ��� �� ��� ���� ��� �� ��� �� �� ����.
��:
_class ��� �� ���� �� ��� ���� ��
_file ��� ��� ��� �� �� � �� ��
�: �� ��� �� � ���� �� ��� ��� ���(���� � ���
��� EVENT���) /tmp/class_tree ��� ����� �����.
print_class_tree(’/tmp/class_tree’, ’EVENT’)
��: print_cache, print_event_activity
202 IBM Tivoli Enterprise Console: � �� ���
print_event_activity init_event_activity �� ��� ��� � ���� �����.
��: print_event_activity
��: � �� init_event_activity �� � ��� ���� ��� � ��
�� �����. ��� � �� � ��� �����.
���� ���� ��� set_timer �� _duration �� �����.
��: ��
�:
1. ��� � ���� �� � ��� ����� ��� � �� TEC_Tick
���� �� ���� ���. �� ����� �� ���� �� ���
��.
rule: configure_event_activity: ( event: _event of_class ’TEC_Tick’ where [msg: _msg equals ’Event Activity Report’, duration: _rep_freq], reception_action: start_timer: ( set_timer(_event,_rep_freq,_msg), commit_rule ) ).
2. �� ����� print_activity_report � ��� �����. �� ���� 191
���� �init_event_activity�� �����.
timer_rule: print_and_reset_event_activity: ( event: _event of_class _class where [ ], timer_info: equals ’Event Activity Report’, timer_duration: _rep_freq, action: print_and_reset_event_activity: ( print_event_activity, reset_event_activity, set_timer(_event,_rep_freq, ’Event Activity Report’) ) ).
��: init_event_activity
� 4 � � �� �� 203
re_after_match ��� �� � �� ���� � ��� ��� ��� �� ��� �� �
�� � ���� �����.
��: re_after_match(_name, _string, _result)
��: � �� re_create �� ��� ��� �� � �� ���� _string�
� ��� ��� ����. ��� ���� �� �����. �� �� ���
� _result� �����.
�� � � �� � ���� �� ��� Perl ��� ������.
��:
_name re_create �� ��� �� � �� ��
_result
�� �� �� ���
_string
��� �� � �
�: �� ����� �� ���� �� �����.
re_create(test,’a.*i’) % Create regular expression test. re_after_match(test,’chair’,_result) % Search ’chair’ using regular expression test. % Return the substring after the match in _result. % Succeeds, ’r’ returned in _result.
��: re_before_match, re_create
204 IBM Tivoli Enterprise Console: � �� ���
re_before_match ��� �� � �� ���� � ��� ��� ��� �� ��� �� ��
� � ���� �����.
��: re_before_match(_name, _string, _result)
��: � �� re_create �� ��� ��� �� � �� ���� _string�
� ��� ��� ����. ��� ���� �� �����. �� �� ���
� _result� �����.
�� � � �� � ���� �� ��� Perl ��� ������.
��:
_name re_create �� ��� �� � �� ��
_result
�� �� �� ���
_string
��� �� � �
�: �� ����� �� ���� �� �����.
re_create(test,’a.*r’) % Create regular expression test. re_before_match(test,’chair’,_result) % Search ’chair’ using regular expression test. % Return the substring before the match in _result. % Succeeds, ’ch’ returned in _result.
��: re_after_match, re_create
� 4 � � �� �� 205
re_create �� �� � � �� � �� �� � �� �����.
��: re_create(_name, _pattern)
��: � �� �� �� � � �� �� ��� � � ��� �� � �
� �����. �� � �� ���� ��� �� �����. ��� ��� �
� �� �� TEC_Start ���� �� ��� ��� ���� ���. ���
�� �� ��� ���� �� � � �����.
�� � � �� � ���� �� ��� Perl ��� ������.
��:
_name �� � �� �� ��� ��
_pattern
�� � �
�: �� ����� �� � �� ���� �� �� �� � � ���� �
��� �� �����.
re_create(test,’h.*i’) % Create regular expression test. re_search_string(test,’chair’) % Compare ’chair’ to regular expression test. % Succeeds, matches ’hai’.
��: ��
206 IBM Tivoli Enterprise Console: � �� ���
re_mark_as_modified ��� ������� ���� �� ��� �����.
��: re_mark_as_modified(_event, _)
��: � �� � ���� �� �� �� ���� ��� � � ��� �
������ ���� �� bo_set_slotval �� ��� �� �����.
��:
_ Prolog� �� ����� ���� ������ �� ��. anonymous �
���� ���.
_event �� ����� �. bo_set_slotval� _event �� �� ��� ��
�� �� ���.
�: �� ����� _oldevent� �� ��� ���� �� ���� ����
�� �����.
re_mark_as_modified(_oldevent, _)
��: bo_set_slotval, place_change_request
� 4 � � �� �� 207
re_match ��� �� � �� ���� � ��� ��� ��� ��� �����.
��: re_match(_name, _string, _index, _result)
��: � �� re_create �� ��� ��� �� � �� ���� _string�
� ��� ��� ����. ��� ���� �� �����. ���� ���
� _result� �����. ��� ��� � �� �� ��� ���� �
_index �� �����.
�� � � �� � ���� �� ��� Perl ��� ������.
��:
_index _result� �� ��� �. � 0� ���� �� ��� � ����,
� 1� ���� ��� � ��� ��� � ��� ����, � 2�
���� ��� ��� ��� � ��� ���� ����.
_name re_create �� ��� �� � �� ��
_result
_index ��� � ��� ���
_string
��� �� � �
�: �� ����� �� ���� �� �����.
re_create(test,’a.*r’) % Create regular expression test. re_match(test,’chair’,0,_result) % Search ’chair’ using regular expression test. % Return the entire result in _result. % Succeeds, ’air’ returned in _result.
��: re_create
208 IBM Tivoli Enterprise Console: � �� ���
re_search_string ��� �� � �� ���� � ��� ��� ����.
��: re_search_string(_name, _string)
��: � �� re_create �� ��� ��� �� � �� ���� _string�
� ��� ��� ����. ��� ���� �� �����.
�� � � �� � ���� �� ��� Perl ��� ������.
��:
_name re_create �� ��� �� � �� ��
_string
��� �� � �
�: �� ����� �� ���� �� �����.
re_create(test,’h.*i’) % Create regular expression test. re_search_string(test,’chair’) % Search ’chair’ using regular expression test. % Succeeds, matches ’hai’.
��: re_create
� 4 � � �� �� 209
re_send_event_conf ���� �� ��� ��� ����.
��: re_send_event_conf(_conf_file, _event)
��: � �� �� ��� ��� �� ��� ��� ���� ����. �� �
�� ��� � ���� TEC_RULES ������ � ���. �� �� �
�� .conf ��� ��� �� �����. �� ��, �� �� ��� host.conf
��, _conf_file �� �� host �� ������. � �� ��� �� �� �
�� ��� ��� �� �� �� ���� ���� �� ��� � ��� ��
���. �� �� 50�� �� �� ��� �����.
� �� �� ��� � ��� �����. ���� �� ��� ��
� � ��� ��, �� ��� ConnectionMode� �� connection_oriented� �
���� �����. � �� ���� ��� ��� ��� ��� � ���
���� ��� ���.
��, �� ��� ��� ��� ���� �� �� ��� ��� ��� ����
���� ���, �� ��� �� ��� ��� ��� ��� ���� �� �
� ��� �� � ��� ��� ���(�: BufEvtPath=/etc/tivoli/orange.cache).
�� ����� re_send_event_conf �� � ���� �� ��� ��� ��
���. �� �� ��� IBM Tivoli Enterprise Console ��� ���� ����
�.
ServerLocation=orange.tivoli.com TestMode=no BufEvtPath=/etc/Tivoli/orange.cache # ConnectionMode=connection_oriented
�: �� ��� � ��� ���� ���� ��, �� ��� � ��� ���
� �� ���. �� wrb ��� -imptgtdata ��� ���� �� �
���. wrb ��� �� �� ��� IBM Tivoli Enterprise Console ��
� ��� ���� ������.
��:
_conf_file
�� ��� �� ��� ���� �� ��
_event ��� ���
�: �� ��� ���� host.conf �� ��� ��� �� ��� ��
� ����.
re_send_event_conf(’host’,_event)
��: forward_event
210 IBM Tivoli Enterprise Console: � �� ���
re_split_event_id server_path ��� ��� ��� �� ���.
��: re_split_event_id(_path_element, _host, _server_handle, _date_reception,
_event_handle)
��: � �� ����, server_path ������ �� ��� �� �� �
� �� � �� �� ��� ��� ��� �� (��)���. server_path
��� ���� ����� ��� ��� ��� �� ��� ���� ��� ��
���. ��� ��� ��� ��� ��� �� ��� ���. � ��� ��
��� 10 ���� ���� ��� �� ��� ��� ID� ���� �� ���.
server_path ��� �� �� ��� IBM Tivoli Enterprise Console ��� ���
� ������.
��:
_date_reception
���� ���� �� ��� � ��� �����. � �� ���� �
�� ����� � date_reception ������ ������.
_event_handle
���� ���� ��� � ��� �����. � �� ���� ���
����� � event_handle ������ ������.
_host ��� hostname� � ��� �����. � �� ��� � ����
$BINDIR/TME/TEC/.tec_config ���� tec_rule_host �� ������
����.
_path_element
�� server_path ��� �� ��. ��� ��� ���� �� �
�� �����.
_server_handle
��� ��� � ��� �����. � �� ��� � ����
$BINDIR/TME/TEC/.tec_config ���� tec_server_handle �� �����
� ����.
�: �� ��� server_path ��� ��� ��� � ���� �� �� �
��.
bo_get_slotval(_event,server_path,_server_path), % Get the list for the server_path attribute. member(_item,_server_path), % Get an element of the list. % Because _item is free, the list will be traversed % and each element will be returned in succession.
� 4 � � �� �� 211
re_split_event_id(_item,_host,_server_handle, _date_reception,_event_handle) % Parse each element into variables.
��: bo_get_slotval, member
212 IBM Tivoli Enterprise Console: � �� ���
re_substitute ��� �� � �� ���� � ��� ��� ��� ��� ���� � �
� ���� �����.
��: re_substitute(_name, _string, _substitute, _result)
��: � �� re_create �� ��� ��� �� � �� ���� _string�
� ��� ��� ����. ��� ���� �� �����. _substitute� ��
��� ���� � � � _result� �����.
�� � � �� � ���� �� ��� Perl ��� ������.
��:
_name re_create �� ��� �� � �� ��
_result
��� ��� �� � �
_string
��� �� � �
_substitute
��� �� �
�: �� ����� �� ���� �� �����.
re_create(test,’a.*w’) % Create regular expression test. re_substitute(test,’hawk’,’oo’,_result) % Search ’hawk’ using regular expression test. % Return the new string in _result. % Succeeds, ’hook’ returned in _result.
��: re_create, re_substitute_global
� 4 � � �� �� 213
re_substitute_global ��� �� � �� ���� � ��� �� ��� ��� �� ��� �
��� � � � ���� �����.
��: re_substitute_global(_name, _string, _substitute, _result)
��: � �� re_create �� ��� ��� �� � �� ���� _string�
� �� ��� ����. ��� �� ��� ��� ���� �� �����.
_substitute� �� �� �� ��� ���� � � � _result� �����.
�� � � �� � ���� �� ��� Perl ��� ������.
��:
_name re_create �� ��� �� � �� ��
_result
��� ��� �� � �
_string
��� �� � �
_substitute
��� �� �
�: �� ����� �� ���� �� �����.
re_create(test,’a.*w’) % Create regular expression test. re_substitute_global(test,’hawkhawkhawk’,’oo’,_result) % Search ’hawk’ using regular expression test. % Return the new string in _result. % Succeeds, ’hookhookhook’ returned in _result.
��: re_create, re_substitute
214 IBM Tivoli Enterprise Console: � �� ���
redo_analysis ���� �� �� �����.
��: redo_analysis(_event)
��: ���� ���� ��� ��� ��� ���� � �� �� ��
�. � �� ��� ���� �� � ��� �� �� � ��� �� ��
���.
�: redo_analysis �� ���� � �� �� �� �� ���. �� ��,
��� A� ���� ��� B� �� ��� ���� � �� �
� � ��� �� �� �� � ���.
��:
_event ���� �� � ��� � �����.
�: �� ��� ��� ��� INSTALLATION_FAILED ���� ��� ��
� ��, �� ���� �� �� ��� � ���.
rule: disk_full_check_install_failed: ( description: ’look for installationfailed events for this host’, event: _event of_class ’DISK_FULL’ where [status: equals ’OPEN’, hostname: _hostname ], action: ( all_instances(event: _install_ev of_class ’INSTALLATION_FAILED’ where [target_host: equals _hostname], _event -600 -600 ), redo_analysis(_install_ev) ) ).
��: ��
� 4 � � �� �� 215
remove_bslashes ��� ���� ���� ��� �����. ���� �� � � ��
� �� ��� �� � ��� ��� ���� � ���� ��� ��
�.
��: remove_bslashes(_path1, _path2)
��: � �� _path1 �� ���� ��� ���� � ��� _path2
�� �����.
��:
_path1
�� ��� ��
_path2
��� ��� ��
�: �� ��� ��� ���� ���� ��� �����.
% Assign value. _path="\\tivoli\\data\\repository’, % Convert back slashes. % _new_path is unified with /tivoli/data/repository. remove_bslashes(_path,_new_path)
��: ��
216 IBM Tivoli Enterprise Console: � �� ���
reset_event_activity �� ��� �� �� �� �� 0�� ������.
��: reset_event_activity
��: � �� �� ��� �� �� �� �� 0�� ������. ��� �
print_event_activity �� �� �� � ��� �����.
��: ��
�: �� ����� � ��� �����.
timer_rule: reset_event_activity: ( event: _event of_class _class where [ ], timer_info: equals ’Event Activity Report’, timer_duration: _rep_freq, action: reset_activity: ( print_event_activity, reset_event_activity, set_timer(_event,_rep_freq,’Event Activity Report’) ) ).
��: print_event_activity
� 4 � � �� �� 217
reset_global_grp ��� �� �� �� ��� ��� �� ������.
��: reset_global_grp(_group,_value)
��: � �� ��� �� �� �� ��� ��� �� �� ���� ����
�. � �� ���� ��� �, ��� ��� ��� ��� �� ����, �
� _value� �����.
��:
_group
��� �� �� �
_value ��� �� � �
�: �� ��� Maintenance ��� �� ��� ��� off� ������.
reset_global_grp(’Maintenance’, ’off’),
��: set_global_var
218 IBM Tivoli Enterprise Console: � �� ���
resolve_time �� ��� ��� ����.
��: resolve_time(_time_structure, _seconds, _minutes, _hours, _day_of_month,
_month, _year, _day_of_week, _day_of_year, _daylight_saving)
��: � �� _time_structure �� �� ���� �� ����� ���
��� �� �� �� ���� �������. _time_structure� resolve_time
� �� ������ ���. �� �� � ��� ���. �� ����
��(GMT)���.
��:
_day_of_month
1 - 31 ��� ��� �������.
_day_of_week
0 - 6 ��� ��� �������.
_day_of_year
0 - 364 ��� ��� �������.
_daylight_saving
DST_ ���� <sys/time.h>� ��� �� �� ��� �������.
� �� � ��� ���� �� �� �� ��� ���� � ��
� ���. ��� � �� �� ���� �� �� ��� �� �
� �����. �� ����� Solaris ������� �� �����.
#define DST_NONE 0 /* not on dst */ #define DST_USA 1 /* USA style dst */ #define DST_AUST 2 /* Australian style dst */ #define DST_WET 3 /* Western European dst */ #define DST_MET 4 /* Middle European dst */ #define DST_EET 5 /* Eastern European dst */ #define DST_CAN 6 /* Canada */ #define DST_GB 7 /* Great Britain and Eire */ #define DST_RUM 8 /* Rumania */ #define DST_TUR 9 /* Turkey */ #define DST_AUSTALT 10 /* Australian style with shift in 1986 */
_hours
0 - 23 ��� ��� �������.
_minutes
0 - 59 ��� ��� �������.
_month
0 - 11 ��� ��� �������..
� 4 � � �� �� 219
_seconds
0 - 59 ��� ��� �������.
_time_structure
�� ��� �����. ��� _time_epoch �� �� �� �� ��
�� ���� � get_time �� �� ��� ���� ��� ��
��.
_year 00 - 99 ��� ��� �������.
�: �� ����� � �� �� ������ ��� �� �� �� ��
��� ��� ���� month ��� _month �� ��� ���� �� �
����.
get_local_time(_time_local_struct), resolve_time(_time_local_struct, _seconds, _minutes, _hours, _day_of_month, _month, _year, _day_of_week, _day_of_year, _daylight_savings), bo_set_slotval(_event, month, _month)
��: bo_set_slotval, get_local_time
220 IBM Tivoli Enterprise Console: � �� ���
save_globals �� ��� ��� ������ ��� �����.
��: save_globals(_file, _group)
��: � �� �� ��� ��� ������ ��� �����.
��:
_file ��� �� �� � �� ��
_group
��� �� �� �
�: �� ����� Maintenance ��� �� ��� ��� ��� ���� �
� �����.
save_globals(’/tmp/globalvars.txt’, ’Maintenance’)
��: load_globals
� 4 � � �� �� 221
search_cache create_cache_search_criteria �� ��� ��� �� �� ��� ��� �
�� �����.
��: search_cache(search_name, _referenceEvent, _maxEvents, _foundEvent)
--��--
search_cache(search_name, _referenceEvent, _timeBefore, _timeAfter, _maxEvents,
_foundEvent)
��: � �� ��� ��� ��� �����. ��� ��� �� ����
create_cache_search_criteria �� � �����.
�� �� ��� _timeBefore � _timeAfter �� �� �� ���� ���
�.
� �� ��� ��� ���� �� � � �����.
��� ��� ���� ��� �� � get_attributes �� �� � ���.
��:
_foundEvent
���� ����� �
_maxEvents
� �� ���� �� �� ��� �
_referenceEvent
� ��� �� ����� �
search_name
���� �� � �� ��. � �� � ��� � ��
create_cache_search_criteria �� �����.
-timeAfter
�� ��� �� �
-timeBefore
�� ��� �� �
�: �� ��� db_critical_search �� ���� �� ���� 20 �� � �
�� ���� ���� ����. �� ���� ���� 5��� ����� ��
�����.
222 IBM Tivoli Enterprise Console: � �� ���
search_cache(’db_critical_search’, _refevent, 600, 600, 5, _found_event)
��: create_cache_search_criteria
� 4 � � �� �� 223
set_detailed_debugging �� �� � �� ��� � �� ��� �����.
��: set_detailed_debugging(on)
--��--
set_detailed_debugging(off)
��: � �� trace_it �� � � ��� �� ��� � �� �� �
�� ��� ���� �� ���� �� ���. set_detailed_debugging �� �
� ���� �� � ���.
��:
off � �� ��� ���� ��� �����.
on � �� ��� ����� �����.
�: �� ����� check_data �� �� �� ��� ��� ��� ��
� �(_data)� ���� my_predicate �� �� �� �����. check_data
�� ��� ����. ��� ��� ����.
1. � �� ��� ��� ���� �� set_detailed_debugging �� ��� �
��.
2. �� ������ �� �� �� my_predicate �� ��� �����. �
�� set_log_error_source �� �����.
3. check_data �� � ��� trace_it �� �� ��� ���.
4. check_data �� ����, log_error �� ���� Bad Data ����
my_predicate �� ID� � �� ��� �����. tell_err �� �� ��
� �� � ��� ���� �� ��� �������.
�� check_data �� ����, TEC_Error ���� CRITICAL ���� Bad
Data ��� � my_predicate �� ID� � �����. ��� � �� ID�
���� msg ��� �����.
�� ���� ���� �� ��� � �� ��� �����.
set_detailed_debugging(on), my_predicate(_data):- set_log_error_source(my_predicate), ( trace_it(check_data), process_data(_data) ; log_error(’Bad Data %s’,[_data],’CRITICAL’) )
224 IBM Tivoli Enterprise Console: � �� ���
��: ��
� 4 � � �� �� 225
set_event_administrator ���� �� ��� �����.
��: set_event_administrator(_event, new_administrator)
��: � �� ��� ���� �� administrator ��� �� �� �����.
�: � �� �� �� �� �� �� ��� ���� �� ��� �� ��
� �����. �� �� �����, set_event_administrator � ��
place_change_request �� �����.
��:
_event ��� �� ����� �
new_administrator
���� � ��� �����.
�: �� ����� � ���� �����.
set_event_administrator(_event, bjones)
��: change_event_administrator, place_change_request
226 IBM Tivoli Enterprise Console: � �� ���
set_event_message ���� msg ��� �����.
��: set_event_message(_event, _format, [_value])
��: �� ��� C ����� ��� sprintf() �� �����.
�: � �� �� �� �� �� �� ��� ���� �� ��� �� ��
� �����. �� �� �����, set_event_message � ��
place_change_request �� �����.
��:
_event �� �� msg ��� �� ����� �
_format
msg �� �� �� �� ��. �� �� ��� ����.
%c �
%d 10� ����� �� ��
%e �� ����� �� ��
%f 10� ����� �� ��
%g � ���� �� ��(10� �� �� ���)
%o � �� 0�� ���� 8� ����� �� ��
%s �
%u ��� �� 10� ����� �� ��
%x � �� 0x� ���� 16� ����� �� ��
��� �� % �� �� � �� �� �� ��� �� � ��
�.
- �� ��
0 ��� 0�� ���
n �� �� � � ��, n� ��� �� �����.
n.m ��� ��, n� ��� �� ���� m� ��� �� ��� �
����.
_value msg ��� �� ��� ���. � �� �� �����.
�: �� ����� �� ��� ��� �����.
_integer is 123, _real is 12.3, _string = ’Hello, World’,
� 4 � � �� �� 227
% Assign values. set_event_message(_event, ’%s’, [_string]), % msg attribute assigned ’Hello, World’. set_event_message(_event, ’%20s’, [_string]), % msg attribute assigned ’ Hello, World’. set_event_message(_event, ’%-20s’, [_string]), % msg attribute assigned ’Hello, World ’. set_event_message(_event, ’Integer in decimal notation: %d’, [_integer]), % msg attribute assigned ’Integer in decimal % notation: 123’. set_event_message(_event, ’Integer in decimal notation with field width: %10d’, [_integer]), % msg attribute assigned ’Integer in decimal % notation with field width: 123’ set_event_message(_event, ’Integer in decimal notation with leading zeros: %010d’, [_integer]), % msg attribute assigned ’Integer in decimal % notation with leading zeros: 0000000123’. set_event_message(_event, ’Integer in octal notation: %o’, [_integer]), % msg attribute assigned ’Integer in octal % notation: 173’. set_event_message(_event, ’Integer in hexadecimal notation: %x’, [_integer]), % msg attribute assigned ’Integer in hexadecimal % notation: 7b’ set_event_message(_event, ’Real in decimal notation: %f’, [_real]), % msg attribute assigned ’Real in decimal % notation: 12.300000’. set_event_message(_event, ’Real in decimal notation with field width: %3.2f’, [_real]), % msg attribute assigned ’Real in decimal % notation with field width: 12.30’. set_event_message(_event, ’Real in real notation: %f’, [_real]), % msg attribute assigned ’Real in real notation: % 12.300000’. set_event_message(_event, ’Real in exponential notation: %e’, [_real]), % msg attribute assigned ’Real in exponential % notation: 1.230000e+01’.
228 IBM Tivoli Enterprise Console: � �� ���
set_event_message(_event, ’Real in its shortest form: %g’, [_real]) % msg attribute assigned ’Real in its shortest form: 12.3’.
��: place_change_request
� 4 � � �� �� 229
set_event_severity ���� ���� �����.
��: set_event_severity(_event, new_severity)
��: � �� ��� ���� ���� �����.
�: � �� �� �� �� �� �� ��� ���� �� ��� �� ��
� �����. �� �� ����� set_event_severity � ��
place_change_request �� �����.
��:
_event ���� ��� ����� �
new_severity
� ��� ���
�: �� ����� � ���� �����.
set_event_severity(_event, ’CRITICAL’)
��: change_event_severity, place_change_request
230 IBM Tivoli Enterprise Console: � �� ���
set_event_status ���� ��� �����.
��: set_event_status(_event, new_status)
��: � �� ��� ���� �� ��� �����.
����:
1. � �� �� �� �� �� �� ��� ���� �� ���� ��� �
�� �� �� � �����. �� �� ����� set_event_status � �
� place_change_request �� �����.
2. status ��� � �� �� CLOSED ��� ������, duration ��� �
�� ���� �� ���� ����. �� 0�� ����. �� ��� 9 ��
�� �duration�� ������.
��:
_event ��� ��� ����� �
new_status
status ���� �� � �. status ��� �� �� �� 9 ���� �
��� ���.
�:
1. CLOSED ��� �� � ����.
2. new_status �� �� ACK�� OPEN ���� ��� ��� ��
��.
�: �� ����� ���� status ��� ACK� ���� �� �
����.
set_event_status(_event, ’ACK’)
��: change_event_status, place_change_request
� 4 � � �� �� 231
set_global_var ��� ��� �� �����.
��: set_global_var(_group, _key,_value)
��: � �� �� ���� ��� ��� ��� �� �����. ��� ��
�� ����� [ ] ���� ������.
��:
_group
��� �� �� �
_key ��� �� �
_value �� �
�: �� ����� �� ��� ��� �����.
set_global_var(’My group key’, _key, ’My value’)
set_global_var(’My group key’, _key, [’a’, ’b’, ’c’])
set_global_var(’Maintenance’, _origin, ’on’)
��: reset_global_grp
232 IBM Tivoli Enterprise Console: � �� ���
set_log_error_source log_error �� �� �� �� ������ �� �� �� �� ID� ��
���.
��: set_log_error_source(‘source_location’)
��: � �� �� �� ������� �� �� ��� �� ����
� �� �� � �� � �� ��� �� ��� �����. �� �� � ��
� �� �� �� ��� ID(�: � ��)� ������.
��:
source_location
��� � � ��� ���� �
�: �� ����� check_data �� �� �� �� ��� ��� ���
��� �(_data)� ���� my_predicate �� �� �� �����.
check_data �� ��� ����. ��� ��� ����.
1. �� ������ �� �� �� my_predicate �� ��� �����. �
�� set_log_error_source �� �����.
2. check_data �� � ��� trace_it �� �� ��� ���. � �� �
�� ��� ��� �����, set_detailed_debugging �� ��� ����
� ���. trace_it �� � ��� �� �����.
3. check_data �� ����, log_error �� ���� Bad Data ����
my_predicate �� ID� � �� ��� �����. tell_err �� �� ��
� �� � ��� ���� �� ��� �������.
�� check_data �� ����, TEC_Error ���� CRITICAL ���� Bad
Data ��� � my_predicate �� ID� � �����. ��� � �� ID�
���� msg ��� �����.
my_predicate(_data):- set_log_error_source(my_predicate), ( trace_it(check_data), process_data(_data) ; log_error(’Bad Data %s’,[_data],’CRITICAL’) ) )
��: log_error
� 4 � � �� �� 233
set_timer ���� ��� �����.
��: set_timer(_event, timer_duration, timer_info)
��: � �� ��� ���� ��� �����. ��� �� � � ��
� � ��� ��� ��� ��� ���� �� �� �� �����. ���
�, ��� �� ��� ����� �� � ��� ���� �����.
� �� ���� �� � � �� ��� ���� 1000���.
TEC_Tick ��� ���� �� ��� ��� ���. �, ��� ���� ��
��� ����. ��� ���� �� ���� ��� ��� ���� � �
� � ���.
��:
_event ��� ��� ����� �
timer_duration
��� �� ��( �). ��� �� ��� ��� ����� ���
� ���.
timer_info
�� ��. � �� ��, � �� ���� ��� � � ���.
��� �� ��� ��� ���� �� ��� � ���.
�: �� ��� �� �� ��� � ��� �� �� ��� �� �
����. �� �� ��� � ���� �� ��� �� ��� ���
�. �� �� ��� ��� � ���� ���, �� ��� � ����
�� ��� �����, �� ��� � ��� �� �� � ��� ���
��.
rule: ( event: _event of_class ’TEC_Start’ where [ ], reception_action: ( first_instance(event:_ev of_class ’TEC_Tick’ where []), set_timer(_event, 600, ’Event Activity Report’) ) ).
timer_rule: reset_print_activity: ( event: _event of_class _class where [ ], timer_info: equals ’Event Activity Report’, timer_duration: _rep_freq, action: reset_print_activity: ( print_event_activity,
234 IBM Tivoli Enterprise Console: � �� ���
reset_event_activity, set_timer(_event,_rep_freq,’Event Activity Report’ ) ).
��: ��
� 4 � � �� �� 235
trace_it �� �� � ��� �� ��� ���.
��: trace_it(predicate_name)
��: � �� �� �� �� �� ��� �����.
�: ��� ��� � �� �� �� ��� �� ��� �� � � ��
���� ����.
��:
predicate_name
�� �� ��
�: �� ����� check_data �� �� �� �� ��� ��� ���
��� �(_data)� ���� my_predicate �� �� �� �����.
check_data �� ��� ����. ��� ��� ����.
1. �� ������ �� �� �� my_predicate �� ��� �����. �
�� set_log_error_source �� �����.
2. check_data �� ��� trace_it �� �� ��� ���. � �� ���
��� ��� �����, set_detailed_debugging �� ��� ����� �
��. trace_it �� � ��� �� �����.
3. check_data �� ����, log_error �� ���� Bad Data ����
my_predicate �� ID� � �� ��� �����. tell_err �� �� ��
� �� � ��� ���� �� ��� �������.
�� check_data �� ����, TEC_Error ���� CRITICAL ���� Bad
Data ��� � my_predicate �� ID� � �����. ��� � �� ID�
���� msg ��� �����.
my_predicate(_data):- set_log_error_source(my_predicate), ( trace_it(check_data), process_data(_data) ; log_error(’Bad Data %s’,[_data],’CRITICAL’) ) )
��: set_detailed_debugging
236 IBM Tivoli Enterprise Console: � �� ���
unlink_from_cause � ������ � ���� ��� �����.
��: unlink_from_cause(_effect_event)
��: � �� ��� �� ��� ����� � ����
cause_date_reception � cause_event_handle ��� �� 0�� �����.
��:
_effect_event
�� �� ���
�: �� ����� � ���� �����.
unlink_from_cause(_oserv_down_event)
��: link_effect_to_cause
� 4 � � �� �� 237
update_event_activity print_event_activity_report �� ���� �� ��� ��� �����.
��: update_event_activity(_event)
��: � �� ������ ��� ���� �� ���� �� �� ����
� �����. ��� � �� ��� ����� ���� ��� ����.
��:
_event � ��� �� ����� �
�: �� ����� � ��� �����.
rule: update_event_activity: ( event: _event of_class _class where [ ], reception_action: update_activity: ( % recorded(event_activity,active), % Line above used with im.rls (intermediate mgr. rules) update_event_activity(_event) ) ).
��: print_event_activity
238 IBM Tivoli Enterprise Console: � �� ���
� 5 � �� �
� ���� �� � � �� ���� ���� IBM Tivoli Enterprise Console �
� ����� �� �� � �� ����� �����. ���� � ���
� �����. �� ���� ���� � � ���� ���� �� ���
� � �� �� ����. �� ��� � 1 � �� �� ���� 3 ���� �
�����.
� �� ��� ��� �� �, BAROC �� � ��� �� ���
$BINDIR/TME/TEC/samples/correlation ���� ��� �� ����� �� �
���.
� �� ���� ��� ��� ��� ��� �� �����.
��� � �� ��
������� �� ���� ���� ��, ��� �� � ��� ���� �
� �� �� � ������� �� ���� ��� �� ����� ���
���� ���, ���� ��� ���� ���� ���� ���� ����. �
���� �� ����� �� �� ���� ��� ��� ��� ���� �
���. �� ��, �� ����� ���� ���� �� ��� � �� �
� APC UPS(Uninterruptible Power Supply)� ���� ��� �����.
© Copyright IBM Corp. 2003 239
������ ��� ��� ���� �� �� ���� UPS(��� �� �
� ��)� upsOnBattery ���� ��� �� �����. upsOnBattery ���
� ���� �� ���� ���� ��� ���� �� ����.
��� ����, lowBattery ���� ��� UPS �� ��� ���� ��
�����. �� �� ��� �� �� ��� � � upsDischarged ���
�� �����. upsDischarged ���� ��� ��� ���� ��� ���
UPS(��� �� �� ��) ��� ��� ��� �����.
�: ���� ��� �� � ���� ��� ���� �� �� ��� ��
� ��� ��� ����. �� �� ���� ���� �� ����� �
��� �� � � ���� ���� �� ����. �� ���� ��
���� ���� �� ���� ��� ��� ��� ��� ���� ���.
�� ��, ��� A� B� ����, B� C�, ��� C� D� �����, �
� ���� ��� ��� ��� ���� ���. � ��� A� D� �
��, � �� ��� �����. A�� B, A�� C, A�� D, B�� C, B
�� D �� � ��� �� ��� ����. �� ��� ���� ��
� ���� ��� ��� �����.
powerRestored, returnFromLowBattery � dischargeCleared ���� ��� ���
���. ��� ��� � �� ���� �� ��� �� ��� ��!�� �
���. ����� ��� ���� �� ���� � ���� �����. �� �
�, powerRestored ���� upsOnBattery ���� ����. �� ���� ��
�� ���� ��� ���� �� �� ����.
IBM Tivoli Enterprise Console ��� ������� ��� ��� ���� �
� ���� ��� ��� �� ��� � �� ���� ������. �� � �
���� � �� �� ��� �����.
240 IBM Tivoli Enterprise Console: � �� ���
�� � �� � �� �
��� ��� �� � ��� �� � ���� ��� �����. �� � �
�� ��� ��� �����.
v ����� �� ����� �� �� �� �� �� �� ���� � �
��� �����.
v ���� ��� ��� ��� ��� ��� ���� ����.
� ��� �� �� �� ���
�� ������ � ��� ��� ��� �����. Compaq Insight Manager �
� ���� �� ���� � cpqTape3PhyDrvStatusChange ������.
cpqTapePhyDrvCondition �� Degraded, Failed � OK �� ���� ��� �
����. ��� ���� OK �� ���. �� ��(�: Distributed Monitoring)
� SNMP ��� ��� ��� ��� ����� �� ���� �� �� �
��� �����.
� ��� � ���
�� ������ � ��� ��� �� ��� �����. � ��� ��� �
�, 240 ���� � ���� �� ��� ���� ��� ����. ��� ��
�� �� ��� ��� ���� �� � ��, ��� ���� ��� ��� �
���. �� ��, ��� A� ��� ���� �� ��� B, C � D� �� �
���.
Cisco ��� ���(�� ��� ��)� ��� � ��� ���� �� �� ��
�� ����. Compaq Insight ���� ���(��� ��� ��)� ��
� � ��� ���� �� �� ����� cpqDa3PhyDrvStatus ��� ��
�� �����.
� 5 � �� �� 241
�� �� ��
���� ���� ��� ���� ���� � ���� ���� ��� �� �
� ��� �� � ���.
�� ���
� ���� ���� �� ���� �����. ��� �� ���� ����
�� ����(�: ���, ���, ��� �)� ���� �� ���� �� �
��� ���� �� ��� ���.
���� �� � ��� ���(�: � ��), � � ���� �� ���
� �� � ���� ��� �� ��� � � ���� �� ��� � �
��� �� ��� �� ��� �� ���. � ���� ���� �
���� �� � ���� ���� ���� �� � ���� ��� ��
�� ��� ����� ���� ��� ���. ��� ��� ��� � ��
�� �� ���� ��, ��� ��� �� � ��� ���� ���.
240 ���� ����� upsBatteryOn ���� lowBattery � upsDischarged �
��� �� � ������. upsOnBattery � lowBattery ���� �
upsDischarged ���� �� � ������.
upsBatteryOn ���� ��� �� ����� �� ������. ���
�� ������ � � ���� �����. �� �� ���� � ��
�� �����.
�� ���
� ���� �� �� ���� �����. 240 ���� ����� upsDischarged
���� lowBattery � upsOnBattery ���� �� � ������.
242 IBM Tivoli Enterprise Console: � �� ���
� ���� ��� � ���� �� �� ���� �� �� ���. �
� ��, ���� ��� � � �� ������ �� ���� �� �
���� �� � ���. �� ���� � ���� �� � �� ��� �
�� � ��� ���� ���.
���� �� � �� ��(�: � ��), � ���� �� ��� �� ��
�� ��� � � ���� �� �� � ���. � ���� ���
� � ���� � ���� ���� �� ����� ��, ��� ���
� ��� ����� ���� ��� ���. � ���� ��� ��� ��
��, ��� ��� � ��� ���� ���.
240 ���� UPS(��� �� �� ��) ��� ����, upsDischarged ���
� �� ��� �� ������ upsOnBattery ���� �� ��� ���
�� ���. upsOnBattery ���� �� � ��� �� ������ lowBattery
���� �� �� � �� ���. � ��� �� �� �� � ���,
upsDischarged ���� �� � ��� ���� ���. ( ��� ���
� ��� �� �����.)
�� ���
��� ���� �� ��� ���� ��� ��� ���� �� ����. 240
���� ����� powerRestored ���� upsOnBattery ���� �� ��� �
����, returnFromLowBattery ���� lowBattery ���� �� ��� ���
���.
��� ���� ����, ����� �� ��� ��� ���� �� ���� �
�� ���� �� ���� �� ��� ��� ��� �� ���. ��� ��
�� �� ��� ���� �� �� �� �� ������ ����� ��
�� �� �� ����.
� �� ���, ��� ���� ���� ��� ��� �� ��� � ��
�. � ��� ���� ��� ��� �� ���� ��� �� �� ���
� � � � ���. �� �� ����� �� ���� �� �� ���
���� �� � ���� ��� ���� �� ��� ��� � � ��
� (�� ���� ), ��� ���� �� �� �� �� ��� � ���.
��� ��, ��� ���� ���� ��� ��� �� ���� ����. �
� � ��� �� �� �� ���� ��� ��� �� ��� ����
����.
�� �� �� ��� ��
�� � ��� ��� � �� ��� ��� ���� ���� � �� ��
� � �� � ��� ��� �� � � � �� ���. � ���� ���
� 5 � �� �� 243
����� ��, ��� �� ������� �� �� �� �� ����� �
��(��� ���� ����) �����. � ��� �� ��� �� � � �
�� �� ������.
v � ��� ��
v � ��� ��
v ��� ��� ��
�� ��� ��
�� ��� � ���� �� ��� ��� �� �����.
1. � ��� �� � �����: �� � �� ��� ��� � ���� �
��� �� �� �����, � ���� ����, ����� ������.
�� � �� � �� ���� ���, ��� ���� ���� ����
� ���� � �� �� ��� � ���� ��� ������.
2. � � � ��� �: � � �� ��� ��� ���� ��� �����
�� �����, ��� ��� ���� ���� ��� ���� �� ��
� ��� �����. ��� ���� ���� ���� �� ��� ����
�� ���� ����� ������.
�: ��� ����, ��� ���� ���� ��� ��� �� ���� �
���. �� � ��� �� �� �� ���� ��� ��� ��
��� ���� ����.
3. � ��� �: � �� ��� ���� ��� ���� �� � ���, �
��� �� ����� � � ��� � ���� �����. � �
��� ��� � ���� ���� ��� ��(���� ��)� ��� �, �
�� ������.
4. �� � � ��� � ��: � ��� ��, � ���� ����
�� �� ���. ��� ���� �� ���� ��� ��� ����,
����� ����� �����.
�� ��� ��
�� ��� � ���� �� �� ��� �� �����.
1. � ��� �� � �����: � � �� ��� ���� 1�� ��
��.
2. � � � ��� �: � � �� ��� ���� 2�� ����.
3. � �� ��� �: ��� ���� � ���� ��� � ��� �
� �����. ���, �� ��� � ���� ���� ��� �����.
� � ���� �� ��� ��� ���, ��� � ���� ����
��� ��(���� ��)� ��� � ��� ������.
244 IBM Tivoli Enterprise Console: � �� ���
4. � ��� �: ��� ��� � ���� ���� �� � ���, � �
��� � � ���� �����(�� ��� �� ). � ��� �� �
���� � � ��� � ���� �����. ��� � ���� ��
� � ���� ���� ��� ��(���� ��)� ��� � ��� ��
����.
5. �� � � ��� � ��: � � 244 ���� �� ��� ���� 4
�� ����.
�� ��� ��
��� ��� ���� �� ��� �� �����.
�� ��� ��� �: ��� ��� ���� �� ��� ��� �����.
��� ��� ��� ���� �� ������. ��� ���� �� �� �
�� ��� �� ��� �� ��� �����. ��� ���� ��� ��� �
��� �� ��� �� �� ��� � �, ��� �� ��� ���� ���
���� � ��� �� � ���.
��� �� � �� ��
IBM Tivoli Enterprise Console �� 3.7� ���� �� � �� �� �� �
�� ! � � ���� ���.
v � �� �� �� ��� ��, � ��� ��� ��� �� ��� �� �
���� ��. �� ��, ��� �� �� ���.
– ��� ��� ��� �� ��� ��� �� �� ��. � �� ��� �
�� ��� � � ��� �� ���� �����.
– � ���� ����� � ��� ���� �� ��� ��� ��� ��
��� ��� �� ��� ��� ��� �� ��� ���� �
v ��� �� �� ���� �� � �� ��� �� �� ��. ���
��� �� � � � ���.
– ��� ��� �� ��� ������ �� ��� ����� �� �� �
����.
– ��� �� ��� � ��� �� ��� ���� ��� ��� ��� � �
� ����.
� ��� ! � �, �� �� ��� ���� �� ��� ���� ��
�� �������. ��� �� �� ��� ���� �� ��� ��� ���
�, ��� �� �� � �� �� ����. �� �� ���� ��
� ���� ���� ��� ��� �� ����. ��� �� �� �
�� ��� �� ����� ���, ��� �� ��� �� �� �(��� �
� ��� �)� �����.
� 5 � �� �� 245
�� �� �� � ��� �����.
1. � ��� �� ���� �� ��� �� ��� ������. � ��
TEC_Start ���� ��� ���� �� ��� �� ���� ��, �
�� �� �� �� �����.
2. ��� ��� �� ���� ���� ������ �� ��� ��� ��� �
� ��� ���� �� ������.
��� � � �
��� �� ��� �� � ��� ! � ���.
v ��� ��� ��� ��� ��� �� ���� create_event_sequence �
create_clearing_event �� ��� ��� ���� �� ����.
v � �� ���� ��� ��� ��� ���� �� �� �� � � ���
���� �����. �� ��, � ���� � Compaq Insight Managersms�
� �� ���� ��� �� � �� �����.
v �� �� ��� �� ��� �� ��� �����.
– ��� ���� �� ��� ���� ���� ��� ���� �����
�, ��� � �� � � ���.
– ��� ��� ���� 243 ���� ��� �� �� �� �� ��
�� ���� ��� ���� �� ��� � � ���.
v � �� TEC_Start ���� ��� ���� �� ��� �� ���� �
�� �� �� �� �����.
� �� ���� ��� �� ��� ���� �� �� � ��� 143 ���
� �create_event_sequence� � 137 ���� �create_clearing_event�� �����
�.
��� � �� ��
�� �� �� ��� �� �� �� ��� �����. � ��� �� ���
�� ���� �� ��� �� ���� �� �� �� ��� �� �� ��
� ���. � �� ��� �� � �� �� �� ���� ���� ��
�� ����.
���� �� � �� � �� �(�: first_causal_event �), ���� �
� ����� �� �� ��� �� �� �� ��� ����. �� ��
� ��� ��� �� �����. �� ��� ���, ��� ���� ��
�� ��� ���� �� ��� ��� ����. � ��� ���� ����
���� �� ����� �� �� ��� �� ��� ���� �� ���
� ��, ���� ���� ��� � �� ��� �� �� ���� ��
�� �� ��� � ���.
246 IBM Tivoli Enterprise Console: � �� ���
��� ���� �� ��� �� � �����. ��� ���� ��� �� �
� ���� ��(create_event_sequence �� ����), �� ���� �� �
� ��� ����� �� ��� ���� �� ��� �����.
��� ���� create_clearing_event �� ������(��� ���� ����
�� create_event_sequence �� ���� ��), ��� ���� �� ��� �
�� �� ��� ��� � ���. ��� ���� ��� ���� ���� �
�� ��� ��� �� any_clear_target �� all_clear_targets �� ����
����. ��� ������, ��� ���� �� ��� �� ���� ���
�� �� �� � ���. �� ���� ���� �� ���� �� � �� �
� ��� ���� ��� � �� ��� �� � ���. �� ���, ��
� ���� ��� ���� �� �� ��� �� ��� ��, �� ���
� �� �� ��� ��� �� ��� �� �� ��� ���.
�� ��� � �� ����� � ��� ��� ��� ���� �� ��� �
�� ���� �� �� �� any_clearing_event �� � ������, �
�� ���� �� ��� �� �� ��� �� �� ��� � ���. ��
� � � �� ���� ��� ���� �� �� �� ��� ��� ����
��� � ��� ���� �� � �� �� ��� ����. �� �� ��
� �, ��� � �� ���� �� �� �� �� �� ���. �� �
� �� � ���.
��� � �� ���� �� ��� ��
��� ���� ��� ���� �� ��� �� ��� �� ��� �� �
�� ��� ! � ���.
v ��� ��� ��� ��� ��� �� ���� create_event_sequence �
create_clearing_event �� ��� ��� ���� ����.
v ��� �� � �� �� ��� �����. ��� �� �����
�� �� ���� ���, �� ��� �� �� ���� ��� ��� � �
�� 2 (1 ��, 1 ��)� �����. ��� �� �� ��� �� �
� ���� ��� �� ��� ��� ���.
v � �� TEC_Start ���� ��� �� ���� ��� �� �� ��
�����.
�� ��� ��� ���� ����� �� ��� �� �� �� �� �
�� ���.
� ��
all_clear_targets ��� ��� ���� ��� ��� � �� ����
�����.
� 5 � �� �� 247
� ��
any_clear_target ��� ��� ���� ��� ��� � �� ��
�� �����.
any_clearing_event ���� ��� ��� � �� ���� �����.
first_causal_event � ���� ��� � � ���� �� ��� �
�� ����.
first_effect_event � ���� ��� � ���� �� ��� ���
����.
first_related_event �� ���� ��� ����� �� �� ���� ��
��� ��� ����.
is_clearing_event ��� ���� create_clearing_event ��
create_event_sequence �� ��� ���� �����
� ������.
� ��
� �� � ��� ��� ��� ��� � �� �� ��� �����. � ��
��� ��� �� �� �� �� ����� 88 ����� ���� � ��
�� �� � �� �� �� ������.
��� � � �
�� �� TEC_Start ���� �����. (� �� ���� �� ���.)
TEC_Start ���� ��� ��� �� � ����. � �� � �� � ��
� ��� �� �� ��� ���� � ��� �� ���� �����.
rule: ’create_event_sequences’: ( event: ev of_class ’TEC_Start’, reception_action: ’create_sequences’:( create_event_sequence( [’upsOnBattery’, ’lowBattery’, ’upsDischarged’, ’universal_host’], [’hostname’, [’status’,’outside’,[’CLOSED’]] [ clears(’powerRestored’,[ ], [’upsOnBattery’],[ ]), clears(’returnFromLowBattery’,[ ], [’lowBattery’],[ ]), clears(’dischargeCleared’,[ ],[’upsDischarged’],[ ]), clears(’universal_host’, [ [’severity’, equals,’HARMLESS’] ] [’universal_host’], [ ]), attr_condition(’universal_host’, [’severity’,equals,’FATAL’]), attr_exception(’hostname’,’universal_host’, ’probe_arg’) ]
248 IBM Tivoli Enterprise Console: � �� ���
), create_event_sequence( [’cpqTape3PhyDrvStatusChange’], [’hostname’, [’status’,’outside’,[’CLOSED’]]] [ attr_sequence( ’cpqTape3PhyDrvStatusChange’, ’cpqTapePhyDrvCondition’=[’Degraded’,’Failed’]), clears( ’cpqTape3PhyDrvStatusChange’, [ [’cpqTapePhyDrvCondition’,equals,’OK’] ], [’cpqTape3PhyDrvStatusChange’], [ ]) ] ),
create_clearing_event( ’CiscoLinkUp’, [ ], [’CiscoLinkDown’],[’origin’],no), create_clearing_event( ’cpqDa3PhyDrvStatusChange’, [ [’cpqDaPhyDrvStatus’,equals,’OK’] ], [’cpqDa3PhyDrvStatusChange’], [’hostname’, [’cpqDaPhyDrvStatus’,not_equals,’OK’] ], no), commit_set ) ).
��� �� �
� �� ��� �� 248 ���� ���� �� �� ����� �� ��� ��
���� ���, �� �� ����� ��� �� �� ���� �����.
process_problem_events �: process_problem_events �� �� ��� ��
�(��� ���� ��)� �����. � �� ��� ��� � ���� ���
�� �� �� ���� �����.(����� �� ������� ���� ��
��� �� ����� ��� � ���.) � ��� ��� ����.
1. check_for_clear ��� ���� ���� ��� ���� ��� � ���. �
�� ����� ����� �� �� �����. ��� ���� ���, ��
� �� �� ��� ��� ��� ��� ���� �� �����. ��� �
�� ��� ���� ���� �� ���� �� ����, �� ��
� �� ���� �� ����� ��� �� ���� ����� �����.
�: ��� ��� ��� �� ��� ��� ��� ��� ���� �� ��
� �� �� �� �� �� �� �����. ��� �� ���� �
��� � ��� ���� ��� ��� ����� �� ��� ��� �
� � � �� �� ���� � ��� ��� ���.
� 5 � �� �� 249
2. duplicate_detect ��� � �� �� ��� � ���� �� ��� ���
����. �� ���� repeat_count ��� ���� ���� �
��� ��� �����.
3. check_for_prior_cause ��� �� � �� ��� ��� ��� � � �
��� �� ��� ��� ����. ��� � ���� ��� �
��� ���� � ���� ��� ���� ��� ����, ��� ���
��� ���� ��� �����. � ��� �� ��� ��� ��� ���
� ��� ����� �� �����.
4. check_for_effect ��� �� � �� �� ��� �� � ���� ��
��� ��� ����.( �� � ���� ��� ��� ��� ��� �
��, ��� ��� ��� ����� ����� �� �� ���� ���
�.) � ���� ���� ��� � ����� ���� ����
��� ������ ���� ��� ��� ��� ����, ��� ����
�.
5. open_trouble_ticket ��� �� �� ���� ���� ��� � ����
�. � ��� ����, ���� ���� �� ��� �� �
���. ���, ��� ��� ���� ���� ����. � ���
� scripts/create_trouble_ticket.sh�� ��� ����� ����� �
� ��� ���.
��� � �� �� ��� � ����.
v check_for_prior_cause � check_for_effect ��� �� � � � ��
� ���� ��� ��� ���� � ����� �� ���� ���� �
� ���� ���� �� ���� ��� ��� ���� ��� ���� ��
�� �����. �, �� � ���� � ���� �����.
v �� � ���� � ��� ��� �� ���� ��� ��� ��� �
�� �� ��� �� �����. ��� � �� ��� ���� ���
�. ��� � �����.
rule: ’process_problem_events’:( event: _ev of_class ’EVENT’, reception_action: ’check_for_clear’:( ( is_clearing_event(_ev), commit_action ; ( any_clearing_event(_ev, _clr, 3600, 0), set_event_status(_ev, ’CLOSED’), change_event_administrator( _ev, ’Event Processing Rule’) ;
250 IBM Tivoli Enterprise Console: � �� ���
commit_set ) ) ), reception_action: ’duplicate_detect’( first_duplicate( _ev,event: _dup_ev where [ status: outside [’CLOSED’]], _ev -3600 -0), add_to_repeat_count(_dup_ev, 1), drop_received_event, commit_set ),
reception_action: ’check_for_prior_cause’:( prior_causal_event(_ev, _cause, 3600, 0), link_effect_to_cause(_ev, _cause), set_event_severity(_ev, ’ACK’), exec_program(_ev, ’scripts/update_trouble_ticket.sh’, ’%ld’, [_cause], no), commit_set ), reception_action: ’check_for_effect’:( first_effect_event(_ev, _effect, 3600, 0), link_effect_to_cause(_effect, _ev), set_event_severity(_effect, ’ACK’), exec_program(_ev, ’scripts/update_trouble_ticket.sh’, ’%ld’, [_effect], no), commit_set ), reception_action: ’open_trouble_ticket’:( exec_program(_ev, ’scripts/create_trouble_ticket.sh’, ’%ld’, [_ev], no), exec_program(_ev, ’scripts/notify_admin.sh’, ’admin_group’, [], no), commit_set ) ).
process_clearing_event �: process_clearing_event �� ��� �� ��� �
��� �����. � �� �� � �� �� ����� ��� � ����
process_problem_events �� �� ���.
���� ���� ��� ���(�, ��� ���) ��, process_problem_events
�� commit_set � ��� �� �� process_clearing_event �� ����
����.
���� ���� ��� �����, process_problem_events ��� check_for_clear
��� ��� �� �� �� ����� �� � �� ��� �����. �
��� ���� � �� �� �����.
� 5 � �� �� 251
� �� ��� ��� � ���� ����� �� �� ���� ����.(�
���� �� ������� ���� ����� �� ����� ��� � �
��.)
� ��� � ��� ���� �� � �� �� ��� ���� �� � �� �
� ��� ���� �� ��� ��� ����. ��� ���� ��� ����
CLOSED� ���� �� ��� �� ���� �� ���� �� ���� �
��� ��� ����.
rule: ’process_clearing_event’: ( event: _clr_ev of_class ’EVENT’, reception_action: ’clear_all_targets’( all_clear_targets(_clr_ev, _target, 3600, 0), set_event_status(_target, ’CLOSED’), change_event_administrator(_target, ’Clearing Event Rule’)), reception_action: ’exit’ ( commit_set ) ).
�� ��: �� ���� �� �� �� ���. � �� ��� �� ���
��� �� �� �� ����. � �� � �� ��� ���� �� �
��� �����.
process_clearing_event �� ��� ���� ��� �����. ��� ��
� ����� 251 ���� �process_clearing_event ��� �� ��� �����.
���� ��� ���� ���, � �� �����.
process_problem_events �� process_clearing_event �� ���� �� ���
�����. ��� ��� ���� ����� � ��� ���� � �� ��
�� ����� �� � ��� 249 ���� �process_problem_events ��� �
� ��� �����. �� first_causal_event � first_effect_event � ���
first_related_event �� �����. ��� ��� ��� �� � � �� �
����� � �����.
�: � �� ���� �� �����.
rule: ’process_clearing_event’: ( event: _clr_ev of_class ’EVENT’, reception_action: ’clear_all_targets’( is_clearing_event(_ev), ( all_clear_targets(_clr_ev, _target, 3600, 0), set_event_status(_target, ’CLOSED’), change_event_administrator(_target,
252 IBM Tivoli Enterprise Console: � �� ���
’Clearing Event Rule’) ; commit_set ) ) ). rule: ’process_problem_events’:( event: _ev of_class ’EVENT’, reception_action: ’duplicate_detect’( first_duplicate(_ev, event: _dup_ev where [status:outside [’CLOSED’]], _ev -3600 -0), add_to_repeat_count(_dup_ev, 1), drop_received_event, commit_set ),
reception_action: ’check_for_related’:( first_related_event(_ev, _related, _type, 3600, 0), ( _type == ’c’, set_event_status(_ev, ’ACK’), link_effect_to_cause(_ev, _related) ; set_event_status(_related, ’ACK’), link_effect_to_cause(_related, _ev) ), exec_program(_ev, ’scripts/update_trouble_ticket.sh’, ’%ld’, [_related], no), commit_set ), reception_action: ’open_trouble_ticket’:( exec_program(_ev, ’scripts/create_trouble_ticket.sh’, ’’, [], no), exec_program(_ev, ’scripts/notify_admin.sh’, ’admin_group’, [], no), commit_set ) ).
� 5 � �� �� 253
254 IBM Tivoli Enterprise Console: � �� ���
� 6 � � ���, �� � ����
IBM Tivoli Enterprise Console ��� �� ���, ��� � � ��� ��
��� �� �����.
v ������ ���� ���� �� ����� �� � ���
v �� ��� �� �� �� � � ���� �
� ���
��� ���� �� ��� � ���.
v wpostemsg, postemsg, wpostzmsg � postzmsg ��
v tec_agent_demo ���
v SendEvents ���
���� ��� ��
wpostemsg � postemsg ��� ���� �� ��� � ���. � ��� �
�� �� ��� ���� �����. wpostemsg ��� TME ������ �
��� ������� ��� ���� �� Tivoli Management Framework �
�� �����. postemsg ��� TME ������ ���� ������� �
�� ���� �� Tivoli Management Framework ��� ���� ����.
�� ��� �� �� ��� Tivoli Enterprise Console ���� ������.
tec_agent_demo ���� ��� ��
tec_agent_demo ���� ��� ��� �� ��� ��� ���� ����.
��� ��� ��� � � �� ���� ���. �� ���� ��� ��
�� ��� �� ���� ���� ������ � ���� �� ��� ��
�� ���. �� �� ��� ���� ����� �� ��� ���� ��
�� ���� �� �� �� ��� ����� �� � ���. �����
���� ��� � ��� ��� �� ����� ���� ���.
tec_agent_demo �� ��� � �� ���
tec_agent_demo ���� �� ���� �� �� ��� � �� �� ��
� ����. �� ��� ��� events_list� ���. �� ����� �� ��
� ��� �����.
© Copyright IBM Corp. 2003 255
TEC_Start NT_NAV_start NT_NAV_stop NT_Perf_Alert TEC_Stop
��� ���� ��� ����� �� ��� ��� �� ���. �� ��
� ��� ��� �� ��� �� �� ���� � � ���. �� �
��� ��, �� ��� � � ��� ��� ��(�: /test/TEC_Start)� �
�� ���.
256 ���� ����� NT_Perf_Alert ��� ��� ��� �����. �� �
�� ��� ��� ����� � � �� ��� ����� �� �� ���
� �� ���. ��� ��� ��� �����.
v ���� �� ��� � �� �� ��� �� � ���. ��� ���
���� � �� ��� ��� �� ��� ��� �����.
v ��� ��� ��� � �� �� ��� ���(;)���.
v �� � �� �� ����� ��� ��� ��� �� � ���.
v � � �� ��� �� ��(#) � ��� ��� � ���.
v ��� ��� ��� END ���� ���� ���.
NT_Performance_Alert; hostname=mfoster; origin=146.84.39.103; category=0; eventType=Information;sid=N/A;sub_source=PerfMon; id=2000; msg=’\\MFOSTER ; Object: Processor ; Counter: % Processor Time ; Instance: 0 ; Parent: ; Value: 13.586 ; Trigger: > 1.000’; date=’Apr 29 14:36:34 2000’; sub_origin=mfoster;computer=\\MFOSTER; END
��� ��� ���� � �� �� ��� 257 ���� ��� ��� ���
�� ��� �� ���� ������.
tec_agent_demo �� ��
���� ���� ��� ������.
1. bash �� UNIX �����, Tivoli ��� ��� �(�� ��, setup_env.sh
��� ��� �) �� ��� ������.
export TEC_BIN_DIR=$BINDIR/TME/TEC
2. �� ��� � � ���� ����� �� ��� ������.
$TEC_BIN_DIR/tec_agent_demo -data /control_file_dir
control_file_dir� �� ��� � ������. �� ��� ��� events_list
� ���. ���� �� � � � ���� �����.
256 IBM Tivoli Enterprise Console: � �� ���
3. � ���� ����� Enter� �����. ���� ��� �� ��� ���
�����. �� ��� � � �� ���� ���� �� ����� ���
� ����� Ctrl+c� �����.
SendEvents ���� ��� ��
SendEvents ���� �� ����� ��� �� ��� ��� ��� ��
�� ����. ���� �� ��� ���� �����. ��� ��� ���� �
� ��� � ���.
v x�� ��� ���� ����.
v �� ����� �� �� ���� ���� ����.
SendEvents ���� 258 ���� ��� ��� events_list � time_list ���
�� �� ��� ��� �����. ��� ��� ��� ����� ��
� ��� ����� ��� �� ���� ��� ������. �� ���� �
� ���� �� ���� ��� �� � ���.
SendEvents ���� ���� ��� ��� �� ����� ���� ���.
���� ����� ��� ������.
1. Tivoli ��� ������(�� ��, setup_env.sh ��� ������) �
����.
2. bash �� UNIX �����, �� ��� ������. �� � �� ��
�����.
$BINDIR/TME/TEC/contrib/SendEvents.pl \ -d directory -t time
-d directory
��� �(events_list �� � time_list ��)� � ���. � �
� �����.
-t time
���� ��� �� ��( �). � �� � ����. ��� ��
�� ���, ���� ����� �� �� ��� ���� ����
�.
�� �� ����� ��� �� �
tec_agent_demo �� SendEvents ���� � ���� �� �� ���� �
��� �� �� � ��� ���� �� ����. � ��� ��� �
���� �� ���� ���� �� �� � � ���.
�� ��� ����� ���� �� ���� ����� ��� ������.
� 6 � � ���, �� � ���� 257
1. Tivoli ��� ������(�� ��, setup_env.sh ��� ������) �
����.
2. bash �� UNIX �����, �� ��� ������. directory �� �
�� �(��� ��� ��), events_list �� � time_list ��� ���
� ���� �����.
wtdumprl | $BINDIR/TME/TEC/contrib/ParseEvents.pl \ -d directory
��� ��� �� ��� �� ��� ��� ����. � ��� ��, �
� � ��� -d /test3 �� � �������.
��� ��� ��� ��� ��� �� � ���. �� ��, event0001
��� event0001 �� ���. ��� ParseEvents.pl� �� ����
� ����, �� ��� ����� �����. �, event0001 ��� event0002
��� ����� ��� ��� ����.
� ���� ��� ��� ��� ���, tec_agent_demo ���� � �
��� �� ��� ���, �� � � � ���. �� SendEvents �
��� � ��� ��� � ��� �� � ���.
258 IBM Tivoli Enterprise Console: � �� ���
� ��
�� �����, wsetesvrcfg -t �� �� �� ���� �� ���� �� ��
��� ��� ���(�� ��� IBM Tivoli Enterprise Console �� � ��
� ��� ��).
�� ��, ��� �� � � � ���� �������. ��� wrb -comprules
-trace ����, � �� � ��� ��� �� ���� � ������� ��
� ��� ��� �� �� � ��� � �� � ���� ��� � ���.
���� ����, � ���� ������. �� �� ��� ����� ���
��� �� �� ����� ��, ��� �� ���� �� ��� � ���
� ��� �����.
�� ��� � �� ��� �� ��� ����. � �� ��� ��� �
��� �� ��� � ���. �� ��� �� � ��� ��� �� ��
�� �� ��� �����. � �� ��� /tmp/rules.trace���. tail -f ��
� ���� ��� � �� ��� �� � �����.
�: � ���� ���� ��� �� ���� �� �� �� ����� ��
� �� ��� ��� ���.
�� �
�� ��� ��� � ��� �� �����.
�� �
wrb -comprules -trace �� �� � ��� � ���� ��� � � �
� ��� � �� ��� �� ��� ��� � � ��� �� �� �
� �����.
� ��
�� ���� � ��� ���� �� � ��� �����. �� � �
� � �� � ��� ������.
� �� ���� �� ���� �� � ��� �����. �� ��� �� �
� ������.
� �� ��
� ��� �����, � ��� �� ���� ������. �� � �� � �
� � ��� ������. �� ����� � ��� ��� �� ��� ��
�� �����.
directive: trace % Start trace. rule: rule1: ( ... ). % End rule1.
� 6 � � ���, �� � ���� 259
rule: rule2: ( ... ). % End rule2. rule: rule3: ( ... ). % End rule3. % End rule set. % End trace.
� ��
�� �� �����, �� �� ���� ������. �� ��� �� �� ��
����. �� ����� �� �� ��� �� ��� �� �� �����.
rule: test_rule: ( directive: trace, event: _evt of_class within [ ’NT_NAV’ ] where [ ], reception_action: action0:( drop_received_event ) ).
�� �
��� �� �� ��� �� ��� �����.
� �� ���� � �. ���� ���� ��� ��� �� �
� �����.
�� �
��� ��� �� ��� ���� � �
�� � ��� ���� � �
� �� �
� �� �� ���� � �, �� �� �
Prolog �
� �� ��� Prolog� ��� �� ���� � �. Prolog � ��
� � � ��� �����. �(nest) Prolog �� ���� ���
�(� �� �����, � ��� �� �� set_detailed_debugging
(on) ���� ����.)
� �� ��
�� �� � ���� �� �����. ��� �� ��� �� my_first_set �
��� ���� ������.
rule: my_first_rule: ( description: ’Simplerule’,
260 IBM Tivoli Enterprise Console: � �� ���
event: _ev of_class ’HIGH_CPU_USAGE’ where [usage: _usage, hostname: equals ’my_server’], action: auto_ack: ( set_event_status(_ev, ’ACK’), set_event_administrator(_ev, ’john’) ), action: page_administrator: ( exec_program(_ev, send_cpu_usage_to_pager, ’john my_server %d’, _usage], ’NO’ ) ) ).
� ��� �� ��
�� �� �� my_first_set � ��� ������ �����.
[117]=> rule set my_first_set
�: ��� �� �� ��� �� � �� � ��� �����.
�� �� �� � my_first_rule� ������ �����.
[118] -> rule my_first_rule event : 0x2c0b88 of_class HIGH_CPU_USAGE
�: ���� ���� �� ���� �� ��� ��� ���� ��� ��
�.
�� �� �� � ��� ��� �� ��� � �� �����. �� �� �
� ���� �� ��� �� �����.
[119] call condition [120] call usage: _125 [121] exit usage: 95 [122] call hostname: _126 [123] exit hostname: my_server [124] call hostname: my_server equals my_server [125] exit hostname: my_server equals my_server [126] exit condition
120 - 123�� ��(usage � hostname)� �� � �� ���� ��, 124
� 125�� hostname� �� �� �� �� � ���� �(my_server)� ��
� �� �����.
��� ��� ��� ��� �� ��� �� �����. �� ��� ��� ��
�(_)� ����. ��� �� ��� ��� ���� ���, �� �� � �
�� �����.
� 6 � � ���, �� � ���� 261
�� �� �� HIGH_CPU_USAGE ���� my_server� �� �� ��� ��
�(another_host)� ������ �����. � ���� ��� ��� ��� ��
��� ���� ����.
[119] call condition [120] call usage: _125 [121] exit usage: 95 [122] call hostname: _126 [123] exit hostname: another_host [124] call hostname: another_host equals my_server [125] fail hostname: another_host equals my_server [126] fail condition
��� � �, � ��� �� �� ���� ���� ��, ��� � ��� �
� �� ��� � �� �� ��� ����.
�: � ��� ��� ����� �����. ��� �� � � �� �
� ����, �� �� ��� �� ��� � �� � �� �� ��
� �����.
� �� ��
��� ���� ��� ��� ��� �� ��� ����, � ��� ���� �
����. ��� �� �� ���� �����.
v ��� ���� � � ��� �����.
v � �� �� ��� ��� ���� � � ��� �����.
��� ��(auto_ack � page_administrator)� �� �� �� ��� ���
��. auto_ack ��� �(set_event_status � set_event_administrator)�
���. page_administrator ��� exec_program �� ���.
[127] call action auto_ack [128] call set_event_status(0x2c0b88, ACK) [129] exit set_event_status(0x2c0b88, ACK) [130] call set_event_administrator(0x2c0b88, john) [131] exit set_event_administrator(0x2c0b88, john) [132] exit action auto_ack [133] call action page_administrator [134] call exec_program(0x2c0b88, send_cpu_usage_to_pager, ’john my_server %d’,[95],NO) [135] exit exec_program(0x2c0b88, send_cpu_usage_to_pager, ’john my_server %d’,[95],NO) [136] exit action page_administrator
�: ��� � ����� send_cpu_usage_to_pager ���� �� ��� ��
��� �� ��� �� ����. � ����� exec_program� ��, �
�� �� ���� ��� �� ��� �� ���� ���� ���
� �� � ���.
262 IBM Tivoli Enterprise Console: � �� ���
��� ��� �� ��, ��� ��� ��� ��� �� ��� ����� ��
���. ��� � �� �� ��� �� �� �� �����. (_126 ��
my_server �� ��� �� � 134� ����.)
��� �� �� �� �� ����, ��� �� �� ��� ���� ��
� �� �� �� ���� �� ��� ���� ����. �� �� ��� �
� � ��, �� �� �� ��� ���� � ����.
�� � �� ��� �� ��
���� �� � �� �� �� �� ��� ��� ��� ��� ��
�� �� ��� ��� ����, �� ��� �� ����. ����
�� ��� �� �� ���, ���� �� � �� ��� ����.
��� ����, �� ��� ��� ����� ���� ���, �� �� �
�� �� �� ��� �� ���� ���� ����, �� � �� ��
��� �����.
�� ��� ���� ��� �� � �����.
action: ( all_instances(event: _nfs_ev of_class ’NFS_SERVER_NOT_RESPONDING’ where [server: equals ’Pascal’]), set_event_status (nfs_ev, ’CLOSED’) )
Pascal ��� �� �� NFS_SERVER_NOT_RESPONDING ���� ���
� ��� ��� �� ������.
139 - 144 �� all_instances �� �� ��� �� ���� �� �� ��
� ���.
[139] call reception_action action_1 [140] call all_instances(event : _366 of_class NFS_SERVER_NOT_RESPONDING where [server:equals Pascal],0x2c0b88-600-600) [141] exit all_instances(event : 0x2c0ae0 of_class NFS_SERVER_NOT_RESPONDING where [server:equals Pascal],0x2c0b88-600-600) [142] call set_event_status(0x2c0ae0, CLOSED) [143] exit set_event_status(0x2c0ae0, CLOSED) [144] exit reception_action action_1
145 - 150�� all_instances �� �� ��� �� ���� �� �� ���
���.
[145] redo reception_action action_1 [146] redo all_instances [147] exit all_instances(event : 0x2eabf0 of_class NFS_SERVER_NOT_RESPONDING where [server:equals \
� 6 � � ���, �� � ���� 263
Pascal],0x2c0b88-600-600) [148] call set_event_status(0x2c0ae0, CLOSED) [149] exit set_event_status(0x2cae0, CLOSED) [150] exit reception_action action_1
151 - 154 �� all_instances �� �� � �� �� ���� ���� �� �
��� �� ��� ���.
[151] redo reception_action action_1 [152] redo all_instances [153] fail all_instances(event : _366 of_class NFS_SERVER_NOT_RESPONDING where [server:equals Pascal],0x2c0b88-600-600) [154] fail reception_action action_1
� �����
������ � �� ��� �� ���� ����. �� � ���, � ��
�� �� �� ����� � ���. ���� ����� ��� �� �
� �� ��� ���.
v �� ��� ��� ���� ���� � �� ��� ��� �( �)
v �� �� ��� ��� �
v ��� �� ��� �� ���� ��� ��� �( �)
v � ��� �� � �� �� �� ���� ���
�: � ���� �� �� ��� �� ���� �� �� �� ����� �
���� �� ��� ���� ���.
�� ����� ��� �� ������ ���� ���� ��� �����.
============================================ Timing Summary -------------------------------------------- test_rls: Time for last Event: 7.000000000000001e-02 Event Count: 2 Total Time: 4.799999999999998e-01 Events per second: 4.166666666666669e+00 -------------------------------------------- -------------------------------------------- ============================================
�� ��������, � ���� ����� �� ��� ���� ���.
��� wrb -comprules -profile ���� ����� �� � �� �� �� �
�� ���� ����� ��� � ���.
� ���� ����� �� ��� ����� �� ��� ��� ���� �
���� ������ ������. ���� ���� ��� ��� �� �
$DBDIR/tec/profile ��� �����. ���� ���� �� �� ��� ��
264 IBM Tivoli Enterprise Console: � �� ���
�� ��� ��� ��� ���� �� � �� ��� ���� ���, ��
� �� � ���, ����� ��� � ����.
��� �
�� ��� ��� � ����� �� �����.
�� �
wrb -comprules -profile ��� �� ����� �� ��� �� � �
�� �� �� �� ��������.
� ��
�� � ��� � ��� ���� ���� � ��� ���� �� �
��� ��������.
� �� ��� �� ��� ���� ���� �� ���� �� �� ���
�����.
� �� ����
�� � ��� ��������, � ���� �� � ��� ���� ����
��. �� ����� � ���� ������ �� ��� �� �� ����
�.
directive: profile % Start profiling. rule: rule1: ( ... ). % End rule1. rule: rule2: ( ... ). % End rule2. rule: rule3: ( ... ). % End rule3. % End rule set. % End profiling.
� ����
�� �� ��������, �� ��� �� ��� ���� ���� �� ���
���. �� �� ������ ����, profile_off ���� �� ��� ���
���. �� ����� �� �� �� ������ �� ��� �� �� �
����.
rule: test_rule: ( directive: profile, event: _evt of_class within [ ’NT_NAV’ ] where [ ],
� 6 � � ���, �� � ���� 265
reception_action: action0:( drop_received_event ) ).
��� �� �� ��
�� �� �� �� ��� �� � �� ���� ���, ��� ����
��� �� �� �� � ���. � ����� ���� ��� ���� �
� �� �� ���. �� �� ���� ����� ���� �� ��
�� ��� �� �� ���.
��� ���� ��� ���� QUEUED ��� �� ��� �����. ���
���� ��� ����, �� ��� ��� ��� PROCESSED� �����. �
�� �� ���� ����� �� ����� .tec_config �� ��� ���
���.
tec_benchmark_report_period=report_period tec_benchmark_sample_period=sample_period
��� report_period� ���� ��� �� ���� ����, sample_period
� ��� �� � ���� ���� �� �� ���� �����. ��� ���
�� ��� �, ��� ��� �� �� �������.
��� ���� ��� �� ��� ���� ��, tec_reception �� ���
�� ����. �� ����� ��� �(�� �� ��)� �����.
=================================================== Event Throughput Statistics =================================================== Reporting Interval is 2 seconds Sample Interval is 60 seconds Actual Period 8 seconds Events Received: 592 Event Arrival Rate: 74.000000 events/second Events Processed: 700 Event Processing Rate: 87.500000 events/second ------------------------------------------------ Total Events Waiting: 0 Total Events Received: 6604 Total Events Processed: 5666 Processing Backlog: 938
266 IBM Tivoli Enterprise Console: � �� ���
�� ��� �����. �� ���� �� ��� �����.
v �� ��� ��� �� � �� ��
v �� �� �� � �� ��
v ��� ��� � � ���
v ��� ��� � � ���(���� � ��� �� ���)
�� ���� ��, �� � �� ���� �� � �� ���� �
� ��� ��� �� ��� ��� �� �� �����(��� ���� ���
���� ���� ��).
� 6 � � ���, �� � ���� 267
268 IBM Tivoli Enterprise Console: � �� ���
� 7 � ��� � ��� � �
IBM Tivoli Enterprise Console �� � �� �� Prolog �� �� ����
�����. IBM Tivoli Enterprise Console � ��� � ��, Prolog �� � �
�� �� ��� �� ����� ��� ���� �� �� � �� �
� GUI �����.
�:
1. � ��� � ��� ��� � ��� �� �� � � ��, �� � �����
�� �� ���� ����.
2. wrb -crtrb ���� ��� � ���� � � ����� � � ��� �
�� ��� EventServer���. � ��� ���� � ���� ��� � ��
� � ��� � ��� ���� ��� �� wrb -imptgtrule ��� ����
EventServer � ��� �� �� � ��� ���� ���� ���.
3. � ��� ��� ���� ��� � �� ��� ���� � ��� � ���
�.
4. � ��� ��� � �� ��� ��� ����� � ���.
5. upgrade_gui.sh ��� ���� �� 3.6.2 �� ��� � ��� ��� ��
�� 3.7 �� ��� � ����� �� ���� � ���� �� � ��
�. ��� �� � ��� ����� �� � �� �� ��� �� � �
��� ���. � ���� �� �����, �� � �� � ��� �� �
��, ��� ���� ��� ���. upgrade_gui.sh ��� �� �� �
�� IBM Tivoli Enterprise Console �� � ��� ���� ������.
� �� ��
� ��� � � �� �� Prolog� �� ��� ���� ����. � ��� �
��� ���� �� �� �� � �� � � ��� �� ��� ����
��� ���� ��� �� �����. � �� GUI� ���� ��� ��
�� ��� �� �� � ���. �� ��, � ��� �� � ��� �
����. � �� �� �� � �� �� Prolog ��� ���� ����.
� ��� ���� ��� �� ���� �� ��� ���� ���� ��
���. �� ��, ���� ��� � 60 �� �� ��� ��� �� �
���. � ��� ����, � �� ��� ���� � ��� ����, �
� � ��� �� ��� �� � ���.
© Copyright IBM Corp. 2003 269
��� ��� ��� � �� ����
GUI � ��� UTF-8 ���� ��� ���� ���, � ����� UTF-8 �
��� ���� ���� ����. �� �� ���� �� � ��� �� �
�� �� ��, �� ��� �� �� ���� � ��� �� � ��
�. �� ��, � ���� ����� �� so-v ���� � �� ��� UTF-8 �
��� ������. wiconv ��� �� �� ��� Tivoli Management Framework
���� ������. � � BAROC �� ����� ��� UTF-8 ���� �
� ��� 37 ���� ��� ��� � ��� � 52 ���� ��� ���
BAROC ���� ������.
� �� ��
� ���� ���� � ��� ���� �� � ���� � � ��� ����
�, �� ��� ��� ����� ������. ��� ��"� �� ��� ��
���� ���� �����.
270 IBM Tivoli Enterprise Console: � �� ���
�� ��� �� �
1 272 ���� �� �� ���
2 27 ���� �� � ��� ���
3 273 ���� ��� � ��� ���
4 273 ���� �� � �� ���
5 291 ���� �� �� ���
6 275 ���� �� �� ���
7 275 ���� �� � ���
8
9
A
B
� 7 � ��� � ��� � �� 271
�� ��� �� �
C 285 ���� ��� � ���
D
E
F
G 275 ���� �� � ���, 285 ���� ��� � ���
H 291 ���� �� �� ���
I 292 ���� �� ��� ����
J 294 ���� ���� �� � � ����
� ��� �� �� ���� � ���� ��� �� � ���� ��� ��� �
� ���� �� ��� � ���� ����� ���.
� ���� BAROC �� ��� ��� ��� ��, � ���� ����� �
�� �� ��� ��� ��� ����� �� ���.
�: � ��� �� ��� ���, �� � �� �� ��� �� ��� ��
�� �����. � ��� ���, �� � �� �� ��� �� ��� �
�� �� �����. Tivoli ����� ���� �� �� ����� Tivoli
Management Framework �� ���� ������.
�� ��� � �� ��� ��� ��� � �� �� �� � �� ���.
�� ���� Tivoli ��
� �� �� ��� �� senior
� �� �
� ��� ����� Tivoli ����� ��� �� ����� ��� ��� �
� �����. � ��� ������� �� � ����. ��� �� ����
�� ��� �����.
� ��� �����, ��� �� � ���� � ���� � �� �� ���
���. � ���� ��� � ���(���� ���)� ��� � ���� �
� ������. � � ���� �� � ����. ��� � ���� ���
��� � ������. ��� � ���� �� ��� ��� � ����� �
����.
272 IBM Tivoli Enterprise Console: � �� ���
�� � ��� ��
�� � ���� �����, �� � ���� � ���� � ��� � ��
��. �� �� �����.
� � ���� �� ���� � ��� ��� ���� �����. � ��� �
��� ������, �� �� ��� �� ����. �� � � �� ��� �
��� ��� � ���.
� � �� �
� � ��� ����� �� ��� ������. � ��� �� �� ��� 17
���� �� �� � � ��� ������.
� 7 � ��� � ��� � �� 273
1. T/EC � ��� ��� � �� -> � � ��� � �� new_set�� � � �
� ��� T/EC � ��� �� ������.
2. �� ��� � ��� ��� ���� new_set� �������.
3. � � ��� ��� ���� Enter� �����.
new_set ��� � � �� ���� ���� ��� � �� ��� ��� �
� �� ����.
�: �� � ��� � ��� ��� ����� ����� ��� ����� �
�� ��� ��� ���.
274 IBM Tivoli Enterprise Console: � �� ���
� �� ��
�� �� �� � �� ��� � �� ���� �� � �� ���� �� �
� ���� �� � ��� �� � ���.
� ��� �����, TEC � ��� ��� � �� -> � �� ��� � ��
� �� �� ������. �� �� �� � �����.
� � �
� �� �� ���� ����� � ���� ��� ����, ��� ����
�� ���� ��� ��� �� �� ����.
� �� � ��� ��� ���� �����. ���, ��� �� ���
�� � ��� ���� � ���. �� ��, �� ���� login ��
su �� ��� ���� �� ���� �� ����� � ���.
Logfile_Login � �����, Logfile_Su � �����, ��� Logfile_Passwd�
�� �� ��� ���� ���. �� ��� ������ ���, �
��� �� ��� ��� � �� �� ���� �� ���� ���. ��
�� �� �� ���(��� ��� Logfile_Login � Logfile_Su �� ����
�� ��)� �� ���� ��� fire_on_non_leaf ���� �� � �
��(�� ��� 80 ���� �fire_on_non_leaf�� ������).
�: � �� ��� ��� � ��(� �� ��)� ���� �� ��� �
����.
� �� �� ��� ����.
v ��
v ��� ���
v ��
v ��
� 7 � ��� � ��� � �� 275
� �� ����� �� ��� ������.
1. � �� ��� � -> � � -> ��� � �� � �: New Simple Rule �
� ������.
2. �� ��� ��� �� �� ��� ��� �� ������. � ��� �
� �� ��� �� ���� � �����.
3. ��� ���� ����� �� ��� ������. ��� ���� 41 ��
�� � 2 � ���� ��� ��� ���� ���.
a. � � ��� ��� ���� � ��� � �� ������.
276 IBM Tivoli Enterprise Console: � �� ���
b. �� ��� ���� ���� � ����.
v �� �� ��� ��� ���� ��� ��� ���� � �� �
� ��� �� � � � ��� ���� � � ��� ��� ��
�� �����.
v ��� ��� � ��� ���, �� � �� ��� � ��
� �� �� �� ��� ��� �����.
�� ��, ����� �������, su ��� ��� �� ���� �
� �� ���� �� ������. � su� ����, su�
�� �� ���� � ���. ���� Logfile_Su, Root_Login_Success,
Su_Success, Root_Login_Success_From � Su_Failure� ���. �
� ��� ���� ���� ����.
c. ��� ���� � � ��� ��� ���� �� �� ��� ���
���� �����, ��� ���� � �� ��� ��� �� ��
���.
d. ��� � ����� ����� ��� � � �� ������. ��
� ��� �� ��� �����.
�� �� � �� ��� �����.
� 7 � ��� � ��� � �� 277
4. ��� ����� �� ��� ������. �� ��� 73 ���� ��� �
��� ���� ���.
��� ����, ��� ��� ���� �� �� ��� �� �� ����
� �� �� �� ���� ��� �� � ���.
�� ��, Host_Down ��� ���� ���� hostname ��� �� ��
� �� ��� ��� ��� ��� � Host_Down ���� ��� �
�� ��� ����.
��� ��� ��� � ���� �� BAROC ��� ���.
a. �� ��� ���� ��� ��� ����� �� � �� �� �
� ������.
b. �� �� �� ��� ���� ���� �� ��� � ����.
c. �� ���� �� �� ��� � ����.
in list �� ��� �� ���� ���.
none �� ����.
not in list
��� �� ���� �� ���.
d. � �� ��� ��� �� ������. �� �� � ��� ���� �
���� ��� �� �� Enter �� �����. not in list� �� in
list ��� ���� �� ��� �� ��� � ���.
e. ��� ��, �� � �� ��� �� ��� �� ��� �����. ��
� �� �� ��� �����. �� ��� � �� ���� ��� ��
��� ���� �� ����.
278 IBM Tivoli Enterprise Console: � �� ���
f. ��� �����, �� �� �� ���� �� ��� � �� ���
�����. � � ��� �� �� ���� ����.
g. �� ��� �� �� ������, �� �� �� ��� ���� ��
��� � ����. �� �� �����. ����� �� �� ���
����.
h. �� ��� ��� ��� ��, ��� � ��� � � �� ����
��. �� �� � �� ��� �����.
5. ��� ������. ��� ���� � ��� �� � ���� ��� ��
� �����. ��� ����� �� ��� ������.
a. � � ��� ��� � � �� ��� ������.
� 7 � ��� � ��� � �� 279
� ��� �� ��� �� ��� ����.
� �� ��
�� �� ��� �� ���� �����.
�� ��� �� ��� �� � ��� ��� �����.
�: ��� ���� �� �� ��� ��� ��� ���.
b. ��� ��� ��� � � ���� �� ���� �� �� ���
���. �� ��� �����, � ��� � �� �� ��� ����
���� �� � ����. � ��� ��� ����.
�� �� ��
���� ��� � ���� � ���� ��� �
���� ��� � ���� ��� � N
���� �� � �� �� ����� �� ��� � ��� Change_Severity ���� ����
���� ��� ��� ��� �
���� �� � �� �� ����� �� ��� � ��� Change_Severity ���� ����
���� ��� ��� ��� �
���� ���� � �� �� ����� �� ��� � ��� ���� ���� �
���� ���� � ���� ���� � N
���� �� ��� � �� �� ����� �� ��� � ��� ���� �� ��� �
�� ��� �� � ��� ��� �� ��� ���� � �
c. �� ��� ����, � �� ��� �� �� ��� �����. � ��
��� � �� � � �� ��� ����.
280 IBM Tivoli Enterprise Console: � �� ���
d. �� ��� ���� �� ��� �� �� ������. � �� ���
��� �����. �� ��, ���� �� � �� ����� ���
��, �� ��� ���� ��� �� ��� �� �� ��� ���
� �� � � ���.
��� ����, �� �� ���� ��� �� � �� ��� ���
��. � ��� ��� �� ��� ����.
e. � ��� �� �� ���� �� ��� � ����. � ��� ��
�� ���� ���.
�� ��
��� �� ��� ��� �� � �� �����. ���� � � ��, ��, ��, ��, �� � ���� � �
���.
�� �� �� ��� �� � �� �����. ��� OPEN, RESPONSE, ACK � CLOSED� � � �
��.
��� �� ����� msg ��� �� �� ���� �� ��� ��� �����. �� �� ���� ��
��� ��� �� � ���.
��� �� ���� �� ��� ��� ����. � ���� TEC_RULES ������ � tec_forward.conf
��� ServerLocation ��� ���� � ���. tec_forward.conf ��� �� �� ��� 177
���� �forward_event�� �� ��� ������.
� ��� � �� �� CLOSED� �� �� ��� �� ��� ��� � ���� �� � ���. ��,
�� � ���� repeat_count ��� �� ���� �� ��� ���� �����.
� 7 � ��� � ��� � �� 281
�� ��
��� �� ��� ��� ������� ��� ���� ����� ���. � ��� � �� �� ��� �
�� ��� � �� �����.
��� � ��� ����� ��� ��� ��� ����� ��� � �, �� ��� �
����� � ����. �� ��, ��� ���� �� ���� ����� ��� �� ��
���. ��� � ��� �� ��� �����.
� ���, ���� ��� ��� �� ���� �����.
� ��� ����� ��� ������ �� ��� ���� �����.
282 IBM Tivoli Enterprise Console: � �� ���
�� ��
�� �� �� �� �� ����� ����� ���. � ��� � �� �� ��� ��� ���
� �� �����.
��� � ���, ��� ��� �� ��� ���� �� ����� ���� ��� �� �
� �� �� ��� ������. � � ��� $BINDIR/TME/TEC���. ��� ��� ���
�� ���� �����.
f. � ��� ����, � ��� ��� �� �� ��� �����. ��
�� ��� ���� � �� ��� � ����. ��� � � �
���. �� � ��� ��� ���� �� ��� �����.
� 7 � ��� � ��� � �� 283
g. �� �� ���� ����� ���� �� � ��� � � �� �
� ������.
h. �� � ��� ��� �� � � ������. ��� � �
(�: msg � �� �� �� �)� � ����� ���� ��� ���
�� ������. �� � ��� ��� ���� ����, � ���
��� � � ��� � ����� �����. ���� �� ��� �
���� wruntask ��� �� �� ����. ��� � ��� � �
�� ��� ��� �� ���� �����. wruntask ��� ��
�� ��� Tivoli Management Framework ���� ������.
�: ���� ����� � �� �� ��� �� � � � �� ��
� �� � � ���� ���(�, �� � ��� ��� ���
� �), � � -h event_server_hostname -l TaskLibraryName�
�����. �� � � ���� ���� ��, �� �� ���
�� ��� ���.
284 IBM Tivoli Enterprise Console: � �� ���
i. ��� �� �� �� � ��� ��� �� ��� �����. �� ��
�� ����� � � �� �����.
j. ��� � � �� �� ���� � � �� �����.
�� � �
�� �� ���� �� ��� ��� �� � ��� �� � ���.
�� �� ��� ��� ���� �� ���� �����. �� ���� �
� � ��(� ���� � �� ���� ��� �� ���� �)� ��
� ��� �� ���� ���. �� ��, Host_Down ���� NFS �� ��
� �� ���, NFS_Server_No_Response ���� ��� ������ ��
��� ���. � ��� ����, � �� � ���� ���� �� �
� � ���.
�: � �� ��� ��� � ��(� �� ��)� ���� �� ��� �
����.
�� � �� �� � �� ���� ���.
� 7 � ��� � ��� � �� 285
v ��
v ��� ���
v ��
�� �� ����� �� ��� ������.
1. � �� ���� � -> � � -> �� � �� �� �: New Compund Rule
�� ������.
�� ��� ��� �� �� �� ��� ������. � ��� �� ��
��� �� ���� � �����.
2. ��� ���� ����� �� ��� ������. ��� ���� 41 ��
�� � 2 � ���� ��� ��� ���� ���.
286 IBM Tivoli Enterprise Console: � �� ���
a. ��� ���� � ��� � �� ���� ���� ���� ���
� � ����. � ���, � ���� �� ��� ���� �� �
�� ���� � � ��� ��� ��� ���.
b. � � ��� ��� ��� ���� �� ��� ���� � ��, ��
�� �� ���� � �� ��� ��� �� � �� �� ���
���� ������. �� ���� ��� ��� �����.
c. � �� �� �� ��� ���� � ���, �� �� ��� ��
� ���� � ����. �� ��� �� � � � ��� ��� �
��� ������.
d. ��� � ����� ����� �� � �� ������. � ��� �
��� ��� ���� � � ��� ���� �����. �� �
� � �� ��� �����.
3. ��� ��� �� ��� ���� ��� ������.
�� ��� ���� ���� �� �� ��� ��� ��� ����.
� ���� �� � �� � ���� �� � ��� is-caused-by ��
� 7 � ��� � ��� � �� 287
is-canceled-by �� �� ��� ������. � ���� �� � ��
� ���� �� � ���, causes �� cancels ��� ������.
� ��� ���� ����� ��� �� ��� ��� ��� ���� �
� ��� �����. �� ��, NFS_No_Response ����
Host_Unreachable ���� �� ����. � Host_Unreachable ����
Host_Up ���� �� �� �����. Host_Up ���� ��� �,
NFS_No_Response ��� Host_Unreachable ��� ���� �� CLOSED
� �����. � ��� ���� �� �� ����� �� ��� ����
�, ���� ��� ����� �� ��� ���� ���� ��� ����
��.
���� �� �� ��� �����, �� ���� cancels(�� is canceled
by) ��� ��� �� � ���. ��� � ���� ���� ��� �
����.
a. ��� ����� ��� � �� �� �� ������.
b. Correlation Type ���� �� �� ��� � ����.
�� ��
causes ��� ���� � ���� ��� � ���� �����. � ���(�� ����
Host_Unreachable ���)���� �� �(date_reception � event_handle)� � ���(���
� NFS_No_Response)� cause_date_reception � cause_event_handle ��� �����. � � �
�(� ��� �� � ���)� ��� ��� ���, �� ��� �����.
288 IBM Tivoli Enterprise Console: � �� ���
�� ��
is caused by ��� ��� � ���� ���� � ���� �����. � ������� �� �
(date_reception � event_handle)� � ���� cause_date_reception � cause_event_handle ��
� �����. � ���� ��� � ���� ��� �����. � ���� ��� �� �
� ����� �� � ���� ��� ����.
cancels ��� � ���� ��� ���� � ���� �������.
is canceled by ���� � ���� ��� ��� � ���� �������.
c. 5� � �� �� �����. � �� �����, � �� � �� �
�� ��� � Enter �� �����. ��� �� �� �� ��� ��
�� ���� ��� ���� �� ��� ������.
�: �� �� ���� ��� ��� �� ���� � � � ��
��� ���� �, �� �� �� �� ��� �� ���.
�� ��, �� ��� ��� �� �� Host_Unreachable ����
�� ��� �� Host_Up ���� �� ������. Host_Up �
��� �� ���� � � ��� �� ��� ���� �� �
� ���� �� �� �� � ���.
d. �� �� �� �� �� ������. �� �� ���
��� ���� ��� ���� ��� ��� �� �� �����
� �� �����.
e. ��� � ��� ������ �� ���� �� �� ��� � �
� ��� �� �� ��� ������. ���� �� ��� ���� �
� ��� � �� � �����.
f. ���� � ��� ������ �� ���� �� �� ��� �
�� ��� �� �� ��� ������. ���� �� ��� ����
�� ��� � �� � �����.
� 7 � ��� � ��� � �� 289
g. ��� � ����� ���� �� �� ���� �� ��� �� �
�����.
h. ��� ��� � �� e, f � g�� ������.
i. ��� � ����� ���� ��� �� � �� ������. ��
�� � �� ��� �����.
j. ��� � ����� ���� � �� ��� ������. � �� ��
� �����.
290 IBM Tivoli Enterprise Console: � �� ���
� �� ��
� ��� ����� �� ��� ������.
1. � �� ��� � �� -> ��� � �� � ���� �� TEC � ��� �
� ������.
2. � ��� -> ��� � �� � �� ��� ������. � ���� ��
�, � ��� ���� ��� �� ����.
3. � ��� -> ��� � �� � �� ������.
4. �� � � ��� ���� ��� �� � ��� ��� ������.
� 7 � ��� � ��� � �� 291
� ��� ���
� ��� ���� � ���� ��� ��, � �� ��� ��� ��� �
� ��� � ���� ����� ���. � ���� ������ �� ��� �
�����.
1. ��� �� � ��� ���, ��� � ��� � ���� ���� � �
� � ��� ��� �� ������.
� �� ��� � �� ��� �����. �� ��� 259 ���� �� ���
� ������.
292 IBM Tivoli Enterprise Console: � �� ���
2. ���� �����. ��� ��� �� �����.
3. ��� � ��� �� � ��� �� ������.
� 7 � ��� � ��� � �� 293
4. ��� � ���� ��� ��� ����� ���, �� � ��� � ��
�� ��� � �� � ��� �� �� ������.
5. � ��� �� � ���� � ����.
6. �� � ��� �����.
��� �� � � ��
� ���� ����� ��� �� � ����� BAROC ��� ����� ��
� ��� ���� ����� �� ���. ��� ��� ���� �� ��,
�� ��� ������.
1. Tivoli ����� ��� �� ��� � ���� ��� � ����.
2. ��� ��� ������ � ���� �� � Tivoli ����� ��� �
� ��� � ���� ��� � ����.
294 IBM Tivoli Enterprise Console: � �� ���
� �� �
� �� policy�� �� ���� �� � ��� �� �� ���� � �� �
� �����.
��� � policy �
���
��� ���� ��� ���� SAP R/3 ��� �� ��� ��� ��
�� 15 ��, ��� ���� � �� �� ��� �� ��� ���. ��
��� ���� ���, ��� ���� �� �� 2 ��� ��� ���. ��
� � �� ���� ������� ��� �� ��� �� � � �
�� ���� ���. ��� R/3 ���� ���� ����� � Tivoli AMS
Module for R/3� ���� ���.
�� � � policy�� ��� ����.
���� R/3 ������ ���� �� ���� ��
(SAP instance=PRD), �� ���� 15 ��� ���� ���
�� 2� ����, �� ���� � �� �� ���� ���
�� 2� �����.
��
��� � �: ���� �� ��� �� �� �� ���. ��� �� �
� ���� ��� �� ���� �� ���� �����. (�� ��, ���� �
�� ��� IP ��� $origin, ���� ��� $hostname ��� �����.) IBM
Tivoli Enterprise Console �� � ��� ������ IBM�� ���� ����
���� �� � � �� ��� �� �����.
�� �� ��� ���� ���� ����� ����� ��� � � �� �
� �� �� � ���, �� �� �� ��� �����. ��� �� ��
���.
$EVENT_CLASS
��� ���� �����.
$SLOTS
��� �� ��� ��
���� ��� ��� ��� � �� � ���� ���� ��, ��� ��
� �� �����.
$EVENT_CLASS=Sentry2_0_diskusedpct $SLOTS=origin sub_origin source sub_source...
� 7 � ��� � ��� � �� 295
� ��: � �� ���� �� � ��� �� �� �� � ���. policy
�� �� �� ��� ����.
���� R/3 ������ ���� �� ���� ��
(SAP instance = PRD), �� ���� 15 ��� ���� ���
�� 2� �����.
��� �� � ��� ���� R/3 ��� �� � ���.
v ���� ��� ��� IP �� �� ��� ��� � �� �� ���� �
�� �� ��� ��� �
v AMS Module for R/3� ��� ID� ���� ���� sub_source ��� �
��� ��� ��
� ������ ��� ��� �� ���� Distributed Monitoring � R/3 �
�� ������. Distributed Monitoring ���� � ��� ���
Sentry2_0_Base��� ���� R/3 ��� ��� ���� � ��� ���
SAP_Alert��� �����. � ��� ���� � ��� �� ��� �
���.
296 IBM Tivoli Enterprise Console: � �� ���
� �� ��� ��� � ��� �� ����. � �� �� ��� �� �
� ��� � �� ��� ��� �� � ���.
policy� � �� �� ���� ���� 15 � ���� � ��� ���
����. � �� ��� ����� � �� �� �� ��� �������
� � ���. �� �� �� ���� � ��� ������.
policy� � �� �� ��� �� ��� �����.
Event Class: [Sentry2_0_Base, SAP_Alert] Conditions: sub_source in [PRD] status not in [CLOSED] severity in [CRITICAL, FATAL] Actions: 15 minutes after event is received send e-mail
� 7 � ��� � ��� � �� 297
��� ��� ����� ���� ��� �� ��� �� �� � � ��, �
�� ��� ��� ��� CLOSED� �� �� ��� ����.
policy� �� �� �� ��� � ���.
�� ���� 1�� ��� ���� ���, �� 2�
�����.
Event Class: [Sentry2_0_Base, SAP_Alert] Conditions: status outside [CLOSED] severity in [WARNING] Actions: 60 minutes after event is received e-mail administrator
298 IBM Tivoli Enterprise Console: � �� ���
Escalation_policy�� �� � ��� � �� ���.
UNIX ������� ��� � �� ���
���
UNIX ����� �� ��� ��� ��� ��� � ��� �� �� �
� �� ���� ����� ���. ��� ��� ���� ��� �� ����
su ��� � �� ��� ����� �� �� ��� � �� ����.
��� ��� �� �� ID� ���� �� ��� ��� �� � ���
�. ��� �� ��� ��� � � �� ����� � ���. �
�� ��� 10� 6� �� ��� � �� �� ��� �� �� ��
�� �� � ��� ���� � ���.
�� � � policy�� ��� ����.
� 7 � ��� � ��� � �� 299
���� �� Su_Failure ���� �� �� �����. �� �����
Su_Failure ���� 10 �� 6� �� �� �� � �� ���� ����. ��
���� 6� �� �� ���� ���� �� ��� ���, �� ��� �,
�� ���� � ��� ����.
��
� �� ��: UNIX �� �� ���� ��� �� ���� ��� �
� � � �� ���� ���� /usr/adm/sulog �� ��� ������ ���
�����. � ���, ���� ��� �� ID� ���� ���� �� ��
� ��� ���� �� ��� WARNING� ���� Su_Failure ���� ��
��.
� ���, Su_Failure ���� �� ���� �� � ���. ��� ��� �
���� TEC_CLASSES ������� tecad_logfile.baroc ��� ���� �
��� � ���� WARNING�� HARMLESS� ��� ���.
���� �� BAROC ��� �� �, ���� � ��(dup_detect ��(facet)�
YES� ��� ���)� ��� ��� ������. � ��� ��� �� �
�� �� � � �����.
� �: � ���� WARNING�� HARMLESS� �����, ��� �
� policy� ��� �� �� �� � � ����. � � policy�
�� �� ��� �� � ���.
���� �� Su_Failure ���� �� �� �����.
��� � policy� � �� �� �� �� ����.
Event Class: [Su_Failure] Conditions: Actions: When event is received Set Status to [CLOSED]
� �� ���� �� ���� ��� �� ��� �� CLOSED� �����.
� � ��� � � CLOSED ���� ���� ��� �����, ���
� ���� �� �� ����.
policy�� �� �� ��� ����.
�� ����� Su_Failure ���� 10 �� 6� �� �� �� � �� ��
�� ����. �� ���� 6� �� �� ���� ���� �� ��� ���...
policy� � �� � ���, �� �� ��� ��� ������.
300 IBM Tivoli Enterprise Console: � �� ���
Event Class: [Su_Failure] Conditions: Actions: When event is... received Set Status to [CLOSED] When event occurs 5 times within 10 minutes Set Severity to [WARNING]
� ��� dup_detect �� ���� 10� �� ��� 5�� ���� WARNING
�� ���� �����. � ��� �� ���� ��� ���� �� ���,
�� ��� �� �� ID, �� ��� �� �� ID � ��� ���
�� ID� ���. � ��� �����, 5�� �� ��� �� �� � �
��� ���.
policy�� ��� �� ���� �� ����� �� ���� ��� ���
�� ���� ��� � ���.
�� ��� �, �� ���� � ��� ����.
�� �� ��� �� ��� policy� � �� � ���. � ��� ��� OPEN
�� ���� ��� � � ���� ���� � ��� ���� ���� �
��� �� � ��� ��� �� �� �� � ���. ���� �� �
�� �� � ���� ��� � ���.
Event Class: [Su_Failure] Conditions:
� 7 � ��� � ��� � �� 301
Actions: When event is received Set Status to [CLOSED] When event occurs 5 times within 10 minutes Set Severity to [WARNING] When severity is upgraded Set Status to [OPEN] e-mail administrator
�� ��� �� ��� policy� � ���.
�� ��� ���� � policy� �� �� �� ����� �� ��� �
� �� ��� ��� ��� �� � ���. �� ��, �� ����
�� ��� � �� ID�� �� ��� ����, �� �� ��� �� �
���.
Event Class: [Su_Failure] Conditions: hostname in [dataserv1, dataserv2] to_user in [root] Actions: When event is received Set Status to [CLOSED] When event occurs 5 times within 10 minutes Set Severity to [WARNING] When severity is upgraded Set Status to [OPEN] e-mail administrator
302 IBM Tivoli Enterprise Console: � �� ���
� ��� �� ��� ��
���
�� ��� �� ���� ����� � � ����� ���� ���.
�� �� ���� �� �� ���� � ��� �� ��� �
�� ���� �� �� ����. ��, �� ��� �� �� ���� ���
� ����. ��� ��, ��� ������ ���� ��� ���� �
�� �� ��� �� �����.
��� ��� ��� �� � ����� � ����� ����� ���� �
� ���� � � policy�� ���.
� � �� � �����
�� ��� ���� ���. � ���� ����, �� � ����
�� ���� ��� ���. � � ����
���� �� ��� ����, ���� � � ���� ��
�� �� 5 � �� �� ���� ���.
��
�� ��� �� ��: � policy� � �� �� ��� ���� ��
� ���� ���� ���� ����. ����, �� �� �# ��� �
���� ������. ��� policy� ��� �� ���� �� � ���.
� 7 � ��� � ��� � �� 303
��� �
�� 10MB�� ��
�� 20MB�� ��
���� ��� 30MB�� ��
�� ���� ��� ��� ��� ��� ��� ���� � � ��� �
�� ��� ��� �� ������. � ���� ��� �� ����� IBM
Tivoli Enterprise Console ���� ���� ��� ��� ��� ���.
� �: �� � ���� ���� �� � � policy� � �� �� ��
� ���. policy� �� �� ��� ����.
� � �� � ����� �� ��� ���� ���.
� ���� ����, �� � ���� �� ���� ��� ���.
��� � ���� �� ��� �� ��� ��� �� ��� �����. �
��� ���� ���� ���� ���� ��� �� ������. �� ��
��� �� ���� � ���(�: host_down ���� host_up ���� �� �
�� � �). � �� � ����� �� �� �� ���� �� ���� �
� ��, �� � ���� ���� �� � ���� �� �����. � �
�� ���� ��� Sentry2_0_Base���. � ������ ���� �� ��
��� ���� � ��� ����� ���� � ���� ��� �� �� �
� � ���� ���� �����.
���� �� ��� ��, ���� ���� �� ���� ��� ���
���. �� ���� �� �� ��� ��� �� � � �� �
��. �� � � ��� ��� �� ���.
[Sentry2_0_Base] is canceled by [Sentry2_0_Base] within a 1440 minute period if: [Sentry2_0_Base].status equals [Sentry2_0_Base].status
�� �� 24���� ���� ��, ��� �� �� � � ���. ���
� �� ���, �� � �� ���� ���� ���� �� ���� �� �
��� �� ���� �� ��� �� ����� � �� ���. ��� ��,
���� ���� �� ���� �� ��� �� �� �����. �� � �
��, ����(open) ���� � �� ��� ��� �� ���� ����
����. ���
is-canceled-by ��� ���� ��� �� �� ���� �� ����.
� ���� ���� �� ��� ���� �� ���� ��� ���� �� �
� �� �� � ���. � � ���� ���� ���� �� ���
��� �� �� � �� ���.
304 IBM Tivoli Enterprise Console: � �� ���
�� ��
origin ��� ��� IP ��
sub_origin ��� ��� ��
source SENTRY
sub_source � ���� ����� �� policy region
collection � ���� ����� ��
monitor �� ���� ��
probe_arg ��� ���� ��� �
�� �� ��� � �� ��� �� ��� �����. � ���� causes �
� is-caused-by ��� ���� is-cancelled-by �����. ��, �� �� ���
� ��� ��� ��� ���.
� 7 � ��� � ��� � �� 305
� �� ��� ����, ��� �� �� ��� � �� �� �����.
� �� �� � � ���� ���� ��� ���, �� 24�� �� ���
�� ��� ���� �� �� ���� ����. �� � �� �� ���
����� ���.
policy�� �� �� ��� ����.
� � ���� ���� ��
��� ����, ���� � � ���� �� �� ��
5 �� �� �� ���� ���.
��� � �� ���� � �� ���. ���� ���� 5 �� ��
��� ���(Sentry2_0_Base)�� ���� � �� ���� �����. ���
�� �� ��� � �� �� �����.
306 IBM Tivoli Enterprise Console: � �� ���
� ����� �� ��� � ��� �� �� ���.
�� ��� ��
���
��� � ��� NetView ������� �� ���� ����. � �� ��
�� ��� � ��� ����� ����, �� ���� �� ��� ��
���� ��� � ���� ���� ���� ���. ���� � �
���� �� � � ���� ���� ��� �� ��� �� ����
�� �����.
� 7 � ��� � ��� � �� 307
� policy�� ��� ����.
���� � � ���� �� �����
�� � �� �� � � ���. ���� � ��
�� � � ��� � ��, ����� � ��� ���
���� �� ����.
��
��� ���� ���� �� ��� ��� ���� ��� ��� ��� �
� �����. �� � � ��� ���� � � ��� � �� � �
�� ��� ��� � � �� ��� �� � � ���. ��� � �
� �� �� ����� �����.
� ��� �� �� ��� ����.
[TEC_ITS_NODE_STATUS] causes [TEC_ITS_INTERFACE_STATUS] within a 10 minute period if: [TEC_ITS_NODE_STATUS].nodestatus equals[TEC_ITS_INTERFACE_STATUS].ifstatus [TEC_ITS_NODE_STATUS].hostname equals [TEC_ITS_INTERFACE_STATUS].hostname
� ���� �� ��� ���� ���� ���� ��� ���� �� 10
�� ���� ���� �� � �� � � � ��� �����. �� ��
� � ���� ����� �� ��� ��� �� � ���� ��� ��
� �����.
308 IBM Tivoli Enterprise Console: � �� ���
� 2 � ����� �� ����� ��� ��
© Copyright IBM Corp. 2003 309
310 IBM Tivoli Enterprise Console: � �� ���
� 8 � �� �� ��� �� � �
�� �� ��� Tivoli Enterprise Console ����� �� ����� ���� �
�� � �� ��� ��� � �� �����. �� �� ��� ���� ���
��� ���� �� ���� ���, �� ���� ��� �� ���� ���
�� ���� �� ���� ��� ��� ���� �� � ���. � ��
��� �� ���� ���� ��� ��� ����� ��� ���, �� ��
��� �� ������� ���� ����� ��� ��� ��� �� ��
� � ���.
�� �� ��� �� ���� �� � ���� �� �����. ��� �� ��
��� ��� ���� ���� Prolog �� � ���� ��� ���� ��� �
� ���. �� �� �� �� ���� ���� ���.
� 1. Prolog� �� �� � ��� ���
Prolog � �� �� �� ��
��� ���� �� ����� �� ����� ��
�� ������ ���� ���� � � � ������ �� � ������ �
��� ���� � �
Prolog �� � ��� ��� �� �� Java ���� � � �� � XML� ��� ��
��
�� ��� ���� ��� ��� � ���
�� � �
��� ��� �� �� �� �� �� �
�
��� ��� ���� ���� ��� � ���� �!
�� �� �
��� �� �� � ��� �� �����. ��� DTD ��, tecsce.dtd� ���
XML ��� ���� ��� �� �����. � XML ��� ���
$BINDIR/TME/TEC/default_sm/tecroot.xml���. �� XML � ��� IBM Tivoli
Enterprise Console TME �� CD� /EIFSDK/samples/state_correlation ���
� ���.
��� �� �� ��� ���� �����. �� ��� �� ���� ��
��� �� ��� ���� �����. �� ��, ��, �� � �� ��(�:
� �� � �� ���)�� �����.
5�� �� �� � ���� �, ���, �, resetOnMatch � ��� ��
�� � �� ��� ���� ���. � �� ��� �� ���� ���
�����. ��� � ���� ��� ���.
© Copyright IBM Corp. 2003 311
�� �� �� �� �� ��� ���� ��� ���� ��� ��, ��� �
� �� � ���� ����. ��� �� ��� � � ���.
v �� �� ��� ���� ����� �
v � �� ��� ���� ��
v ��(�: ��� ��)
6�� � ��� �, ��, ��, ���, � �� �� � ������. � �
� ���� �� ���� ���� ���� ���. � ��� ��, �
�� � ���� ��� ���� �� ��� ��� �����(��� ��� �
��, ���� ������ ���).
� �� ���� ���� �� � ���� �����.
�� �� ���� �� ���� �����.
� �� ��� �� � ���� ��� � �� ���� ����� ���
�����.
��� ���� �� � � ���� ��� �����.
�� �� �� �� � �� ���� �� ��� ���� ��� ����
��� �����.
�� � ���
�� �� �� � �� ���� �� ��� ���� �� ��� ��
�� ��� �����.
�: ���� ��� ��� ��� �� �� ��� ���� ��� �� ��
�. �� ��, �� �� �� �(�: ��� �)� �� �� � � ��
�. �� ��, ��� ��� ����� ��� ��� ���� �� �� �
� � ��� ����� ���� �����. ��� ����, ��� �� �
��� � �� ���� ��� �� ��� �� ��� �� ���.
��
� ������ �� Boolean ��� 0 �� �� �� � �� ���.
� �� �� ��� ���� �� � ���.
� 2. � �� � ��
� �� ��
�� � Equality
�� ���� � Addition
��� �� &hostname
�� � foobar
�� ��� 337 ���� � 9 � ��� �� ���� ������.
312 IBM Tivoli Enterprise Console: � �� ���
��
�� ���� ���� �� ��� � � ���. ��� Java ���� �
�� �� �� ���� ���� �� �� ��� �� �������(
�� ��� 327 ���� ��� �� �� ��� ��). �� ��� �� � ��
� ��� ���, TECSummary, �� � SendTECEvent���. ��� ���
singleInstance�� �� � � Boolean ��� �����. � ��� false��
�� � ���� ��� ���� ����. ��� ��� � ���� ����
�� �� �� �����. �� � ����. ��� true ����, ���
� ���� ���� �� ���� �� � ��� �����.
�: � �� � �� �� � ��� �� �� ��� �� �� ���.
�� ��� 327 ���� ��� �� �� ���� ������.
���
��� ��� �� ��� � ���� ����� ����. ��� ���� ��
�� ����. � ���� �� ����. �� XML ����� ��� ��� �
� ��� �����(XML � ��� �� �� ��� 337 ���� � 9 � ��
� �� ��� ��).
<rule id="root.match_discard_tec_notice"> <eventType>TEC_Notice</eventType> <match> <predicate> <![CDATA[ # always succeeds true ]]> </predicate> </match> <triggerActions> <action function="Discard" singleInstance="true"/> </triggerActions> </rule>
TECSummary TECSummary ��� ���� ��� ��� ���� � �� ��� ��� �
����. ��� �� ��� ��� �� � ���. �� ���� ����
� ���� � �� ���� �� repeat_count ��� ��, �� ��� ���
��� ������.(��� ���� repeat_count ��� � �� �� ���
�� repeat_count �� ���� ��� �� �����.)
repeat_count ��� ���� � ��, TECSummary ��� �� ���� msg �
� �� � ��� �� �� ���. ���� �� XML �� ��� � �
msg ����� �����.
�� ��, �� ���� ����� ��� ����.
� 8 � �� �� ��� �� � �� 313
EVENT;repeat_count=3;msg=event1; EVENT;repeat_count=5;msg=event2; EVENT;msg=event3;
�� ���� �� repeat_count� ���.
repeat_count = 3 + 5 + 1 = 9
�� ���� repeat_count � msg ��� TECSummary ��� �����. �
� �� �� �� �� �� ��� ��� �� �����.
�� XML��� TECSummary ��� ���� �� �����.
<rule id="root.duplicate_tec_db"> <eventType>TEC_DB</eventType> <duplicate timeInterval="10000"> <cloneable attributeSet="sql_code"/> <predicate> <![CDATA[ # If we reach this point then # the sql_code is already duplicated # because it is used as a cloneable # parameter. true ]]> </predicate> </duplicate> <triggerActions> <action function="TECSummary" singleInstance="false"> <parameters> SET:msg=root.duplicate_tec_db.summary </parameters> </action> </triggerActions> </rule>
�
�� ��� ���� �� �� ���� � �����. �� ��� ����, ��
�� � ���� ���� �� � �� �� � �� � ���. ��
�� �� ���� �� �� � �� ���� ����� ����� �� �
� � �� ���� �� �� �� �� ���� ����� ��� �� �
���. �� ��� ����� ���� �� ��� �����. �� ��, �
� ��� rule2�� �� ���� �����.
<action function="Forward" > <parameters> <![CDATA[ RULES:rule2 ]]> </parameters> </action>
�� ��� ���� � ��� �� � ���� �� �� ���. ���
��� ��� �� �� �� ��� ��� ������.
314 IBM Tivoli Enterprise Console: � �� ���
<action function="Forward" > <parameters> <![CDATA[ RULES:rule2, rule3, rule4 ]]> </parameters> </action>
�� ��� �� ��� �� ���� ���� �� ���, RULE ����
directAccess="false" ��� ���� �� ��� � ���. � ��� ��
�� ��, �� �� �� ���� � ���� �� � ��, � �� ��
�� ��� ���� �� � ���.
��� ��� ���� ���� � ��, �� ��� � �� �� ���� ��
�� �����( � ��).
�: �� ��� ���� �� � ���� ��, �� ��� � �� �� �
��� ��� ����.
�� XML ����� �� ��� ���� �� �� ���� �� �����.
� ����, �� �� �� �� ��� �� ��� ���� �����.
<?xml version="1.0"?> <!DOCTYPE rules SYSTEM "rule.dtd"> <rules predicateLib="ZCE"> <predicateLib name="ZCE" class="com.tivoli.zce.predicates.zce.parser.ZCEPredicateBuilder"> <parameter> <field>defaultType</field> <value>String</value> </parameter> </predicateLib> <!-- #########################################--> <!-- Rule: threshold_1--> <!-- #########################################--> <rule id="threshold_1" > <threshold thresholdCount="100" timeInterval="1000" timeIntervalMode="fixedWindow" triggerMode="allEvents" > <predicate> <![CDATA[ &hostname == "test_1" ]]> </predicate> </threshold> <action function="Forward" > <parameters> <![CDATA[ RULES: collector ]]> </parameters> </action> </rule > <!-- #########################################--> <!-- Rule: threshold_2--> <!-- #########################################-->
� 8 � �� �� ��� �� � �� 315
<rule id="threshold_2" > <threshold thresholdCount="100" timeInterval="2000" timeIntervalMode="fixedWindow" triggerMode="allEvents" > <predicate> <![CDATA[ &hostname == "test_2" ]]> </predicate> </threshold> <action function="Forward" > <parameters> <![CDATA[ RULES: collector ]]> </parameters> </action> </rule > <!-- #########################################--> <!-- Rule: collector--> <!-- #########################################--> <rule id="collector" directAccess="false"> <collector timeInterval="10000" > <predicate> <![CDATA[ true ]]> </predicate> </collector> <action function="Summary" /> </rule> </rules>
SendTECEvent SendTECEvent ��� �� �� ��� ��� ���� ������ �� ��
� �� ��� �� ���� � �����(�� ��� 331 ���� ���� �
�� ��).
�� XML �� �� �� ��, EventModificationSample� ���� ����
TEC_Notice ���� ���� ���������. �� ��, SendTECEvent ��
� ���� ��� ���� ���� ������ �� �����.
<rule id="sce_sample.tec_notice_escalate_severity"> <eventType>TEC_Notice</eventType> <match> <predicate> <![CDATA[ # always succeeds true ]]> </predicate> </match> <triggerActions> <action function="EventModificationSample" singleInstance="true"/> <action function="SendTecEvent" singleInstance="true"/> </triggerActions> </rule>
�� �� �� ��
��� �� �� � �����.
316 IBM Tivoli Enterprise Console: � �� ���
id � �� ID� �����. � ID� ���� � �� �� ��� ���
���. � �� ���� �����. �� ��, ID� test.threshold
�� �� �� �� ID� test.threshold.1� �� � ����.
eventType
� �� ���� ��� ���� �����. ��� �� �� ��� ��
�� ���� �� eventType ��� � � ���. �� ���� �
��� ���� �����. �� eventType ��� �� �� ����
�� �� ��� ���� �����. �� �� �� � � ���,
��� eventType ��� ���� ��� ��� ���� �� � ���
������.
�: �� �� ��� ��� ���� ���� BAROC ��� �����
����, �� �� ��� �� ���� � ����. �� �
�� ���� �� � �� ��� ���� �� ��� eventType �
�� � ���. ��� ���� ������ �� ���� �
���.
�� �
�� �� ������. ��� ���� ���� �� �� �� � ���� �
����. �� �� ��� �� � �� ���. �� true� ��� ��
���� � �� ��� �����. ��� �� � �����.
<!-- Discard all heartbeat events for my host that have msg="please match me". --> <rule id="test.match" > <eventType>TEC_Heartbeat</eventType> <match> <predicate> <![CDATA[ &msg == "please match me" && &hostname == "hostname1" ]]> </predicate> </match> <triggerActions> <action function="Discard" singleInstance="true"/> </triggerActions> </rule>
� �
� �� �� �� �� � � ���� ��� ����. �� �� ����
�.
� 8 � �� �� ��� �� � �� 317
v �� ��� �� ���� �� ��� �� �� ��. ��� ���
timeInterval ��� ���� ��� �����. �� ���� � �� ��
�� �� �����, ��� ���� ��� ������.
v �� ��� ��� ���� �
�� 1��� � �� �� ��� �����.
�� 1�� �� 1� � �����. �� 1� ���� ��� ���� ���
� � � ����. �� �� ��� �� ���� ���� ��� ����
�. �� 2� �� ��� �� � ��� �� ��� ������. ��� �
� � �����.
<!-- Show me only the first error number 10 for my host that happens each 10 seconds. --> <rule id="test.duplicate" > <eventType>TEC_Error</eventType> <duplicate timeInterval="10000"> <predicate>
<![CDATA[ &msg == "internal error on my adapter" && &hostname == "hostname1" && &errno = 10 ]]> </predicate> </duplicate> </rule>
� �
��� �� �� �� �� � ���� n �� ����. ���� �� � �
�� ��� ��� ���� ����. ��� ��� �� ����� �����.
v triggerMode ��� ��� �� �� �� ��:
firstEvent
�� � �� ��� �� ���� ����.
lastEvent
�� � �� ��� ���(n��) ���� ����.
S1 S2
1
2
�� 1. � �� �� ��
318 IBM Tivoli Enterprise Console: � �� ���
allEvents
1�� n��� �� ���� ���, �� � �����.
forwardEvents
���� ��� n�� ��� �� ���� ����.
v ���� ��� �� �� ��. ��� ��� timeInterval ��� ��
�� ��� �����.
v �� ��� ���� �� ���� ��� ���� �� �� ��.
timeIntervalMode=fixedWindow | slideWindow �� ��� ��� �����.
� �� fixedWindow���.
v thresholdCount ��� ��� ���� ���� �
v 1�� n���� ���� ���� � ���� �� �
�� 2 � 320 ���� �� 3��� timeIntervalMode=fixedWindow� ��� ��
� �� �� �����.
�� 2��� firstEvent, lastEvent � allEvents ��� �� �� ��� ����
�. �� 1� �� ��� �� ���� �� �(�� �� ��) ���
�. �� 2� ���� �� ���� �� �� � ����. �� ��� �
��, �� 3� ��� �� ��� ������. �� 4� ���� ��� �
�� ��� ������. SN ��� ����, ����� �� �� ���,
��� ��� �� �� n ���� �����.
S1 S2 S3 SNS
1
3
3
3
4
2 22(N-1)
�� 2. � ��� �� �� ��
� 8 � �� �� ��� �� � �� 319
forwardEvents ��(�� 3)���, ���� ��� � �� ��� �� ��� �
�� �� �� ���� �� ���� ����.
�� � �� ��(timeIntervalMode=fixedWindow)� ���� ��, ���� �
� ���� �� � ��� ���� �� ��� �� � �� �����. �
��� �����, � �� � �� �� n�� �� ���� ��� ���. �
�� �� � �� �� ���� ���� ���, �� ����� ���� �� �
� ���� � �� �� �����.
� � �� ��(timeIntervalMode=slideWindow)� ���� ����, � �� �
��� �� � ��� ��� ���� ���� �� �� �� �����. �
��, �� �� � �� �� n�� �� ���� ���� ���� �����.
t� �� ��� �� �� �� � �� ���� ��� �� �� � ��
�.
v �� �� ��, �� ���� ��� � t �� n�� ���� ���� �
��� �����.
v � �� ��, � ���� ��� � t �� n�� ���� ���� ���
� �����.
��� � �� �� � ��� �� � �����.
<!-- I’m only interested when at least 5 Node_Down events for hosts in my local subnet happen within 1 minute. --> <rule id="test.threshold"> <eventType>Node_Down</eventType> <threshold thresholdCount="5" timeInterval="60000" timeIntervalMode="slideWindow" triggerMode="allEvents"> <predicate> <![CDATA[ (&msg == "node down") &&
S1 S2 S3 SNS
1
3
3
3
3
2 22(N-1)
2
�� 3. forwardEvents� ��� ��� �� �� ��
320 IBM Tivoli Enterprise Console: � �� ���
(isMemberOf(&hostname, [ 192.168./16 ])) ]]> </predicate> </threshold> </rule>
��� �� � ��� � �� ��� �� �� �� � ���. aggregate
�� ��� ���� � �� ������. � ��� ���� �� �� ��
� ���. ��� �� true �� false �� ��, 337 ���� � 9 � ��
� �� ���� �� � �� ���� ��� �� ������. �� ��
� ��� �� �� �� thresholdCount � ��� �� �����. �� �
�� ��� ���� thresholdCount �� ����, 0� 1 ��� � ���
���� �� ��� ����. �� ��� ���� � �� ��� ����
�.
<rule id="test.aggregate_threshold"> <eventType>Temperature_Variation</eventType> <threshold thresholdCount="100" timeInterval="2000" triggerMode="allEvents" timeIntervalMode="fixedWindow" > <aggregate> <![CDATA[ &relative_percentage * 100 ]]> </aggregate> <predicate>true</predicate> </threshold> </rule>
��� �
�� �� ��� �� � ��� �� ���� ���� �����. �� �
�� �� � ���� ��� ���� ��� ��� ����. �� ��� �
� �� �����.
v �� ���� ���� �� �� ��. ��� ��� timeInterval ��� �
��� ��� �����.
v ��� �� ��� ��� ���� �� �
322 ���� �� 4��� �� �� �� ��� �����.
� 8 � �� �� ��� �� � �� 321
�� 4�� S1� � �����. �� 1� ���� ��� ���� ����
� � ����. � ���� ���� �� �����. ��� ��� ���
� �����. ��� ��� ��, �� ���� ���� �� ���� �
����(�� 2). �� 3� �� ��� �� � ���, �� ��� ����
��. �� ��� �� ���� �����. ��� �� � �����.
<!-- Collects 10 seconds of Server_Down events for my database. --> <rule id="test.collector"> <eventType>Server_Down</eventType> <collector timeInterval="10000" > <predicate> <![CDATA[ &servername == "my_database" ]]> </predicate> </collector> </rule>
� �
� �� ��� �� �� �� �� ��� ��� ���� ��� �� ��
�� �����. ��� ��� �� ��� ���� ���� ��(�� ���
� ��) �� ���� �����. ���� ��� ��� ����� �� �
��� ���� ����.
� ��� �� ����� �����.
v �� ���� ��� ��� �� � � ��� ��� ��� ��� �
�� ���� Boolean �(randomOrder). randomOrder� yes�� ���� ��
� ��� �� � ���.
v �� ��(� �� �� �� �� ��� ����)
v �� ���� ���� �� �. �� �� ��� ���� ����, �
� �� ���� �� �� �� ���� �� �����.
v �� �� ���� ���� �� ��� �
S1 S2
1
3
2
�� 4. �� �� �� ��
322 IBM Tivoli Enterprise Console: � �� ���
�� 5� ��� ���� ��� ��� ��(randomOrder=no) � �� ��
��� �����.
�� 5�� S1� � �����. �� ���� ��� � �� 1� ����. �
�� ��� ���� ���� ��� �����. �� 2� ���� ���� �
�� ��� �� �� �� � ����. ���� �� 3� ���� �
��� ���� �� �� �� � ����. S4 ��� ����, �� �
� ���� ���� � �� S1(�� 5) ��� ������. �� 4� ��
��� �� � ���, �� ���� ���� �� �� � ��� ���
���.
324 ���� �� 6��� �� ���� randomOrder=yes ��� �� � �
�� � �� �� ��� �����.
S11
S4
2
34
4
S2 S3
5
�� 5. � �� �� ��(randomOrder=no)
� 8 � �� �� ��� �� � �� 323
�� 6� ��� 323 ���� �� 5� ����. ��� � ���� �� ���
S5� ��, � ��� ��� ��� �� ��� ������.
�� � ��� �
�� � ��� �� ��� �� �� �� �� ��� ��� ���� �� ���
�� ���� �����. ��� ��� �� ��� ���� ���� ��
(�� ��� � ��), �� ���� ���� ����. ���� ��� ��
� ����� �� ���� �����.
� ��� �� ����� �����.
v �� ���� ��� ��� �� � � ��� ��� ��� ��� �
�� ���� Boolean �(randomOrder). randomOrder� yes�� ���� ��
� ��� �� � ���.
v �� ��(� �� �� �� �� ��� ����)
v �� ���� ���� �� �. �� �� ��� ���� ����, �
� �� ���� �� �� �� ���� �� �� �����.
v �� ���� ��� ��� � �� �� ���� ���� �� ���
�
S1
S8
1
5
S3
S7
S6S2
S5
S10
S4 S9
S112
3
2
3
3
1
1
3
3
2
2
2
1
1
�� 6. � �� �� ��(randomOrder=yes)
324 IBM Tivoli Enterprise Console: � �� ���
�� 7��� �� ���� randomOrder=no ��� ��� �� �� � ��
� �� �� ��� �����.
�� 7�� S1� � �����. �� ���� ��� � �� 1� ����. �
�� ��� ���� ���� ��� �����. �� 2� ���� ���� �
�� ��� �� �� �� � ����. ���� �� 3� ���� �
��� ���� �� �� �� � ����. S4 ��� ����, ��
� �� S1(�� 5) ��� ������. �� 4� �� ��� �� � ��
�, �� �� ���� ��� �� � ��� ������ ���.
326 ���� �� 8��� �� ���� randomOrder=yes ��� �� � �
�� �� � ��� �� �� ��� �����.
S11
S4
2
34
4
S2 S3
5
�� 7. �� � ��� �� �� ��(randomOrder=no)
� 8 � �� �� ��� �� � �� 325
�� 8� ��� 325 ���� �� 7� ����. ��� � ���� �� ���
S5�, � ��� ��� ��� �� ���� ���� �� �� ��� ���
���.
�� ��� ��
clonable ��� ���� �� �� �� �� � ���. �� ���� �
� �� ��� �� ����, �� ��� �� �� ���� �����. �
�� �� �� �� �� ���� �� ��� ��� ���� � �����.
�� ��, ��� �� ��� ���� �� ���� �� ��� �� ��� ��
�� �� �� � ���� �����(�� �� �� �� ����� ��). �
�� � ��� ��� �� �� ���� �� ��� �� � � � �
� �� � ���.
�� ����� ��� ���� �� ������ � �� ��� �����(
�� ��, �� ��).
<!-- This is a little variant to our previous threshold example. This rule only triggers if 5 Node_Down events for the SAME host arrive within 1 minute. --> <rule id="test.cloneable_threshold"> <eventType>Node_Down</eventType>
S1
S8
1
5
S3
S7
S6S2
S5
S10
S4 S9
S112
3
2
3
3
1
1
3
3
2
2
2
1
1
�� 8. �� � ��� �� �� ��(randomOrder=yes)
326 IBM Tivoli Enterprise Console: � �� ���
<threshold thresholdCount="5" timeInterval="60000" triggerMode="allEvents"> <cloneable attributeSet="hostname"/> <predicate> <![CDATA[ (&msg == "node down") ]]> </predicate> </threshold> </rule>
Cloneable ��� �� ��� ��� ��� ��� �����. ��� ����
�� ��� �� �� �� �� �� ���� � ���. �� ��, �
� XML ��� �� ��� �����.
<cloneable attributeSet="hostname"/>
�: �(null) �� �� �� ��� �� ��� ���� ����. �, �� ���
� ��� �� ��� �� ���� ���� �� ���� ����.
��� �� �� �
� ��(���, TECSummary, �� � SendTECEvent) ��, Java ��� ���
� � ��� �� �� ��� �� �� �� ���. �� �� ���
����, ��� ��� ���� ���� �� ��� �� � ���.
� ��� Java ���� � ���. �� �� ��� ��� �, �� ��� ��
��� ���� �� ��� �� �� ���� ���� �����. ��� ��
��� ��� ��, � ��� � ���� ���� � ��� ��� �� �
� �� � ���� �����. ��� ���� ���, �� �� ���� �
��� � �� ��� ���� �����(�� �� �� ����� ���� �
�� � ��� � �� ��� �� � ��).
��� ���
�� �� ��� ���� ���� Java ����� ����. ���� ����
�� ���� ���� �� �� �(�� ��� �� ��� ��), ��
�� �� �� ���� � Java ����� �����. com.tivoli.zce.engine.
Event ���� ��� � ����� �� �� ��� �����. ���� �
� ���, �� �� ��� ����� ��� �� ���� ���� ����
�����. �� ���� �� �� ��� ���� ���� � ������ �
��� �� ���� ���� ��� �� �� ���� �� �������. ��
���� ����� �� ���� ��� ���� �� ���� ������ ��
�����.
�: �� �� ��� ���� �� ���� ����� ���� �� ��� ��
��� BufferEvents ���� BufEvtPath ����� � ������ ���
� 8 � �� �� ��� �� � �� 327
�� �� ���� ���� ��� ����� ����. ��� ��� ��
� �� �� ��� IBM Tivoli Enterprise Console �� ���� ���
���.
�� ��� Java Event ������ ��� �� �� ��� � � ��
���.
v ��� ����� ���� ���� � ��� � � � � . ��
� � � � � ���� �� ��� ��� �� � ���.
v �� �� ��� ��� ��� ��� ��� �� ���. �� � ���
�� ���� ��� ���� ���, � � � ����� ����� �
� ��� ���� ����.
�� ��, �� �� � � ��� �� �� ��� �� ��� ����� ��
���. � �� ���� ��� ���, ��� �� � �� �� � ��� ���
� � ���. �� ��� �� �, ���� ������ �����(���
� ��� �� ��).
������ ��� ��� ���� � ��� ��� ��� �� ��� ��� �
�� ���� ���. � ��� ��� �� �� ���� �� ���, �
��� �� ���� ���� �� �� �� ���� ��� ���. ��� �
�� ��� ���� ����� �����. �� �� �� ��� ��� �� �
� ��� �� SendTECEvent� ���� ����. �� �� �� �� ���
� �� �� ���. �� ��� 331 ���� ���� ���� ������.
���� �� ��� ���� ������ ��� �, ���� ������ �
��� �� �� ���� � ���� ���� ��� ����. �� � ��
�� ������ ��� � ���� �� ���� ����. �� �� �� �
�� ���� ���� ����, ��� �� ������ ���� ����� �
� ���. �� ��� 332 ���� ���� ����� ������.
�� ��
��� Java ���� � ��, �� �� ��� �� � �� com.tivoli.zce.
actions.libs ���� � ���. � ���� ��� ����� � �� �
� �� � �� ��� ��� ��� ���. �� ���� ��� �����
�� � �� ���� com.tivoli.zce.actions.DefaultActionHandler ���� �
�� ���. ��� �� � �� ���� � � ���.
v processEvent(). � ���� ��� � �� �� ��� �� ���, �� �
���� � Event ����� �����. ��� � ���� ���� �
�� � ���� �����.
v processEvents(). � ���� processEvent() ���� ����, �� ��
�� � � � EventList ����� �� ����� �����. �
328 IBM Tivoli Enterprise Console: � �� ���
��� �� ��� ���� ��� � � � ���, ���� � �
� ���. processEvents() ���� ��� �� � �� ��� ��
processEvent() ���� � � ���.
v doParse(). � ���� �� ���� ������ �� �� �� ��
��� �� ����. doParse() ���� ��� ��� XML �� ���
����� �� ���. ��� ����� �� �� ���� �� ���
� �� �����.(��� ���� �� ��, ����� �� �� ���
� ��� � �� ������.)
��� ���� �� �(processEvent() ��� �� processEvents() ���
� �), ��� �� ���� ��� �� ��� ����� ���� �
� ���(�� ��� 330 ���� ����� �� �� ��). �����
���� ��� ���� ����, ��� �� �� �� ���� �� ��
�. �� �� ��� ��� ���, � ��� � �� ��� �� ����
�� �� ���� ��� ��� �� � ���. �� ���� � ����
forward() �����, �� �� �� ���� ��� ���(�� ��� 331
���� ���� ��� ��).
330 ���� �� 9��� �� ���� �� ��� �����.
� 8 � �� �� ��� �� � �� 329
���� � �
��� ����(com.tivoli.zce.engine.Event� ���)�� �� ���� ��� �
�-� � ��� � ��� �� ��� �� ���. Event ���� ��� ��
�� �� � � ���� �����. ��� �� ���� ���.
hasAttribute()
hasAttribute() ���� � � � ����� ����, ���� �
�� ��� ��� �� �� ��� ���� Boolean �� ����
�. �� ��, event.hasAttribute("HOSTNAME")� event� HOSTNAME
��� �� true� �����(�� ��� ���� ��� ��).
getString()
getString() ���� � � � ����� ����, ��� ��� �
� �� � � � �����. �� ��, event.getString
("SEVERITY")� event� � SEVERITY �� �� �����.
�: Event ���� �� ��� �� ��� �� �� ��� ���� �
���. ��� �� Tivoli Enterprise Console ��� ��� �
package com.tivoli.zce.action.libs; import com.tivoli.zce.IRule; import com.tivoli.zce.ParserException; import com.tivoli.zce.CorrelatorException; import com.tivoli.zce.engine.EventList; import com.tivoli.zce.engine.Event; import com.tivoli.zce.actions.DefaultActionHandler; public class MyAction extends DefaultActionHandler implements ITecEventAttributes { public void processEvents(EventList eventList) throws Exception { // code to process multiple events forward(eventList); } public void processEvent(Event event) throws Exception { // code to process single event forward(event); } public Object doParse(IRule rule, String params) throws ParserException { // method to parse parameters after instantiation } }
�� 9. ��� ��
330 IBM Tivoli Enterprise Console: � �� ���
� ���� ���, Tivoli Enterprise Console ��� �� �� ��
� � getString()� ��� ���.
putItem()
putItem() ���� ����� � � � �� �����. � ����
��� � � � ��� �� �� �� ����� . �� �� ,
event.putItem("ORIGIN","SCE")� ORIGIN �� �� ″SCE″ � � �
����. ��� �� �� ��� ���� ��� � ��� �����. �
� �� �� �� �� �� � ��, ��� ��� ���� ��
� �� �� �(nest)� ������ �����.
�: �� �� ��� ��� ���� ���� BAROC ��� �����
���, putItem ���� ��� �� ��� ��� ��� ���
� ����. ��� ��� ���� �� ��� � ���� ��
��, � ���� ���� ���� ��� ��� ���� ���� �
� ���. �� �� ��� ���� ��, ��� �� ���
����� � �� ��� ��� ���� ��� ��� �� �
��.
��� ��� �� �� ���� �� ��, ITecEventAttributes ����� �
��� ���� ���� �� � �� ��� ���� ��� �����. �
� ���� � ����� � �� ��, � �� ��� ��� ���� �
� ��� �� � ���.
��� �
� ��� Java ����� � � ���� � �� �����. � ��� ��� �,
�� �� ��� �� ��� ��� �� ���� ���� ������ ��� �
� ���� �� �� �����. � ��� �� ��� ��� �� ���� ��
�� ��, �� �� ���� ����� ��� �� ��� ���� ��
��. ��� �� �� ��� ��� ����� ����� ���� ��� �
��. �� ��� ��� ���� ��� ���.
v �� ��� ���� ��� ��, ����� ��� �� �� ���� �� �
� ��� ���� ��� ���. ���� ��� �� ��� �� ���
���� �� � ���.
v ��� ���� ��� ��, ���� �� ��� ���� �� ���� ��
� ���.
��� ��� ��� �� � � �� �� ���.
v TecEventUtil.updateTecEvent() ���� ���� actionHandler.forward()
� ��� �� ��� ���� ����� �� � ���. � ���� �
���� �� ��� ���� �, �� ��� � ��� �� ��� ��
� 8 � �� �� ��� �� � �� 331
�� �����(�� ���� � ���� ��� ��� �). �� �
�� myEvent� �� ��� ���� �� ���� �����.
updateTecEvent(myEvent,myEvent); forward(myEvent);
v TecEventUtil.forwardTecEvent() ���� ���� ��� ��� ���� �
��� �� ��� ���� �� � ���. actionHandler.forward() �
�� �� � ���� ���� ���� �� � ��� ����, ����
� ���� ���� �� �� � � ��� ���� �� ��� �
�� � ���� ������. ���� ���� ��� ��� � �� �
�� ��� ��� �� �� ����, forward() ���� �� ���� ��
��(�� ��)���. forwardTecEvent() ���� � �� ���� �, �
�� ���� �� ���, �� ��� � ��� ��� �� ���� �
����. �� ��� myEvent� ���� ���� �� ��� ���� ���
��.
TecEventUtil.forwardTecEvent(this,myEvent,myEvent);
v �� ��� ��� � SendTECEvent ��� � ���. � ���
TecEventUtil.forwardTecEvent() ���� ���� ���� �� ���� �
� � ����, �� ��� �� ����� ��� ���� ���� ���.
�: SendTECEvent� �� �� ��� �� ���� ����� � ���� �
��� ��� �����. ��� � ���� ���� �� ��� ���
�� ���� ���� ���� �� ���� ��� ���. � ����
�� ���� �� ���� ��� ����.
��� ���
�� �� �� ��� �� ���� �� ��� ���� ����� ����
�� � ���. ���� �� ���� � �� ���� �� �� ��� ���
��� ��� ���� ����.
��� ���� ��� �� ������ �� ���, �� �� ������ �
��� � � ���� ����� ��� ��� ���� ��� � ���. ��
����� ���� ����, � ��� �� ��� ��� ����� ���
� PHandler.removeEvent_termAction() ���� ������.
�� ��� ��
� �� ����� �� �� �� �� �� �� ���� �����.
��� �� ��
� ��� ���� �� ���� ���� ���������. ���� �����
�� ��� ��� ��� ��� �, ��� � SEVERITY �� �� ����.
332 IBM Tivoli Enterprise Console: � �� ���
SEVERITY� WARNING, MINOR �� CRITICAL�� ��� �� �� ���
��� �����. SEVERITY� FATAL ���� ���� ����.
SEVERITY �� �� ��� �, ��� ��� ���� ���� �� ��� �
��� �����.
� ��� ����� ���� �� ���, doParse() ���� �� ��� �
� � ���� � ���.
// Actions must be part of the com.tivoli.zce.actions.libs package package com.tivoli.zce.actions.libs; // State correlation imports import com.tivoli.zce.IRule; import com.tivoli.zce.ParserException; import com.tivoli.zce.CorrelatorException; import com.tivoli.zce.engine.EventList; import com.tivoli.zce.engine.Event; import com.tivoli.zce.actions.DefaultActionHandler; import com.tivoli.zce.actions.TecEventUtil; public class EventModificationSample extends DefaultActionHandler implements ITecEventAttributes { /****************************************************************************** * Processes a list of events by parsing the list and calling processEvent() * for each ******************************************************************************/ public void processEvents(EventList eventList) throws Exception { if (eventList != null) { try { for (int i = 0; i < eventList.size(); i++) { processEvent( eventList.eventAt( i)); } } catch (Exception x) { x.printStackTrace(); } } } /****************************************************************************** * Processes a single event. If the value of the SEVERITY attribute is lower * than FATAL, it is incremented to the next level. The SEVERITY_LIST array is * defined by the ITecEventAttributes interface and contains the six standard * severity values: UNKNOWN, HARMLESS, WARNING, MINOR, CRITICAL, and FATAL. ******************************************************************************/ public void processEvent(Event event) throws Exception { String severity = null; if (event!= null) { if (event.hasAttribute( SEVERITY)) { severity = event.getString( SEVERITY); int i = 0; while (i < SEVERITY_LIST.length && !(severity.equals( SEVERITY_LIST[ i]))) { i++; } if (i < SEVERITY_LIST.length - 1) {
� 8 � �� �� ��� �� � �� 333
severity = SEVERITY_LIST[ i + 1]; } } else { severity = SEVERITY_LIST[ 0]; } } event.putItem( SEVERITY, severity); // Update the event snapshot and forward to the next action TecEventUtil.forwardTecEvent(this,event,event); } /****************************************************************************** * Parses parameters for the action (none in this case) ******************************************************************************/ public Object doParse(IRule rule, String paramSz) throws ParserException { return null; } }
��� ��� � � ��
� ��� �� ���� �� ��� ����, ���� � ���� ��� �� �
��� � ���� �����. ���� ����� �� ��� ��� ��� ��
� �, ��� HOSTNAME �� �� ����(���� ��� � ��). �� �
�, � TEC_Notice ���� ���� � ���� HOSTNAME ��� �� ��
�� �� �� �� �� �(�� � �)�� �����. ��� � ���� �
��� �� ��� �����.
��� �� ���� � ���� ���� �� ����� �� ���� ���
�. �� ���� �� ��� ���� �� ��� � �� ���� �� ����
�.
// Actions must be part of the com.tivoli.zce.actions.libs package. package com.tivoli.zce.actions.libs; // State correlation imports import com.tivoli.zce.IRule; import com.tivoli.zce.ParserException; import com.tivoli.zce.CorrelatorException; import com.tivoli.zce.engine.EventList; import com.tivoli.zce.engine.Event; import com.tivoli.zce.actions.DefaultActionHandler; import com.tivoli.zce.persistence.PHandler; import com.tivoli.zce.actions.TecEventUtil; public class CreateNewEventSample extends DefaultActionHandler implements ITecEventAttributes { // A default host name to use if the event does not contain one private final String DEFAULT_HOSTNAME = "’no host’"; /****************************************************************************** * Processes a list of events by parsing the list and calling processEvent() * for each ******************************************************************************/
334 IBM Tivoli Enterprise Console: � �� ���
public void processEvents(EventList eventList) throws Exception { if (eventList != null) { try { for (int i = 0; i < eventList.size(); i++) { processEvent( eventList.eventAt( i)); } } catch (Exception x) { x.printStackTrace(); } } } /****************************************************************************** * Processes a single event. A new event is generated using the value of the * HOSTNAME attribute of the original event. The original event is then * discarded, and the new event is forwarded to the next action. The HOSTNAME, * MSG, and ORIGIN constants are defined by the ITecEventAttributes interface. ******************************************************************************/ public void processEvent(Event event) throws Exception { Event newEvent = new Event(); String hostname = DEFAULT_HOSTNAME; if (event!= null) { if (event.hasAttribute( HOSTNAME)) { hostname = event.getString( HOSTNAME); } } // create new event and set HOSTNAME attribute equal to HOSTNAME of // original event, or to default value newEvent.type = "TEC_Notice"; newEvent.putItem( HOSTNAME, hostname); newEvent.putItem( MSG, "’Generated by State Correlation’"); newEvent.putItem( ORIGIN, "SCE"); // Update the snapshot and forward the new event to the next action TecEventUtil.forwardTecEvent( this, newEvent, event); // Add the new event to the persistent store PHandler.addEvent( newEvent); // Remove the original event from the persistent store. Because it // not forwarded, the event is discarded. PHandler.removeEvent_termAction(event); } /****************************************************************************** * Parses parameters for the action (none in this case) ******************************************************************************/ public Object doParse(IRule rule, String paramSz) throws ParserException { return null; } }
� 8 � �� �� ��� �� � �� 335
336 IBM Tivoli Enterprise Console: � �� ���
� 9 � �� �� ��
� ��� � ��� ��� ����.
v � ��
v � �����
v �� �� ���
�: �� ��� �� IBM Tivoli Enterprise Console �� ����.
�� ��� �� �� �� 311 ���� � 8 � ��� �� ��� �� � �
��� ������.
� ��
�� �� �� XML �� �� 1.0� ���� �����. � ���
$BINDIR/TME/TEC/default_sm/tecsce.dtd ��� ��� �� �� ��(DTD)� �
� ���.
XML � �� UTF-8���. �� UTF-8 ��� �� �����, XML
� �� �� ���. �� ����� �� ���� �� XML encoding �
��� ������.
<?xml version=”1.0” encoding=”EUC-JP”?>
� �� � ��� ��� �� ��� �� � �, �� ��� ��
�� ��� �� �� �� ��� ��� ����.
�: � ��� �� ��� �����.
� �
� ��� ���� � �� ���.
v � �� � ����� ��
v �� ��� ��(�� ��) �� � � ��� �� � � ��
v � � ��� � �
v �� �� CDATA ��� ��
��� �� � �����. � ��� �� ��� 338 ���� � 3� �����
�.
1 <?xml version="1.0"?>
2 <!DOCTYPE rules SYSTEM "tecsce.dtd">
© Copyright IBM Corp. 2003 337
3 <!-- Comments -->
4 <rules predicateLib="ZCE">
5 <predicateLib
6 name="ZCE"
7 class="com.tivoli.zce.predicates.zce.parser.ZCEPredicateBuilder">
8 <parameter>
9 <field>defaultType</field>
10 <value>String</value>
11 </parameter>
12 </predicateLib>
13 <variables scope=”test” >
14 <variable name=”IPS” type=”Set” value=”[1.2.3.4 1.2.3.5]” />
15 </variables>
16 <rule id="test.match" >
17 <eventType>PIX</eventType>
18 <match>
19 <predicate>
20 <![CDATA [
21 isMemberOf ( &hostAddress, $IPS )
22 ]]>
23 </predicate>
24 </match>
25 <action function=”TECSummary” singleInstance=”true” />
26 </rule>
27 </rules>
� 3. � �� �� ��
�� ��
1 - 2 � ��� ���� DTD � XML ��� �����.
4 �� �����. �� � XML ��� � �����.
� ��� �� ���� ���� ������. � �����(����� �� � �
� �� ��)� ��� ���. � ����� �� �� predicateLib ��� ��
�� ZCE�� � ������ �����.
338 IBM Tivoli Enterprise Console: � �� ���
� 3. � �� �� �� (��)
�� ��
5 - 12 ZCE ������ �� ��� �����.
6 XML ��� �� �� �� ��� �����.
7 ���� ���� �����. � ���� com.tivoli.zce.predicate.
IPredicateBuilder ����� � � ���.
9 - 10 �� ���� �� � � ����� �����. ��� ����� � �
������ �����. ZCE ����� ��� defaultType ����� String
��� ���� �� ��� �� � ���� � ��� String�� ��
���.
13 - 15 ��� �� test �� �� � � ��� �� � � ��� �����.
16 � ID� �����.
17 �� �� � � ��� ���� �����.
18 � ��� �����.
19 - 23 ��� ���� �� � ��� �����.
25 �� ��� � ��� ��� �����.
�� � ��
��� �� �� �� �����. �� �� ��� � 4� ������.
1 <rule id="rules.one" >
2 <match>
3 <predicate>
4 true
5 </predicate>
6 </match>
7 <action function="TECSummary" />
8 </rule>
� 4. �� �� �� ��
�� ��
1 rules.one��� � �� �����.
� ��� �� �� �� ��� SNMP���� �� OID(���� ID) ���� ��
��. � ���� �� �� ��� ��� ��� �����. � �� �� ��� ���
� �� ��� ���� �� ��� �� ��(�: ��)� �� � ���. � ��
�� �� �� ��� ��� �� �����.
rules.*
�� �� ID� ����� � ID� �� �� ����. �� ��, rule.one��� �
�� rule.one.a�� �� �� �� �� ����.
2 �� ��� �����(�: �� �).
4 �� �� ��� ��� �� �����. �� ��� true� ��� � �� �� �
��� �� �����.
� 9 � �� �� �� 339
� 4. �� �� �� �� (��)
�� ��
7 �� �� � ��� ��� � ��� �����.
� ����� ���� �� TECSummary ��� ����. � � ��� �� ���
�� ���� ���� Tivoli ��� � �� �����.
��� � ��
� �� � ���� ���� � �� �� �� ��� ��� ���. ��
�� ��� 341 ���� � 5� ������.
1 <rule id="rules.2" >
2 <eventType>PIX_TCP_in_conn_denied</eventType>
3 <collector timeInterval="10000" >
4 <cloneable
5 attributeSet="pix_sev pix_code pix_ifname"
6 />
7 <predicate>true</predicate>
8 </collector>
9 <action function="TECSummary">
10 <parameters>
11 <![CDATA[
12 SET:msg=SUMMARY_Multiple_TCPIP_Inbound_connections_denied
13 ]]>
14 </parameters>
15 </action>
16 </rule>
� �� ���� ��� ���� �����. �� ��� eventType ��(��
�� ��� ���� ��)� �� �� � � ���. ����� ��
PIX_TCP_in_conn_denied ���� ���� �����. eventType ��� ��
��� ��� �� �������. ��� �� ��� ��� ��� �� �
���.
<eventType>PIX_TCP_in_conn_denied</eventType>
<eventType>new_type_1</eventType>
<eventType>new_type_2</eventType>
...
340 IBM Tivoli Enterprise Console: � �� ���
� 5. �� �� �� ��
�� ��
3 �� �� �� �� �����.
� ��� �� ��� �� � ���� ���� ��� �� ���� �����. ��
��� timeInterval ��� ��� ��, 10,000�� �� �� �����.
4 - 5 � �� �� � � �����. �� �� pix_sev, pix_code, pix_ifname �� ��
�� �����.
��� ��� ��� ��� ��� ��� �� ���. ���� ��� ��� ��
� ����� ��� �� �� ���. ����� �� �� �� �� ���� ��
����� ��� ��� ���� ���� ��� ��� ��� �����. ��� �
�� � �� ���� �� �� ��� ��� � �� � ��� �� �
���. ��� �� �� � � � �� � ��� �� � ���.
7 �� �����.
� ���� �� �� true� ��� ��� ����. cloneable ��� attributeSet
��� ���� ����� ��� � � ���.
9 - 15 TECSummary ��� ���� ��� �� �� �����. � ��� ��� ����
�� � �� ���� ����. � ��� msg ��� SET ����� � ���. ��
���� �� �� �� msg �� �� � ���.
11 - 13 SET:msg=value, � �� �� ���� msg �� �� ���� ��� ��� ���
��.
� � ��
�� ��� � �� � �����. �� �� ��� � 6� ������.
1 <rule id="test.duplicate" > 2 <eventType>TEC_Error</eventType> 3 <duplicate timeInterval="10000"> 4 <predicate> <![CDATA[ 5 &msg == "internal error on my adapter" && 6 &hostname == "hostname1" && 7 &errno = 10 8 ]]> 9 </predicate> 10 </duplicate> 11 </rule>
� 6. �� �� �� ��
�� ��
1 test.duplicate�� � �� �����.
2 �� ���� ��� ��(TEC_Error)� �����. � ��, � ��� ��� ���
� ��� ��� �� eventType ��� � � ���. � ��� ��� ��
�� ���� �����.
3 10,000��(10)� �� ���� � �� �����. � �� �� �� ��� ��
���� �� �����.
4 �� ���� ���� � ���� �� �����.
� 9 � �� �� �� 341
� � ��
�� ��� � �� �� � ��� �� � �����. �� �� ��� � 7
� ������.
1 <rule id="test.threshold"> 2 <eventType>Node_Down</eventType> 3 <threshold thresholdCount="5" timeInterval="60000" 4 timeIntervalMode="slideWindow" triggerMode="allEvents"> 5 <predicate> 6 <![CDATA[ 7 (&msg == "node down") && 8 (isMemberOf(&hostname, [ 192.168./16 ])) 9 ]]> 10 </predicate> 11 </threshold> 12 </rule>
� 7. �� �� �� ��
�� ��
1 test.threshold�� � �� �����.
2 �� ���� ��� ��(Node_Down)� �����. � �� � ��� ��� ���
� ��� ��� �� eventType ��� � � ���. � ��� ��� ��
�� ���� �����.
3 - 4 �� ����� � ��� �� �����.
v ��� � - 5. � �� ���� ��� �� ��� �� �� ���� ����.
v �� �� - 60,000��(1). ���� ���� � �� �� ��� �� ����
���.
v �� �� �� - slideWindow. � �� ���, 1 � 5�� ���� ���� �
��� ����.
v �� �� - allEvents. � ��� ���� ��� �� �� ���� ���� �
���.
5 �� ���� ���� � ���� �� �����.
� � ��
�� ��� randomOrder=true � �� � �����. �� �� ��� 343 �
��� � 8� ������.
1 <rule id="detect_sequence.passThrough" > 2 <eventType>serverStatus</eventType> 3 <passthrough timeInterval="600000" 4 randomOrder="true" > 5 <cloneable ignoreMissingAttributes="false" 6 attributeSet="serverName" /> 7 <predicate> 8 <![CDATA[&serverType == "webserver" && 9 &serverOperational == "Off"]]> 10 </predicate> 11 <predicate> 12 <![CDATA[&serverType == "database" && 13 &serverOperational == "Off" ]]> 14 </predicate>
342 IBM Tivoli Enterprise Console: � �� ���
15 </passthrough> 16 <action function="TECSummary" > 17 <parameters> 18 <![CDATA[ 19 SET:msg=WebServer.Off.Database.Off 20 ]]> 21 </parameters> 22 </action> 23 </rule>
� 8. �� �� �� ��
�� ��
1 detect_sequence.passThrough�� � �� �����.
2 �� ���� ��� ��(serverStatus)� �����. � �� � ��� ��� ���
� ��� ��� �� eventType ��� � � ���. � ��� ��� ��
�� ���� �����.
3 - 4 �� ����� � � �� �����.
v �� �� - 60,000��(1). �� ��� �� � � �� �� �� �� ��
���� ���.
v �� �� �� - true. �� 7 - 14�� �� ��� ��� ���� � �,
���� ����� �� � ���� � �����.
5 - 6 �� serverName ���� ����� �����. �� serverName ��� �� � ��
�� �(null)�� �� �� �� � � ���� ����.
7 - 10 ���� ���� �� ���� �� �� �� �����(serverType =
″webserver″ � serverOperational = ″Off″).
11 - 14 ���� ���� �� ���� �� �� �� �����(serverType = ″database″
� serverOperational = ″Off″).
16 - 22 �� �� ���� �� ���� ��� ��� �����. � ���� ����� �
�� serverType ���� ���� �� � ���� msg � repeat_count ��� ��
�� � TECSummary ��� �����. � ��� �� ���� ����.
�� � ��� � ��
�� ��� randomOrder=false � �� � �����. �� �� ��� 344
���� � 9� ������.
1 <rule id="detect_sequence.resetOnMatch" > 2 <eventType>serverStatus</eventType> 3 <resetOnMatch timeInterval="600000" randomOrder="false"> 4 <cloneable ignoreMissingAttributes="false" attributeSet="serverName"/> 5 <predicate> 6 <![CDATA[&serverType == "webserver" && 7 &serverOperational == "Off"]]> 8 </predicate> 9 <predicate> 10 <![CDATA[&serverType == "webserver" && 11 &serverOperational == "On" ]]> 12 </predicate> 13 </resetOnMatch> 14 </rule>
� 9 � �� �� �� 343
� 9. �� �� �� ��
�� ��
1 detect_sequence.resetOnMatch�� � �� �����.
2 �� ���� ��� ��(serverStatus)� �����. � �� � ��� ��� ���
� ��� ��� �� eventType ��� � � ���. � ��� ��� ��
�� ���� �����.
3 �� ����� � � �� �����.
v �� �� - 60,000��(1). �� ��� �� � � �� �� �� �� ��
���� ���.
v �� �� �� - false. �� ���� ���� 5 ~ 12�� �� �� ��� ��
�� ���� � �����.
4 �� serverName ���� ����� �����. �� serverName ��� �� � ��
�� �(null)�� �� �� �� � � ���� ����.
5 - 8 ���� ���� �� ���� �� �� �� �����(serverType =
″webserver″ � serverOperational = ″Off″).
9 - 12 ���� ���� �� ���� �� �� �� �����(serverType =
″webserver″ � serverOperational = ″On″).
�� �
��� ��� ��� ����, � � ��� ��� �� � ���. �
�� �� �� ��� ���� �� �����. ���� �� , �� � ��
� �� �� ����� �� �� �����.
� ��� 5�� �� ��(String, Float, Int, Boolean � Set)� ���� ����
�. � ��� �� �� ������ ��� �� �� ��, �� ����
�� �� � �� ��� �� ���� ��� ���.
�� ����� ��� �� � ���� �����.
<?xml version="1.0"?>
<!DOCTYPE rules SYSTEM "tecsce.dtd">
<!-- Comments -->
<rules predicateLib="ZCE">
<predicateLib
name="ZCE"
class="com.tivoli.zce.predicates.zce.parser.ZCEPredicateBuilder">
<parameter>
<field>defaultType</field>
<value>String</value>
</parameter>
</predicateLib>
344 IBM Tivoli Enterprise Console: � �� ���
1 <variables scope="test" >
2 <variable name="IPS" type="Set" value="[1.2.3.4 1.2.3.5]" />
<variable name="INTS" type="Set" value="[1-5]" />
<variable name="TRUE" type="Boolean" value="true" />
3 <variable name="PRED1" type="Boolean" >
4 <value> <![CDATA[ (&a1=="1" && true) ]]> </value>
</variable>
</variables>
<rule id="test.match" >
<eventType>PIX</eventType>
<match>
<predicate>
<![CDATA[
5 $PRED1 &&
isMemberOf ( 1.2.3.4, $IPS ) &&
(intset.isMemberOf 4 $INTS ) &&
&a2=="2"
]]>
</predicate>
</match>
<action ...
��� ��� �� �� ��� � ����. � ��� test �� ��� �� �
� �� ��� � �� ��� �����. �� ��� �� ��� ��� �
� ���� � ��� ��� �� ��� � ���. ��� � �� ���
� � ��� �� �����.
� 10. �� �� ��
�� ��
1 ��� ��� �����.
2 IPS ��� �� [1.2.3.4 1.2.3.5] Set ���� �����. IPS� IP �� ����
�.
3 - 4 PRED1 ��� �� �(&a1=="1" && true)�� �����.
XML ���� �� � ��� �� �� ���� ����. �� �� ��(�: PRED1)
� ���� � ��� �����.
5 test.match �� �� test �� �� ��� ��� ��� PRED1 ��� �����.
� 9 � �� �� �� 345
�� �����
� ���� � ������ �� ��� �����. � � � ��� 347 �
��� ��� ��� � � ��� ������.
��
� ������� �� � ��� ���.
� 11. � ������ � ��
�� �� �� �
Integer 2, 444, -44 Long
Float 3.4, 5.122 Float
String ″somestring″, ″John Smith″ java.lang.String
Boolean true, false boolean
StringSet [ ″apples″, ″oranges″], { 1 2 3 } com.tivoli.zce.engine.StringSet
� ���� ��� �� ��� �� ����
��� � � �������.
IntSet [ 1, 3 - 6, 99 ] com.tivoli.zce.predicates.zce.IntSet
IPAddressSet [ 10.1.2.3, 9.4./16, 128.89.9.1 ] com.tivoli.zce.predicates.zce.IPAddressSet
IPAddress 10.1.2.3, 9.4./16 com.tivoli.zce.predicates.zce.IPAddress
��� ���� � �(.)� �����. �� ��,
9.4./16� � ��� ����� �� ����
�.
�� �� IntSet � IPAddressSet ���� ����. IntSet � ��� ��, ��
�(-)�� ��� �����. �� ��, 4 - 8� 4�� 8��� �� �� ���
�. IPAddressSet � ��� ���� ������ ��� �����. �� ��,
9.4.3.2� � IP ����, 9.4./16� 9.4.0.0 - 9.4.255.255 ��� �� IP ���
�����.
��
�� ���� ���� ���� ���� attribute=value ��� � �� ���.
��� ���� � ��� ���� �� ����(&) � �� ����. ��� �
�� �� ��� &hostname�� �����.
�� �� �� ��� ��� �� �� ��� ���� ���� �� ��� �
�� �� �� ���. ��� �� �� �����.
&hostname
� ���� ��
&hostname@0
� ���� ��
346 IBM Tivoli Enterprise Console: � �� ���
&hostname@1
�� ���� �� �, �� ���
&hostname@-3
���� � �� ���� ��
�� ��� �� � ��
� ����� �� ��� � � �� ��� �� �� � ��� �� ��
��� ���.
v ��
v �
v � � � ��
v IP ��
v ��
�� �� �� ��� �� ��� � � ��� � �����. �� ���
� � ��� �� �� ���. �� ���� ��, � ��� ��� �
����.
&arg1 == &arg2
� � ���� �� ��� �� ��� � �����. �� ��, ��� �
���.
(int.eq &arg1 &arg2)
� ���� � � int.eq ��� == �� ��� �����.
�� ��
�� ���� ��� �� �� �� �����.
v ==
v !=
v >
v <
v >=
v <=
== ��� ��, ��. �� �� �� true� �����.
��: ��
==
� 9 � �� �� �� 347
� �
int.eq
��: integer, integer
�: ��
(&integerSlot == 4)
� �
(int.eq &integerSlot 4)
!= ��� ��, �� ��. �� ��� �� �� true� �����.
��: ��
!=
� �
int.ne
��: integer, integer
�: ��
(&integerSlot != 4)
� �
(int.ne &integerSlot 4)
> ��� ��, �� �. �� �� �� ��� � �� true� �����.
��: ��
>
� �
int.gt
��: integer, integer
�: ��
(&integerSlot > 4)
� �
(int.gt &integerSlot 4)
348 IBM Tivoli Enterprise Console: � �� ���
< ��� ��, �� ��. �� �� �� ��� �� �� true� ���
��.
��: ��
<
� �
int.lt
��: integer, integer
�: ��
(&integerSlot < 4)
� �
(int.lt &integerSlot 4)
>= ��� ��, �� �� �� ��. �� �� �� � �� �� true�
�����.
��: ��
>=
� �
int.ge
��: integer, integer
�: ��
(&integerSlot >= 4)
� �
(int.ge &integerSlot 4)
<= ��� ��, �� �� �� ��. �� �� �� � �� �� true�
�����.
��: ��
<=
� �
� 9 � �� �� �� 349
int.le
��: integer, integer
�: ��
(&integerSlot <= 4)
� �
(int.le &integerSlot 4)
�� ��
�� ���� ��� �� �� �� �����.
v +
v -
v *
v /
v absolute
v max
v min
v mod
v negate
v numOfEvents
v range
v timeNow
v timeSpan
+ ��� ��, ���. ��� �� �� ��� �����.
��: ��
+
� �
int.add
��: integer, integer
�: ��
(&integerSlot + 4)
� �
350 IBM Tivoli Enterprise Console: � �� ���
(int.add &integerSlot 4)
- ��� ��, ��. �� ��� �� �� � �� ��� �����.
��: ��
-
� �
int.sub
��: integer, integer
�: ��
(&integerSlot - 4)
� �
(int.sub &integerSlot 4)
* ��� ��, "��. "�� �� �� ��� �����.
��: ��
*
� �
int.mul
��: integer, integer
�: ��
(&integerSlot * 4)
� �
(int.mul &integerSlot 4)
/ ��� ��, ���. �� �� �� �� �� �� ��� �����.
��: ��
/
� �
int.div
� 9 � �� �� �� 351
��: integer, integer
�: ��
(&integerSlot / 4)
� �
(int.div &integerSlot 4)
absolute �� �� �� �� �����.
��: ��
abs(..)
� �
int.abs
��: integer
�: ��
abs(&integerSlot)
� �
(int.abs &integerSlot)
max �� �� ���� ���� �����. � ��� �� �����.
��: ��
max(..)
� �
int.max
��: integer*
�: ��
max(&integerSlot, 4)
� �
(int.max &integerSlot 4)
352 IBM Tivoli Enterprise Console: � �� ���
min �� �� ���� ���� �����. � ��� �� �����.
��: ��
min(..)
� �
int.min
��: integer*
�: ��
min(&integerSlot, 4)
� �
(int.min &integerSlot 4)
mod �� �� �� �� �� �� �� �� �����.
��: ��
%
� �
int.mod
��: integer, integer
�: ��
(&integerSlot % 4)
� �
(int.mod &integerSlot 4)
negate �� �� ��� �����.
��: ��
neg(..)
� �
int.neg
��: integer
� 9 � �� �� �� 353
�: ��
neg(&integerSlot)
� �
(int.neg &integerSlot)
numOfEvents ���� �� �� ���� ���� ��� �
��: ��
numOfEvents()
� �
int.numOfEvents
��: �� ����.
�: ��
numOfEvents()
� �
(int.numOfEvents)
range �� � �� ���� ��� ��� �����. � ��� �� �����.
��: ��
range(..)
� �
int.range
��: integer*
�: ��
range(&integerSlot, 4, 100)
� �
(int.range &integerSlot 4 100)
timeNow 1970 1� 1� 00:00:00 GMT ��� � ��(�� �)� �����.
��: ��
timeNow()
354 IBM Tivoli Enterprise Console: � �� ���
� �
int.timeNow
��: �� ����.
�: ��
timeNow()
� �
(int.timeNow)
timeSpan �, � � ��� ��� ���� ��� �����.
��: ��
timeSpan(..)
� �
int.timeSpan
��: integer, integer, integer
�: ��
timeSpan(hours, mins, seconds)
� �
(int.timeSpan hours mins seconds)
� ��
�� ���� ��� � �� �� �����.
v ==
v !=
v >
v >=
v <
v <=
== ��� ��, ��. �� �� �� true� �����.
��: ��
==
� 9 � �� �� �� 355
� �
float.eq
��: float, float
�: ��
(&floatSlot == 4.0)
� �
(float.eq &floatSlot 4.0)
!= ��� ��, �� ��. �� ��� �� �� true� �����.
��: ��
!=
� �
float.ne
��: float, float
�: ��
(&floatSlot != 4.0)
� �
(float.ne &floatSlot 4.0)
> ��� ��, �� �. �� �� �� ��� � �� true� �����.
��: ��
>
� �
float.gt
��: float, float
�: ��
(&floatSlot > 4.0)
� �
(float.gt &floatSlot 4.0)
356 IBM Tivoli Enterprise Console: � �� ���
>= ��� ��, �� �� �� ��. �� �� �� � �� �� true�
�����.
��: ��
>=
� �
float.ge
��: float, float
�: ��
(&floatSlot >= 4.0)
� �
(float.ge &floatSlot 4.0)
< ��� ��, �� ��. �� �� �� ��� �� �� true� ���
��.
��: ��
<
� �
float.lt
��: float, float
�: ��
(&floatSlot < 4.0)
� �
(float.lt &floatSlot 4.0)
<= ��� ��, �� �� �� ��. �� �� �� � �� �� true�
�����.
��: ��
<=
� �
� 9 � �� �� �� 357
float.le
��: float, float
�: ��
(&floatSlot <= 4.0)
� �
(float.le &floatSlot 4.0)
� ��
�� ���� ��� � �� �� �����.
v +
v -
v *
v /
v absolute
v max
v min
v negate
v range
+ ��� ��, ���. ���� �� � ��� �����.
��: ��
+
� �
float.add
��: float, float
�: ��
(&floatSlot + 4.0)
� �
(float.add &floatSlot 4.0)
358 IBM Tivoli Enterprise Console: � �� ���
- ��� ��, ��. �� ��� �� �� � � ��� �����.
��: ��
-
� �
float.sub
��: float, float
�: ��
(&floatSlot - 4.0)
� �
(float.sub &floatSlot 4.0)
* ��� ��, "��. "�� �� � ��� �����.
��: ��
*
� �
float.mul
��: float, float
�: ��
(&floatSlot * 4.0)
� �
(float.mul &floatSlot 4.0)
/ ��� ��, ���. �� �� �� �� �� � ��� �����.
��: ��
*
� �
float.div
��: float, float
� 9 � �� �� �� 359
�: ��
(&floatSlot / 4.0)
� �
(float.div &floatSlot 4.0)
absolute � �� �� �� �����.
��: ��
abs(..)
� �
float.abs
��: float
�: ��
abs(&floatSlot)
� �
(float.abs &floatSlot)
max � �� ���� ���� �����. � ��� �� �����.
��: ��
max(..)
� �
float.max
��: float*
�: ��
max(&floatSlot, 4.0)
� �
(float.max &floatSlot 4.0)
min � �� ���� ���� �����. � ��� �� �����.
��: ��
min(..)
360 IBM Tivoli Enterprise Console: � �� ���
� �
float.min
��: float*
�: ��
min(&floatSlot, 4.0)
� �
(float.min &floatSlot 4.0)
negate � �� ��� �����.
��: ��
neg(..)
� �
float.neg
��: float
�: ��
neg(&floatSlot)
� �
(float.neg &floatSlot)
range �� � �� ���� ��� ��� �����. � ��� �� �����.
��: ��
range(..)
� �
float.range
��: float*
�: ��
range(&floatSlot, 4.0, 100.5)
� �
(float.range &floatSlot 4.0 100.5)
� 9 � �� �� �� 361
�� ��
�� ���� ��� � �� �� �����.
v ==
v !=
v >
v >=
v <
v <=
v endsWith
v ignorecase equal
v ignorecase not equal
v startsWith
== ��� ��, ��. �� �� �� true� �����.
��: ��
==
� �
string.eq
��: string, string
�: ��
(&stringSlot == "somestr")
� �
(string.eq &stringSlot "somestr")
!= ��� ��, �� ��. �� ��� �� �� true� �����.
��: ��
!=
� �
string.ne
��: string, string
�: ��
362 IBM Tivoli Enterprise Console: � �� ���
(&stringSlot != "somestr")
� �
(string.ne &stringSlot "somestr")
> ��� ��, �� �. �� �� �� ��� � �� true� �����.
��: ��
>
� �
string.gt
��: string, string
�: ��
(&stringSlot > "somestr")
� �
(string.gt &stringSlot "somestr")
>= ��� ��, �� �� �� ��. �� �� �� � �� �� true�
�����.
��: ��
>=
� �
string.ge
��: string, string
�: ��
(&stringSlot >= "somestr")
� �
(string.ge &stringSlot "somestr")
< ��� ��, �� ��. �� �� �� ��� �� �� true� ���
��.
��: ��
� 9 � �� �� �� 363
<
� �
string.lt
��: string, string
�: ��
(&stringSlot < "somestr")
� �
(string.lt &stringSlot "somestr")
<= ��� ��, �� �� �� ��. �� �� �� � �� �� true
� �����.
��: ��
<=
� �
string.le
��: string, string
�: ��
(&stringSlot <= "somestr")
� �
(string.le &stringSlot "somestr")
contains �� �� �� �� �� � �� true� �����.
��: ��
contains(..)
� �
string.contains
��: string, string
�: ��
contians(&stringSlot, “somestr")
364 IBM Tivoli Enterprise Console: � �� ���
� �
(string.contains&stringSlot "somestr")
endsWith �� �� �� �� ��� �� true� �����.
��: ��
endsWith(..)
� �
string.endsWith
��: string, string
�: ��
endsWith(&stringSlot, “somestr")
� �
(string.endsWith &stringSlot "somestr")
ignorecase equal �� �� �� true� �����. � � ���� �����.
��: ��
iceq(..)
� �
string.iceq
��: string, string
�: ��
iceq(&stringSlot, “somestr")
� �
(string.iceq &stringSlot "somestr")
ignorecase not equal �� ��� �� �� true� �����. � � ���� �����.
��: ��
icne(..)
� �
string.icne
� 9 � �� �� �� 365
��: string, string
�: ��
icne(&stringSlot, “somestr")
� �
(string.icne &stringSlot "somestr")
startsWith �� �� �� �� � ���� �� true� �����.
��: ��
startsWith(..)
� �
string.startsWith
��: string, string
�: ��
startsWith(&stringSlot, “somestr")
� �
(string.startsWith &stringSl