2.2.3 Update by exporting and importing a list of configuration items
Export a list of configuration items in a CSV file to check for any differences between the actual status of virtual machine provision and the configuration items in inventory, etc. Inventory results can also be reflected in an exported CSV file and imported to keep configuration information up to date. This section describes such use cases.
[Create an [Import/Export] template]
Set the classes, output formats, and output fields, etc., for import and export targets.
① [Step 1 of 5 - Edit common information]
| Field | Value |
|---|---|
| Name | Basic information on Development Team Testing Environment 001 |
| Object | Specify "Config Item". |
| Format | Specify "CSV". |
| Valid | Select "valid". |
| Comment | Enter any comments. |
② [Step 2 of 5 - Edit object information]
| Field | Value |
|---|---|
| Class | Specify "TestEnvironment". |
| Maximum number of one element | 10 (default value) |
| Empty fields indicate that the current values are kept | Is not checked. |
③ [Step 3 of 5 - Edit format information]
| Field | Value |
|---|---|
| Column Separator | Specify "Comma (,)". |
| Charset | UTF-8 (default value) |
| Include Column Headers | Specify "Yes". |
④ [Step 4 of 5 - Edit mapping information]
Click the [Step 4 of 5 - Edit mapping information] - [Add Mapping Element] button. A selection field will appear in the [KEY] column, add the following key rows.
- Number (*check [Identifier])
- Name
- Deployment State
- Incident State
- DynamicField_TestEnvironmentDescription
- DynamicField_TestEnvironmentCustomer
- DynamicField_TestEnvironmentCustomerUser
- DynamicField_ITSMNetworkInfo-FQDN
- DynamicField_ITSMNetworkInfo-IPAddress
- DynamicField_TestEnvironmentVersion
- DynamicField_TestEnvironmentEdition
- DynamicField_TestEnvironmentProvisionStartDate
- DynamicField_TestEnvironmentProvisionEndDate
- DynamicField_TestEnvironmentSize
⑤ [Step 5 of 5 - Edit search information]
This section is set up assuming that testing environments that have already been used are not subject to export. You can filter import and export targets by set output fields.
| Field | Value |
|---|---|
| Restrict export per search | Check. |
| Deployment State | Select the following. ・Test/QA ・Pilot ・Maintenance ・Review ・Repair ・Expired ・Production ・Planned "Retired" and "Inactive" are not selected to exclude testing environments that have finished being used. |
You can now create an import/export template for the configuration items of the TestEnvironment class, allowing export and import.
[Export]
To export, in the [Config Item] section of the [Import/Export Management] screen, click [Export] in the row for the template you created. This will download the generated CSV file.
[Update and import CSV files]
Some columns in the exported CSV file will cause an error on import if not updated with the correct values. For example, the "DynamicField_TestEnvironmentCustomer" and "DynamicField_TestEnvironmentCustomerUser" columns are different from the field names displayed in the OTOBO GUI. In addition, it is sometimes difficult to specify the correct values because the values that should be entered in the CSV file are different from those displayed in the GUI. In such cases, it is recommended that the value be specified in OTOBO GUI. In the CSV file, the "DynamicField_TestEnvironmentDescription" column (the [Description] field in the GUI), which allows free input, can be used to support the specification of values in the GUI by entering and importing columns and rows with unknown values or contents to be specified.
To edit the exported CSV file in Excel, open the CSV file in a text editor or similar and save it again with the encoding set to UTF-8 with BOM.
See "Import configuration item" for import instructions.
The formatting of CSV files, including columns and delimiters, follows the same rules for import and export, so a file with modified values from an exported CSV file can be imported without modification.
Thus, importing the updated CSV file will keep the CMDB configuration items up to date.
Note
In this template, "Number" is used as the identifier. The "Number" is automatically numbered by OTOBO, so users cannot enter their own values. Also, rows with blank values in the columns specified as identifiers cannot be imported. Therefore, imports using this template can only be used to update existing configuration items.
[Batch-register multiple configuration items from a CSV file]
The template created up to this point uses identifiers to link the rows in the CSV file to the configuration items registered in OTOBO. This allows existing configuration item information to be updated with the contents of the CSV file when importing the CSV file. If a CSV file is imported using a template with no identifier setting, a new configuration item will be registered for all rows. This function allows multiple configuration items to be registered at once from a CSV file.