Managing Components in Bulk

Managing Components Using an XML File

The first step towards this to create an XML file for the sole purpose of managing multiple components of different component-types at one shot. Given below is the format of the entries in such a file:

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

<Component action="manage">

        <Agent>

            <Component1 to be managed>

        </Agent>

        <Agent>

<Component2 to be managed>

        </Agent>

.

.

.

</Component>

For instance:

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

<Component action="manage">

        <Agent>

            <componenttype>Generic</componenttype>

            <componentname>gen1</componentname>

        </Agent>

        <Agent>

            <componenttype>AGate</componenttype>

            <componentname>agte10</componentname>

            <port>3900</port>

        </Agent>

        <Agent>

            <componenttype>Oracle Database</componenttype>

            <componentname>ora8</componentname>

            <port>1521</port>

            <sid>egora</sid>

        </Agent>

    </Component>

Note that the XML tags are the same as the input parameters of the ‘ManageComponent’ command supported by eG CLI (seeManaging Components).

Note:

If an Oracle database server with multiple SIDs is be managed, then your <sid></sid> tag cannot include a comma-separated list of SIDs; instead, your XML file should include a separate <Agent></Agent> block for each SID to be managed.

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 managing components should not include sections pertaining to any other operation.
  • A single XML file can be used for managing components of different types.

Once the XML file is ready, execute the following command to extract the component information from the file, connect to the required eG manager, and manage the specified components:

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

For example:

eGCLI ManageComponent -managerID mgr153 -file c:\mancomp.xml

Managing Components using a CSV File

To manage components in bulk, you can create a dedicated CSV file for this purpose and configure it with entries related to each component to be managed. Given below is the format of the entries in such a file:

Element,action

Component,manage

componenttype,componentname,port,sid

<Component1 to be managed>

<Component2 to be managed>

.

.

.

For instance:

Element,action

Component,manage

componenttype,componentname,port,sid

Generic,gen1,,

AGate,agte10,3900,

Oracle Database,ora55,1521,multi

Note that the column names used in the CSV file are the same as the input parameters of the ‘ManageComponent’ command supported by the CLI (see Managing Components).

Note:

  • If an Oracle database server with multiple SIDs is be managed, then the entry for the Oracle server in your CSV file should not include a comma-separated list of SIDs; instead, you should provide a separate entry for each SID to be managed. 
  • If one/more column names in your CSV file are not applicable to a component specification, then make sure that such columns are left empty in the specification.

Once the CSV file is ready, execute the following command to extract the component information from the file, connect to the required eG manager, and manage the specified components:

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

For example:

eGCLI ManageComponent -managerID mgr153 -file c:\mancomp.csv