HP Operations Manager for Windows

Agent Message API


HPOM provides a set of APIs to handle messages on managed nodes. These functions enable you, for example, to send messages and acknowledge them at a later time. See Agent Monitor API for functions to send monitor values.

Data Structures

OPCDTYPE_MESSAGE_ID

OPCDTYPE_MESSAGE

Usage

The managed node processes must be running. To use the functions, include the header file opcapi.h in your application.

Prerequisites

Each opdata structure must be allocated using opcdata_create() before it can be used in any of these functions. After the execution of your program, each opcdata structure must be freed using opcdata_free().

Multithread Usage

All function of the Agent Message API are safe to be called by multithreaded applications, and are thread-safe for both POSIX Thread and DCE User Threads. They are neither async-cancel, async-signal, nor fork-safe, and cannot be safely called in kernel threads.

Agent Configuration

Operations on messages out of managed nodes require to send these message operations to the manager. Unfortunately it is not possible to deliver the responsible manager of a message from the message ID. Additionally, the configuration could be changed since the message was sent so that it is necessary to send the message operation to all managers. This can produce a lot of network load.

To prevent this, the message agent holds information about the manager to which the messages were sent. After a defined time, the information is deleted to save memory, disk space, and processing time. This time is configurable with a nodeinfo policy using the parameter OPC_STORE_TIME_FOR_MGR_INFO. The specified value is the time in hours, with a default setting of one hour if this parameter is not changed.

OPC_STORE_TIME_FOR_MGR_INFO 2

The storage of the manager information must be enabled for each message to be sent by setting the message parameter OPCDATA_DATA_INFO to OPC_REMARK_FOR_ACK.

opcdata_set_long(message, OPCDATA_DATA_INFO, OPC_REMARK_FOR_ACK);

opcmsg()

opcagtmsg_send()

opcagtmsg_ack()