Skip to content

Import, Export & Automation in the OTOBO-CMDB

The OTOBO-CMDB offers powerful interfaces and automation features to keep your asset data up-to-date and simplify recurring tasks.


1. Data Integration via REST and SOAP APIs

  • REST API

    • CRUD operations on CI classes and DynamicFields
    • JSON payloads: Simple and lightweight integration
    • Authentication: Token-based or Basic Auth
  • SOAP API

    • Legacy systems and deep functionality
    • XML payloads with WSDL descriptions
    • Stateful sessions and extensive methods for CI links

Best Practices

  1. Batch Processing: Import data in batches to avoid timeouts.
  2. Error Handling: Check return codes and log entries ("SysLog").
  3. Rate Limiting: Be mindful of API limits to prevent blocking.

2. File-Based Import/Export (CSV, XML)

  • CSV Import/Export

    • Field mapping: Column names → DynamicField names
    • Delimiter, character set, and header row are configurable
    • Bulk updates for existing CIs via a key attribute (e.g., Name or ID)
  • XML Import/Export

    • Complex structures and nested fields
    • Mapping possible via XSLT stylesheets
    • Used with SOAP clients and third-party tools

Workflow

  1. Generate a template: First, export a sample CSV/XML file.
  2. Enrich data: Adjust values and validate locally.
  3. Start import: Via the agent interface or a CLI script.
  4. Check results: Review logs for error lines and warnings.

3. Auto-Discovery & Synchronization

  • Network scanning: Detects IP networks, devices, and services
  • Agent-based discovery: Local agents report system details to the CMDB
  • Integration of external tools: Ansible, Puppet, SCCM, Nagios, and many more.

Features

  • Scheduled scans: Plan regular inventory runs.
  • Overwrite vs. enrich: Configure rules for update behavior.
  • Conflict resolution: Manual review or automatic prioritization of old vs. new data.

4. Triggers in CI Definitions

  • Triggers
    • Trigger actions on field changes (e.g., notification, auto-assign)
    • Configuration directly in YAML under VersionTrigger or via script
yaml
VersionTrigger:
  - DefinitionUpdate
  - ValueUpdate
  • Use Cases

    • Automatically update the inventory log after a serial number change
    • Send an email reminder when a certificate's expiration date is reached

5. VersionTriggers

  • VersionTrigger: Controls which events create a new CI version

  • Common values

    • NameUpdate
    • ConfigItemCreate
    • ValueUpdate
    • DefinitionUpdate
yaml
VersionStringModule: Incremental
VersionTrigger:
  - ConfigItemCreate
  - ValueUpdate

Advantage

Version history of all changes for traceability and audit compliance.


6. Script Fields (ScriptTemplateToolkit)

  • Calculated fields: Sum, average, dynamic text snippets
  • Syntax: TemplateToolkit ([% … %])
yaml
DynamicFields:
  TotalRAMGB:
    FieldType: ScriptTemplateToolkit
    Label: Total RAM (GB)
    Config:
      Expression: |
        [% Count = DynamicField_RAMCount %]
        [% Size  = DynamicField_RAMSize %]
        [% Total = Count * Size %]
        [% Total %] GB
      RequiredArgs:
        - DynamicField_RAMCount
        - DynamicField_RAMSize
      Readonly: '1'

Use Cases

  • Aggregated values (e.g., total memory)
  • Status calculations (e.g., "critical" at certain thresholds)
  • Text generation (e.g., asset descriptions with placeholders)

7. Combining Automation and Interfaces

  1. Automated Imports: Combine a REST job with a CSV import in cron jobs.
  2. Discovery + Trigger: Detect new devices and automatically trigger CI creation.
  3. Reporting: Use script fields and version history for automated reports via the API.

With these mechanisms, you can seamlessly integrate processes, ensure data quality, and minimize manual routine tasks in the OTOBO-CMDB.