Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

1.4.9 ciimport (Configuration Item Import Command)

Description

This command imports configuration items encoded in a file into the CMDB. The format of the input file can be either XML or CSV.

By combining this command with the export command as explained in the following section, it becomes possible to update or add configuration items by exporting existing configuration items from the CMDB and then importing them again after they have been edited.


Synopsis

[Windows]

ciimport.exe -x XML file

ciimport.exe -c CSV file -r conversion rule file [-o output file]

ciimport.exe -i

[Linux]

ciimport.sh -x XML file

ciimport.sh -c CSV file -r conversion rule file [-o output file]

ciimport.sh -i


Options

-x XML file

Specifies the XML file containing the configuration items to be added. The example shown below adds a configuration item type called LogicalServer:

Point

  • <entities> is defined as shown in the above example.

  • Specify the target configuration item type in the item type shown in the above example. Define the namespace (xmlns) exactly as shown. (There are two in the above example.) Refer to "Chapter 6 Configuration Item Format" for more details on configuration item types.

  • record type is set as expected in the case of expected records and set as observed in the case of observed records.

  • The section between CI START and CI END comments defines the configuration item. Refer to "Chapter 6 Configuration Item Format" for more details on configuration item definitions.


-c CSV file

Specifies the CSV file containing the configuration items to be added.
An example of a CSV file is provided below.

LogicalServer,expected,192.168.0.1,cmdb-manager,192.168.0.1, NIC1, CPU1
LogicalServer,expected,192.168.0.2,cmdb-agent,192.168.0.2, NIC2, CPU2


-r conversion rule file

When a CSV file is added, it is necessary to specify a conversion rule file.
The following example shows the above CSV file mapped to the configuration item type LogicalServer:

xmlns:cmdb=http://federation.service.cmdb.fujitsu.com/xsd
xmlns:ns=urn:xmlns-fujitsu-com:rcxml2004-05
xpath=/entities/cmdb:item[@id=#3]/@type=#1
xpath=/entities/cmdb:item[@id=#3]/cmdb:record/@type=#2
xpath=/entities/cmdb:item[@id=#3]/cmdb:record/ns:LogicalServer[@id=#3]/@hostname=#4,@ipAddress=#5
xpath=/entities/cmdb:item[@id=#3]/cmdb:record/ns:LogicalServer[@id=#3]/ns:LogicalServerConfiguration/ns:LogicalNIC/@name=#6
xpath=/entities/cmdb:item[@id=#3]/cmdb:record/ns:LogicalServer[@id=#3]/ns:LogicalServerConfiguration/ns:LogicalCPU/@name=#7

Point

  • The namespaces (xmlns) in lines 1 and 2 are defined as shown in the above example.

  • Line 3 and thereafter are defined as the correspondence between the CSV data column position and the configuration item format. For example, the information on line 5 in the CSV corresponds to the configuration item format ipAddress attribute. Refer to "Chapter 6 Configuration Item Format" for more details on configuration item definitions.

-o output file

Specifies the file that outputs the result of the conversion of the specified CSV format file to XML format using the specified conversion rule file. If this option is omitted, the XML format content after conversion will be imported.


-i

Generates and imports an expected record based on the information on the observed record that has been registered with CMDB.


Return Values

0:

Normal termination

Value other than 0:

Abnormal termination


Command Location

[Windows]

<Systemwalker Runbook Automation installation directory>\CMDB\FJSVcmdbm\bin
Note: The default location is C:\Fujitsu\Systemwalker\SWRBAM

[Linux]

/opt/FJSVcmdbm/bin


Privilege Required/Execution Environment

[Windows]

[Linux]

Note