Adding Components in Bulk

Component Addition Using an XML File

Typically, a dedicated XML file is required for each operation that needs to be performed by eG CLI. For instance, to add components in bulk, you will require a single XML that has to be configured with the details of only those components that need to be added to the eG Enterprise system. The XML created for the sole purpose of adding components should contain entries of the following format:

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

<Component action="add">

    <Agent>

    <Details of component1>

    </Agent>

    <Agent>

        <Details of component2>

    </Agent>

            .

            .

            .

            .

</Component>

Within each <Agent> </Agent> segment in the XML block above, you need to provide the details of a component to be added. For instance, to add 2 Oracle database server components at the same time using the host IP of the component, your XML specification would be:

<Component action="add">

    <Agent>

    <componenttype>Oracle database</componenttype>

    <hostip>192.168.10.8</hostip>

    <componentname>ora8</componentname>

    <port>1521</port>

    <sid>egora</sid>

    <ispassive>no</ispassive>

    <externalagents>192.168.10.152</externalagents>

    </Agent>

    <Agent>

    <componenttype>Oracle database</componenttype>

    <hostip>192.168.10.9</hostip>

    <componentname>ora9</componentname>

    <port>1521</port>

    <sid>egdemo</sid>

    <ispassive>no</ispassive>

    <externalagents>192.168.10.152</externalagents>

    </Agent>

</Component>

If you would like to add 2 Oracle databse server compoennts at the same time using the host name of the component, your XML specification would be:

<Component action="add">

    <Agent>

    <componenttype>Oracle database</componenttype>

    <hostname>egurkha25</hostip>

    <componentname>ora8</componentname>

    <port>1521</port>

    <sid>egora</sid>

    <ispassive>no</ispassive>

    <externalagents>192.168.10.152</externalagents>

    </Agent>

    <Agent>

    <componenttype>Oracle database</componenttype>

    <hostname>egurkha26</hostname>

    <componentname>ora9</componentname>

    <port>1521</port>

    <sid>egdemo</sid>

    <ispassive>no</ispassive>

    <externalagents>192.168.10.152</externalagents>

    </Agent>

</Component>

While the XML tags such as <componenttype>, <hostip>, etc. cannot be altered, the data contained within each tag can change depending upon the component being added. Note that the XML tags are the same as the input parameters of the ‘AddComponent’ command supported by eG CLI (see Adding Components).

You can remove tags that you deem are unnecessary for a component specification - for eg., while adding a non-port-based component, you may want to omit the <port></port> tag. Likewise, you can even add more tags depending upon the nature of components to be added.

If say, a component being added is associated with multiple external agents, then a comma-separated list of external agents will have to be provided within the <externalagents></externalagents> tag.

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

<Component action="add">

    <Agent>

    <componenttype>Oracle database</componenttype>

    <hostip>192.168.10.8</hostip>

    <componentname>ora8</componentname>

    <port>1521</port>

    <sid>egora</sid>

    <ispassive>no</ispassive>

    <externalagents>192.168.10.152,ext72</externalagents>

    </Agent>

    <Agent>

    <componenttype>Oracle database</componenttype>

    <hostip>192.168.10.9</hostip>

    <componentname>ora9</componentname>

    <port>1521</port>

    <sid>egdemo</sid>

    <ispassive>no</ispassive>

    <externalagents>192.168.10.152,ext75</externalagents>

    </Agent>

</Component>

You can either add the components using the host IP or the host name of the component.

Similarly, to add an Oracle database server with multiple SIDs, all the SIDs should be provided as a comma-separated list within the <sid></sid> tag.

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

<Component action="add">

<Agent>

    <componenttype>Oracle database</componenttype>

    <hostip>192.168.10.8</hostip>

    <componentname>ora8</componentname>

    <port>1521</port>

    <sid>egora,egdemo</sid>

    <ispassive>no</ispassive>

    <externalagents>192.168.10.152,ext72</externalagents>

    </Agent>

</Component>

Note:

If an Oracle database server with multiple SIDs is added to the eG Enterprise system via an XML file, then each SID will be registered as a separate Oracle database server in the eG Enterprise system.

