Adding Remote Agents in Bulk

Remote Agent Addition Using an XML File

The XML file created for the sole purpose of adding multiple remote agents to the eG Enterprise system at one go, should contain entries of the following format:

<?xml version="1.0" encoding="UTF-8"?>

<RemoteAgent action="add">

        <Agent>

        <Details of Remote Agent1>

        </Agent>

        <Agent>

        <Details of Remote Agent2>

        </Agent>

            .

            .

            .

    </RemoteAgent>

For instance:

<?xml version="1.0" encoding="UTF-8"?>

    <RemoteAgent action="add">

        <Agent>

        <hostip>192.168.10.8</hostip>

        <agentname>ext8</agentname>

        </Agent>

        <Agent>

        <hostip>192.168.10.9</hostip>

        <agentname>ext9</agentname>

        </Agent>

    </RemoteAgent>

If you wish to add a remote agent using the host name instead of the host IP, then your specification should be as follows:

<?xml version="1.0" encoding="UTF-8"?>

    <RemoteAgent action="add">

        <Agent>

        <hostname>egurkha25</hostname>

        <agentname>ext8</agentname>

        </Agent>

        <Agent>

        <hostname>egurkha26</hostname>

        <agentname>ext9</agentname>

        </Agent>

    </RemoteAgent>

Note that the XML tags are the same as the input parameters of the ‘AddRemoteAgent’ command supported by eG CLI (see Adding Remote Agents).

Note:

  • Every Group specification should be included within the main <RemoteAgent></RemoteAgent> block only.
  • A single XML file should not contain more than one <RemoteAgent></RemoteAgent> block.
  • An XML file that is created for adding groups should not include sections pertaining to any other operation.

Once the XML file is created on the orchestrator’s host, invoke the following command from the orchestrator to add multiple remote agents to the eG Enterprise system:

eGCLI AddRemoteAgent -managerid <ManagerID> -file <Fullpath_to_the_XML_file>

For example:

eGCLI AddRemoteAgent -managerID mgr153 -file c:\addremagent.xml

Remote Agent Addition Using a CSV File

The CSV file created specifically for adding multiple remote agents to the eG Enterprise system, should contain the following entries:

Element,action

RemoteAgent,add

hostip,agentname

<Details of remoteagent1>

<Details of remoteagent2>

<Details of remoteagent3>

.

.

.

.

For instance:

Element,action

RemoteAgent,add

hostip,agentname

192.168.10.8,rem8

192.168.10.10,rem10

192.168.10.12,lin12

If you use the host name instead of hostip, then your specification should be:

Element,action

RemoteAgent,add

hostname,agentname

egurkha25,rem8

egurkha26,rem10

egurkha27,lin12

Note that the column names (hostip,hostname) used here are the same as the input parameters of the ‘AddemoteAgent’ command supported by eG CLI (see Adding Remote Agents).

Once the CSV file is created on the orchestrator’s host, invoke the following command from the orchestrator to add multiple remote agents to the eG Enterprise system:

eGCLI AddRemoteAgent -managerid <ManagerID> -file <Fullpath_to_the_CSV_file>

For example:

eGCLI AddRemoteAgent -managerID mgr153 -file c:\addremagent.csv