OCS Inventory NG (Open Computer and Software Inventory Next Generation) is an open source software for the automated inventarization of hardware  and software components as well as whole networks. The software is available for various operating systems on the official website at http://www.ocsinventory-ng.org/. i-doit provides an import interface to import OCS objects directly to the IT documentation.

Configuration

At Administration → Interfaces / external data → Import → OCS-Inventory NG two menu items can be found which are relevant for the OCS import interface. Under Configuration you can determine the object types into which the OCS objects are going to be imported. You can set prefixes for the object types "Server" and "Client". If these prefixes are set, a check whether the name of the OCS object contains one of the set prefixes is carried out during the import process . If an object was found, it is imported to the corresponding object type. The option Connect only known applications determines whether the imported objects will be connected only to applications which are available in the i-doit environment. Is this option set to No then all applications which are not yet available in the data pool of i-doit will be be created and connected to the corresponding computer object. The parameter Object-Matching Profile specifies how objects which are already documented are to be identified. The identified objects are updated during the data import process.

The credentials to the OCS database are stored in the menu item Databases. Multiple OCS instances can be set.

Import

Now it is possible to import all or just individual objects from the OCS database to the i-doit environment at Extras → Import → OCS. Selecting one or more objects opens a window in which the categories and objects that are to be imported can be determined.

You receive a status report with information about the progress of the import at the end of the page when the import was carried out.

Automatic Import

You can execute the import automatically with help of the command line tool Controller, for example, via a Cronjob. The required handler is called ocs:

 

./controller -uadmin -padmin -i1 -m ocs -db ocsweb

 

When importing you have the following options:

OptionMandatory fieldDescription
-dbyes

Name of the database of OCS Inventory NG which shall be accessed

-xno

Entries in the categories Host address and Network → Port will be overwritten

-tnoConstant of the default object type, for example, C__OBJTYPE__SERVER
-fno

Path to the file which contains the host names to be imported

-hno

Comma-separated list of host names to be imported

-snoConsider SNMP devices during import
-cno

Comma-separated list of categories to be filled with entries during import:

  • drive: drive
  • ui: Wiring → Interface
  • sound: Sound card
  • application: Software assignment
  • memory: Memory
  • model: Model
  • graphic: Graphic card
  • net: Network
  • stor: Local mass storage → Device
  • operating_system: Operating system
  • cpu: CPU
-lno

Log level:

  • 1: Standard
  • 2: Debug