Note:

  • Each component specification should be included within the main <Component></Component> block only.
  • A single XML file should not contain more than one <Component></Component> block.
  • An XML file that is created for adding components should not include sections pertaining to any other operation such as component modification/deletion, addition of external agents, etc.
  • A single XML file can be used for adding components of different types.

Once all the required entries are defined in the XML file, execute the following command to extract the component information from the file, connect to the required eG manager, and add the specified components to the eG Enterprise system:

eGCLI AddComponent -managerID <ManagerID> -file <Full_path_to_the_XML_file>

For example:

eGCLI AddComponent -managerID mgr153 -file c:\CLI.xml

Component Addition Using a CSV File

Like XML files, separate CSV files should be created for every administrative operation to be performed by eG CLI. This implies that for adding new components to the eG Enterpise system, a dedicated CSV file is required.

To configure a CSV file with the details of the components to be added, entries of the following format should be included in that file:

Element,action

Component,add

componenttype,hostip/hostname,componentname,port,externalagents

<Details of component1>

<Details of component2>

.

.

.

For example, if you want to add 3 IIS web servers to the eG Enterprise system using the host IP, do the following:

Element,action

Component,add

componenttype,hostip,componentname,port,mtsenabled,externalagents

IIS web,192.168.10.96,iis96,80,no,ext43

IIS web,192.168.10.173,iis173,7077,no,ext173

IIS web,192.168.10.90,web90,80,no,ext85

If you want to add 3 IIS web servers to the eG Enterprise system using the host name of the component, do the following:

Element,action

Component,add

componenttype,hostname,componentname,port,mtsenabled,externalagents

IIS web,egurkha25,iis96,80,no,ext43

IIS web,egurkha26,iis173,7077,no,ext173

IIS web,egurkha27,web90,80,no,ext85

Note that the column names (componenttype, hostip, etc.) used here are the same as the input parameters of the ‘AddComponent’ command supported by eG CLI (see Adding Components). These column names cannot be changed. Also, while providing the details of the components to be added, ensure that you follow the same order of the column names.

While adding components of different types or those which support different parameter sets, make sure that you leave the columns not applicable for a component specification, blank. At the same time, ensure that the column names you specify in the CSV file are a super-set of the parameters supported by all the components that are being added. In other words, the column names provided in the CSV file should correspond to the following:

  • the parameters that are common across all the components to be added, and;
  • the parameters that are distinct/unique for each of the components being added; 

For instance, you can add an IIS web server and a Generic server component using the same CSV file, with the help of the following specification:

Element,action

Component,add

componenttype,hostip,componentname,port,mtsenabled,externalagents

IIS web,192.168.10.96,iis96,80,no,ext43

Generic,192.168.10.173,gen173,,,ext180

In this case, note that the columns componenttype, hostip, componentname, and externalagents are common for both the IIS web server and the Generic server, but the port and mtsenabled columns are supported only by the IIS web server. Moreover, since the Generic server is a non-port-based component and does not support the mtsenabled parameter, the columns port and mtsenabled have been left blank in the specification that corresponds to the Generic server.

If you want to say, associate multiple external agents with a component, then your specification should include a comma-separated list of external agents provided within double-quotes:

Element,action

Component,add

componenttype,hostip,componentname,port,mtsenabled,externalagents

IIS web,192.168.10.96,iis96,80,no,"ext43,ext60"

IIS web,192.168.10.173,iis173,7077,no,ext173

Similarly, you can add an Oracle database sever with multiple SIDs.

Note:

If an Oracle database server with multiple SIDs is added to the eG Enterprise system, then each SID will be registered as a separate Oracle database server in the eG Enterprise system.

Once all the required entries are defined in the CSV file, execute the following command to extract the component information from the file, connect to the required eG manager, and add the specified components to the eG Enterprise system:

eGCLI AddComponent -managerID <ManagerID> -file <Full_path_to_the_CSV_file>

For example:

eGCLI AddComponent -managerID mgr153 -file c:\addiis.csv