HP Operations Manager

Automation Wrapper: opcmsg


The automation interfaces for the HPOM command line tools have the same functionality as the tools themselves. The automation interface is basically a wrapper around the HPOM Interface API, which is part of the HPOM Application Integration Guide (AIG).

For example, you can submit a message to HP Operations Manager for Windows using the automation wrapper for opcmsg, as follows.

The object OVOAutomation.opcmsg generates a message for HP Operations Manager. Before the message is submitted, it is interpreted by the HP Operations Message Interceptor on the local managed node where the command is executed. Depending on how you configured the message interceptor, the message can be:

The message interceptor must be configured and running on the managed node or the send() function of the object  OVOAutomation.opcmsg will fail.

The following parameters and functions are available for the object:

 

Parameter Access Type Description
Application In Name of application or script/program which is affected by or detected the event/problem.
Object In Object which is affected by or has detected the event/problem.
MessageText In Descriptive text explaining the event/problem in more detail.
Severity In Specifies the severity of the message. The following severities are supported: normal, warning, minor, major, and critical. By default, severity normal is applied.
MessageGroup In Default message group to which the message belongs. By default, no message group is assigned.
Nodename In System on which the event/problem is detected. By default, the name of the current system is applied.
ServiceId In
OptVar In Optional variable to be used in the message interceptor.
MessageId Out Unique ID of the message generated by HP Operations Manager. Parameter cannot be retrieved before calling functions
Functions Description
Send() Sends the message to the Message Action Server. All mandatory parameters have to be set before calling this function.

Example

Dim msgObj
Set msgObj = CreateObject("OVOAutomation.Opcmsg")

msgObj.MessageText = "My automated message"
msgObj.Application = "My automated application"

msgObj.MessageGroup = "My Message Group"
msgObj.Object = "My Object"
msgObj.Nodename = "HOSTNAME"
msgObj.Severity = "warning"
msgObj.ServiceName = "My Service"

msgObj.Send()

Restrictions

This function can be run by any user. The message group (msg_grp), the object, and the application parameter must not be longer than 32 bytes; this is the maximum size HP Operations can handle with these parameters.

Examples

The examples are available on the management server in the following directory:

%OvInstallDir%\examples\OvOW\DevelopmentKit\Agent\VBScript

Related Topics