HP Operations Manager for Windows

IOvRemoteAgent::StopAgentAsync


Shut down (stop) all configured agents except the HP Operations Control Agent on the specified systems.

HRESULT StopAgentAsync(
[in] VARIANT varNodePrimNames,
[in] VARIANT varNodeIds,
[in] VARIANT varNodeGroupPaths,
[in] VARIANT varNodeGroupIds,
[in, optional, defaultvalue(0)] VARIANT_BOOL bInclSubGroups,
[in, optional, defaultvalue(0)] long nSubAgentId
);

Parameters

varNodePrimNames
String or array of strings containing primary node names. To find data on specified nodes, members of varNodePrimNames are matched with whatever was entered as the PrimaryNodeName property of the OV_ManagedNode WMI instance.

If an exact match cannot be found, the behavior is as follows: If a node is specified without a domain, it is compared with a short name (until the first '.') in all OV_ManagedNode WMI instances that have entered FQDN as a Primary Node Name. Otherwise, if a node is specified with FQDN, a short name (until the first '.') is compared with an exact match (also a short name) in OV_ManagedNode WMI instances.

If more than one matching OV_ManagedNode WMI instance is found, an error is reported.

varNodeIds
String or array of strings containing node IDs (names). To find data on specified nodes, members of varNodeIds are matched with whatever was entered as the Name property of the OV_ManagedNode WMI instance.

varNodeGroupPaths
String or array of strings containing a full node group path, as shown in the console tree, starting under the nodes. The path must begin with a backslash ("\"). All node groups within the path must begin with a backslash ("\").

Node groups in the path are identified with the node group caption (that is, the Caption property of the OV_NodeGroup WMI instance).

varNodeGroupIds
String or array of strings containing the node group IDs (names). Node groups are identified with whatever was entered in the Name property of the OV_NodeGroup WMI instance.

bInclSubGroups
Optional parameter. VARIANT_TRUE includes the nodes of all subgroups of the specified node groups (parameters varNodeGroupPaths and varNodeGroupIds). VARIANT_FALSE (default) does not enumerate subgroups.

nSubAgentId
Optional parameter. ID of the subagent on which to perform the remote administration. Default is 0 (all subagents).

Returning Parameter

None.

HRESULT Return Values

S_OK
Asynchronous administration started successfully.

(FAILED)
An error occurred. The asynchronous operation could not be started. IErrorInfo was created. A detailed error description is traced.

Description

The StopAgentAsync method shuts down (stops) all configured agents except the HP Operations Control Agent on the specified systems.

Nodes are specified with some or all of the following parameters:

If any parameter is not used, it should be passed to the method as an empty Variant.

Even when the node is included in more than one parameter, remote administration is performed only once.

To also include all subgroups of the specified node group, call the method with the parameter bInclSubGroups set to VARIANT_TRUE. It defaults to VARIANT_FALSE (subgroups will not be enumerated).

To specify all managed nodes, specify a string with a single backslash character ("\") as a parameter varNodeGroupPaths, leave the parameters varNodePrimNames, varNodeIds, and varNodeGroupIds empty, and set the parameter bInclSubGroups to VARIANT_TRUE.

This is an asynchronous method. For a comparison of the synchronous and asynchronous methods, see the description of the IOvRemoteAgent interface.