数据导入

最新版本要求

该插件要求:

  • PHP 7.2或更高
  • GLPI >= 9.4

特征

该插件允许使用CSV文件将数据导入GLPI。

它允许创建导入模板以供将来重复使用。 创建它是为了:

  • 导入来自其他资产管理软件的数据
  • 注入电子交付表格

Data to be imported using the plugins are:

  • 库存数据(软件和许可除外),
  • 管理数据(合同,联系人,供应商),
  • 配置数据(用户,组,实体)。

安装插件

  • Uncompress the archive.
  • Move the datainjection directory to the <GLPI_ROOT>/plugins directory
  • Navigate to the Configuration > Plugins page,
  • 安装并激活插件。

配置

You will access the datainjetion configuration from the Tool > File injection.

Clic here to manage model

../_images/configuration.png

创建新模板

Fist step you need te create model, for this example we import Computer

Clic here to create new model

../_images/create_model.png

And fill form

../_images/add_model.png
  • Name : define a model Name
  • Visibility : is private or not for other user
  • Entity / sub entity : model visibility for entity
  • Comments : model comment
  • Type of data : type of data to import
  • Allow lines creation : yes or not
  • Allow lines update : yes or not
  • Allow creation of dropdowns : if dropdown value not exist, let’s create It
  • Dates format : date format in CSV file
  • Allow update of existing fields : yes or not
  • Float format : float format in CSV file
  • Try to establish network connection is possible : yes or not
  • Port unicity criteria : define unicity field fir port

After model creation it’s possible to : * Define if header is present * Change file delimitor : default -> “;”

Inject your CSV file

Send to GLPI your CSV file with computer data

../_images/send-file.png

content of CSV file for this documentation

Name;Type;Model;Manufactuer;serial
Desktop-ARTY;Desktop;Dell Inspiton;Samsung;567DFG45DFG
Laptop-QUER;Laptop;Dell XPS;Samsung;345UKB78DGH

Mapping CSV column and object field

For each column of your CSV file you must select the table and the corresponding field in GLPI

注解

You need to define link field. The plugin will search on this link field to known if object need to be added or updated

../_images/mapping.png

下拉列表包含其他表,允许其导入例如计算机导入期间的财务和管理信息。

Each type of data (Computer, Monitor, User) have differents options to import other data

../_images/mapping-table.png

附加数据

您可以定义要导入的附加数据,在导入过程中会要求提供这些数据。

每个都可以标记为强制

../_images/additional_mapping.png

Validate model

After configuration you can validate model

../_images/validate.png

执行导入

You will access the model from the Tool > File injection.

选择一个模板,选择CSV文件,然后运行导入

../_images/process.png

导入结果

../_images/after_process.png

After import process, plugin show you result, clic on spere to get more details

../_images/result.png

Creative Commons License