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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Message record &TEXT

Status
Not open for further replies.

LaysonS

Technical User
Feb 14, 2003
6
0
0
GB
Under NT (TNG 2.4) CaiLogA2,
I currently trap a message EXTIDS :Error. From the NT Application log thats nice and easy.
Recently developers have requested that with the same error (EXTIDS : Error) that if the string for the same error contains the words (Server down system is inactive) then they need a seperate message.

So the question is I would like to have one message record and correlate on the message text.

Has anyone out there (Under TNG EM) managed to take &TEXT and extract a word/s into a usable variable to work with for correlation ?

I would like to say take the 17th word from &TEXT and pass this into SETENVSH <Var> <Var>.. then test this variable for a possible second variation on the event.

1 . SNMP trap Peter is happy
= Basic Alert
2 . SNMP trap Peter is happy not
= Different Alert

Where Peter is happy is the log watcher.

Same log watcher just traping on the additional text (not)rather than having multiple log watchers and Send/DelKeeps in the conlog.

Any advise .... ?

Regards, Steve.
 
Hello Steve

You can test each single word of the message.
The words are reference by a '&' and the word's number. The 17th word would be &17.
For example, if the message is &quot;Peter is happy not&quot;, you can test the presence of &quot;not&quot; with the command 'TEST' and this syntax:
'&4' = 'not'
In the next step you can create a conlog message if the condition code is 0.

Let me know if you need more informations.

Regards
Leandro
 
Leandro,

Many thanks for the advise, Works well.
I must admit that I got there anyway by hacking bits from JonnoGT's reply to Techpearl (Jan 21 03).

Thanks ... Steve.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top