Operating System - HP-UX
1855765 Members
10191 Online
104103 Solutions
New Discussion

searching for Tivoli events

 
Simon Deeley
Occasional Contributor

searching for Tivoli events

I need to search a tivoli data file that contains events similar to the one below:

PL_Std_11_ALARM;
server_handle=1;
date_reception=1003186839;
event_handle=1;
source=PATROL;
sub_source=NT_CACHE;
origin=0.0.0.0;
sub_origin=NT_CACHE.NT_CACHE;
hostname=12345;
adapter_host=12345;
status=CLOSED;
administrator='';
acl=[ admin];
severity=CRITICAL;
date='Oct 16 00:00:39';
duration=61;
msg='''CACcachCopyReadHitsPercent;
msg_catalog='';
msg_index=0;
num_actions=0;
credibility=0;
repeat_count=0;
cause_date_reception=0;
cause_event_handle=0;
last_update=N/A;
pevt_catalog=0;
pevt_class=11;
pevt_instance=NT_CACHE.NT_CACHE;
pevt_parm=CACcachCopyReadHitsPercent;
pevt_severity=4;
pevt_status=1;
pevt_type=ALARM;
smcpet_version=3.2;
trouble_ticket=no;
END

the criteria I want to search on are the first line and the "sub_source=" line. I have a number of events to search for based on these.
If someone can come up with a script that will search for events and then append them to a file.
the events are similar but some have more lines than others, but they all end with "END"

thanks.