Highlighted
Absent Member.. Lätitia Absent Member..
Absent Member..
754 views

HOW i get OMU Variables in Messages?

hi folks, i´m interessting in solve such work with the Tools Section in OMU.

in some cases i´d like to handle messages via operator gui (right mouseclick and "start" a script). This script should catch all necessary variables like

node, application, msggrp, objekt and message text.

is there a chance to get these variables in cage?


e.g.

i received a message like this:

Severity:critical
Time Received: 07:33.21 06.12.13
Node: testnode
Application: Backup
MsgGrp: Linux
Object: DB
Message_Text: "234789 Backup of DB unsuccsessful"


so if i see this message in the operator gui, i´ll click (right mousebutton) on this message and i´d like to start a selfmade script which is able to handle all variables in the message. --> $node_name, $msg_text, $application, and so on.

how can i get these variables?? is it possible to catch it for further process?

to get, e.g. the object of the message i try something in a script like that:

echo $MSG_OBJECT
echo <$MSG_OBJECT>
echo "<$MSG_OBJECT>"


to prove if i can see something, but i got no results....

 

i need this information to handle some scenarios via script.

any ideas?


thanks in advance

 

Letitia

0 Likes
4 Replies
Goran Koruga Absent Member.
Absent Member.

Re: HOW i get OMU Variables in Messages?

Hello.

 

Please read this chapter(s) in the Admin. Ref. Guide  to find the right variable names:

 

Variables in Application Calls and the User Interface
Variables for Applications Started from the Java GUI

An example parameter would be:

 

$OPC_MSG.OBJECT

Regards,

     Goran

0 Likes
Absent Member.. Lätitia Absent Member..
Absent Member..

Re: HOW i get OMU Variables in Messages?

Hi Goran, thanks for your response.

 

i simply try an echo to check if the variable is charged with a value or not.

 

a script like that, applied on the message

 

#!/usr/bin/ksh
echo 1
echo $OPC_ENV
echo $OPC_EXT_NODES
echo $OPC_MSG_NODES
echo $OPC_MSG_GEN_NODES
echo $OPC_MSG_IDS
echo $OPC_MSGIDS_ACT
echo $OPC_NODE_LABELS
echo $OPC_MSG.SEVERITY
echo $OPC_MSG.TEXT
echo $OPC_EXACT_SELECTED_NODE_LABELS
echo $OPC_GUI_CLIENT
echo $OPC_NODE_LABELS



 

brings output like that:

 

Tool started, please wait
_______________________________________________________________________________
          Command Output                No. 1 of 1
                                        Node: nodename
                                        Time: 12/06/13 11:12:26

1







.SEVERITY
.TEXT



logout root

 

Maybe i missunderstood or vice versa, i know the variablenames ..... iam looking for a way  to show it.

 

Thanks in advance.

 

 

0 Likes
Goran Koruga Absent Member.
Absent Member.

Re: HOW i get OMU Variables in Messages?

Hello.

 

It doesn't work that way - you need to pass the values you want via the call parameters:

 

.../bin/mycall $OPC_MSG.SEVERITY $OPC_MSG.OBJECT ...

 

Then access these as parameters in your script. How to do this depends on the language your script is written in (shell, perl etc.).

 

Regards,

    Goran

0 Likes
Goran Koruga Absent Member.
Absent Member.

Re: HOW i get OMU Variables in Messages?

Ahh I see you have 'ksh' there so for a test this shall work

 

echo "$@"

 

or:

 

echo "1:[$1]" "2:[$2]" "3:[$3]" ...

 

Regards,

     Goran

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.