HP Operations Manager

opcmsg


The command 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 configure the message, the message can be:

The behavior of messages depends on the configuration of interceptors (or opcmsg policies). A message may be created, or may be suppressed. For example, you might have a suppress condition in the opcmsg policy, which for example suppresses all messages with application=Test.

If you have such a condition and submit the call:

opcmsg application=Test msg_text="Test message"

then you will not get a message in the browser (it has been suppressed). The message interceptor must be configured with at least one Open Message interface policy and be running on the managed node, otherwise the opcmsg command will fail.

Command synopsis

opcmsg [ -help ] [ -id ] application=<application> object=<object name> msg_text="<message_text>" [ severity=<severity label> ] [ msg_grp=<message_group> ] [ node=<node Name> ] [ service_id=<service name> ] [ -option variable=<value> ]*

Options
You can specify any unique prefix for the available options. Note that the prefix for the option severity is s while the prefix for the option service_id is ser.

Exit Values

This command exits with value zero after a message is successfully generated; in case of an internal error, 1 is returned and an error message displays. If a syntax or usage error is detected, 2 is returned and an error message displays.

Restrictions

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

Example

To submit a normal message issued when a user logs onto the system, you could set up the following scheduled task

opcmsg appl=ScheduledTask obj=login severity=normal msg_g=Security msg_t="%USERNAME% logged onto system %COMPUTERNAME%"

Related Topics: