CI Modeling with YAML in the OTOBO Ticketing System
This chapter shows how to define and extend your Configuration Items (CIs) in the OTOBO ticketing system using YAML – from page and layout structure to dynamic fields and field types.
1. Structure of CI Definitions
Each CI definition in OTOBO consists of several main components:
yaml
- Class:
Name: <CI-Class>
Categories:
- All
- <Other Categories>
NumberModule: AutoIncrement
PermissionGroup: itsm-configitem
VersionStringModule: Incremental
Definition: |
Pages:
- Name: Summary
Layout:
Columns: 3
ColumnWidth: 1fr 1fr 1fr
Interfaces:
- Agent
- Customer
Content:
- Section: General Fields::General Information
RowStart: 1
ColumnStart: 1
- Section: ITSM Model::Model
RowStart: 1
ColumnStart: 2
- Section: CMDB Description::Description
RowStart: 2
ColumnStart: 1
ColumnSpan: 2
DynamicFields: { … }1.1 Pages
- Name: Name of the tab in the Agent Zoom.
- Interfaces: Controls who sees the tab (Agent, Customer, …).
- Content: List of sections, with position (RowStart, ColumnStart, possibly Span).
1.2 Layout
- Columns: Number of columns in the tab.
- ColumnWidth: Proportional width specifications (e.g.,
1fr 2fr 1fr).
1.3 Roles
Roles define reusable sections and field lists:
yaml
- Definition: |
Sections:
General Information:
Content:
- Header: General Information
- DF: System-Name
- DF: System-Version
Relations:
Type: ConfigItemLinks
Header: Relationships
RoleName: CMDB General Fields- RoleName: Unique name of the role.
- Sections: Contains one or more sections with field references (
DF:).
2. Dynamic Fields and Field Types
With DynamicFields, you extend your CI classes with custom attributes. Each field receives a name, type, and configuration:
yaml
DynamicFields:
DynamicFieldName:
FieldType: Text
Label: My Label
Name: System-Name
ObjectType: ITSMConfigItem
Config:
DefaultValue: 'demo'
MultiValue: '0'
PossibleNone: '1'
Tooltip: ''
System-LifecycleStatus:
FieldType: Dropdown
Label: Lifecycle status of system
Name: System-LifecycleStatus
ObjectType: ITSMConfigItem
Config:
DefaultValue: ''
MultiValue: '0'
PossibleNone: '1'
PossibleValues:
demo: demo
productive: productive
Tooltip: ''2.1 Important Field Types
| FieldType | Description |
|---|---|
| Text | Simple single-line field |
| TextArea | Multi-line free text field |
| Date | Date field (with restrictions via YearsInPast/...) |
| Dropdown | Selection field (Single/Multi via MultiValue) |
| Agent | LDAP User/Agent Lookup |
| ConfigItem | Link to another CI (relation type definable) |
| ScriptTemplateToolkit | Calculated field via template (e.g., sums) |
2.2 Configuration Options
- DefaultValue: Default value upon creation.
- MultiValue:
'0'(single selection) or'1'(multiple). - PossibleNone:
'1'to allow empty selection. - PossibleValues: Key-value pairs for dropdown fields.
- EditFieldMode: e.g.,
Dropdown,AutoComplete. - ReferenceFilterList, ReferencedObjectType: For lookup fields.
3. Example
yaml
- Class:
Name: CIName
Categories:
- All
- IT
NumberModule: AutoIncrement
PermissionGroup: itsm-configitem
VersionStringModule: Incremental
Definition: |
Pages:
- Name: Intro
Layout:
Columns: 2
ColumnWidth: 1fr 1fr
Interfaces:
- Agent
Content:
- Section: CMDB General Fields::Information
RowStart: 1
ColumnStart: 1
- Section: CMDB General Fields::Risks
RowStart: 2
ColumnStart: 1
- Name: Details
Layout:
Columns: 1
ColumnWidth: 1fr
Interfaces:
- Agent
Content:
- Section: CMDB General Fields::Software
RowStart: 1
ColumnStart: 1
DynamicFields:
System-Name: { … }
System-Version: { … }
System-LifecycleStatus: { … }4. Tips and Best Practices
- Modularity: Use roles for recurring sections.
- Clarity: Group related fields into their own pages.
- Documentation: Comment your YAML files and maintain version triggers.
- Testing: Validate new fields in a test instance first.
With this structure, you can flexibly adapt the OTOBO CMDB to your organizational requirements and keep it transparent at all times.