Highlighted
Absent Member.. tamerelkadi Absent Member..
Absent Member..
1515 views

Custom Message text from original message

Jump to solution

Hello

 

I was wondering how to make the message displayed to the operators in the message browser be only a part/paragraph of the original message ?

 

The thing is I have a windows event log monitor that reads evenets created by IBM TPC that monitors CPUs, Utilization, Ports, Memory, ... etc. of storage devices like SANs.

 

A sample of the error is attached.

 

Another sample:

 

 

Computer: TPC01-HQ.hodomain.local
Source: TSRM1
Category: None
Type: Warning
Event ID: 142
Description: The description for Event ID ( 142 ) in Source ( TSRM1 ) could not be found. It contains the following insertion string(s): ALR0501W: Alert superuser.OCC_Disk Utilization Percent has been triggered.

The Disk Utilization Percentage of array 2107.75BNP61-A12 in storage subsystem DS8000-2107-75BNP61-IBM was measured to be 62.92%, which violated the defined warning-stress boundary value of 60.00%.
Alert ID = 18204923
View Alert =Link
View Resource = link 

 

 

 

 

Computer: TPC01-HQ.hodomain.local
Source: TSRM1
Category: None
Type: Warning
Event ID: 152
Description: The description for Event ID ( 152 ) in Source ( TSRM1 ) could not be found. It contains the following insertion string(s): ALR0540E: Alert superuser.OCC_MainDS8K_PortResponseTime has been triggered.

The Overall Port Response Time of port R1-I2-C1-T1 in storage subsystem DS8000-2107-75ADF91-IBM was measured to be 5.40 ms/op, which violated the defined critical-stress boundary value of 5.00 ms/op.
Alert ID = 18985899
View Alert = link
View Resource = link

Tags (3)
0 Likes
1 Solution

Accepted Solutions
Acclaimed Contributor.. Pat Campbell Acclaimed Contributor..
Acclaimed Contributor..

Re: Custom Message text from original message

Jump to solution

You can use pattern matching to assign portions of the text to a variable, then use the variable in the Message Text.

 

To identify the string you want, you need to match on patterns on both sides of it:

 

Condition Match TEXT: "been triggered.<*.mytext>Alert ID "

 

Condition Message TEXT: "<mytext>"

12 Replies
Absent Member.. tamerelkadi Absent Member..
Absent Member..

Re: Custom Message text from original message

Jump to solution

Any one have any idea how to do that please ?

0 Likes
Acclaimed Contributor.. Pat Campbell Acclaimed Contributor..
Acclaimed Contributor..

Re: Custom Message text from original message

Jump to solution

You can use pattern matching to assign portions of the text to a variable, then use the variable in the Message Text.

 

To identify the string you want, you need to match on patterns on both sides of it:

 

Condition Match TEXT: "been triggered.<*.mytext>Alert ID "

 

Condition Message TEXT: "<mytext>"

Absent Member.. tamerelkadi Absent Member..
Absent Member..

Re: Custom Message text from original message

Jump to solution
thank you sooooo much.
🙂

I am now trying to put that in a file using this automatic command

cmd /c echo +201003690074+201001005556+201002598800 The following event occurred on TPC: <mytext>. >C:\smsout.txt


I will feedback after trial. I may try <$MSG_TEXT>. hope it works.
0 Likes
Absent Member.. tamerelkadi Absent Member..
Absent Member..

Re: Custom Message text from original message

Jump to solution
well, I have tried <mytext> and <$MSG_TEXT> but none worked.
Even after putting them in 'and "

The thing is when I write something like "blaaa" instead of <MSG_TEXT>, it works fine.


Can it be fixed or is the problem with the command ?
0 Likes
Acclaimed Contributor.. Pat Campbell Acclaimed Contributor..
Acclaimed Contributor..

Re: Custom Message text from original message

Jump to solution

I suspect that there is a special character in your text that is causing your echo command to fail.  Is the text showing in the message as expected?

0 Likes
Absent Member.. tamerelkadi Absent Member..
Absent Member..

Re: Custom Message text from original message

Jump to solution
Yes, but there are spaces before the text and after the text.

0 Likes
Absent Member.. tamerelkadi Absent Member..
Absent Member..

Re: Custom Message text from original message

Jump to solution
Till now using <$MSG_TEXT> does not work unless I set it manually.
0 Likes
Absent Member.. tamerelkadi Absent Member..
Absent Member..

Re: Custom Message text from original message

Jump to solution
Anyone has any ideas?
The problem is if I make the initiate command like this "cmd /c echo +20100400 <MSG_TEXT>. >c:\smsout.txt" it does not work, but if I use "cmd /c echo anything, it works.
0 Likes
Acclaimed Contributor.. Pat Campbell Acclaimed Contributor..
Acclaimed Contributor..

Re: Custom Message text from original message

Jump to solution
did you try <$MSG_TEXT> instead of <MSG_TEXT> ?
0 Likes
Acclaimed Contributor.. Pat Campbell Acclaimed Contributor..
Acclaimed Contributor..

Re: Custom Message text from original message

Jump to solution
Another thought, if putting the $ in <$MSG_TEXT> does not fix the problem, maybe the cmd command is interpretting the < and > as redirection symbols. You could try escaping them. I am not a DOS guy, but it looks like the escape symbol is a ^ for < and >.
0 Likes
Absent Member.. tamerelkadi Absent Member..
Absent Member..

Re: Custom Message text from original message

Jump to solution

Thanks PAT, I will try it and feedback.

 

0 Likes
Absent Member.. tamerelkadi Absent Member..
Absent Member..

Re: Custom Message text from original message

Jump to solution

well that did not work either.

 

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.