Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TEC: create_event_sequence predicate

Status
Not open for further replies.

PhilODonnell

Technical User
Jun 26, 2006
1
US
To all TEC rule writing gurus, I need your help.

I have a requirement to write a rule which performs the following:

IF an event is received with the CLASS of ‘IOM_B_Failed’ and an event of ‘IOM_BS_Failed’ is already in the cache
WHERE a certain piece of information within the slot objectname are the same then drop the incoming event.

Within the objectname slot there is some text I need to extract and use this as the test eg. objectname=sometext1,host=x.y.z,port=999

I want the value assigned to host, in this instance x.y.z

I could setup
re_create(_searchobjectname, ‘(.*host=)(\S+)\,(.*)’)
within a ‘TEC_Start’

then I could use something like

re_match(_searchobjectname,_objectname,2, _result)

where _result would hopefully equal x.y.z.

Now the problem I have is how can I use this information within the create_event_sequence predicate as I cannot use the _result information as its not a slot. My understanding of this predicate is that you can only compare slot values.

If I cannot use create_event_sequence does anyone else have any ideas how I can compare the information within the objectname slot for 2 TEC CLASSES that would achieve my initial description?

Any help would be appreciated.

Cheers

Phil O’Donnell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top