You can attach or detach up to five target profiles from the serviceability agents.
Procedure
Log in to System Manager as a cust user, then log in as a root user using the command su -root.
At the prompt, type sh attachDetachSnmpTargetDest.sh -d <TargetName> -o <attachTargetProfile|detachTargetProfile> -a <AgentList> to run the command and press Enter.
-d: An existing target profile name.
-o: The operation name. The possible values are attachTargetProfile or detachTargetProfile.
-a: The list of agents in the form of a comma-separated list of activated agent IP addresses. The maximum is 5.
-h: Provides help for CLI.
If the agent list size is greater than one and more than one agent is active, then jobName will be non-empty for a successfully attached or detached target profile.
If you execute the attach or detach operation for multiple active agents in a single command then the job is scheduled. To see the result, use the following script: listTargetsAgents.sh
If there is an inactive agent, the response body contains an error message to indicate that an agent is in an inactive state.