CI modeling with YAML in the OTOBO ticket system
CI modeling with YAML in the OTOBO ticket system
Section titled “CI modeling with YAML in the OTOBO ticket system”This chapter shows how you can define and extend your Configuration Items (CIs) in the OTOBO ticket system using YAML – from page and layout structure to dynamic fields and field types.
1. Structure of CI definitions
Section titled “1. Structure of CI definitions”Every CI definition in OTOBO consists of several main components:
- Class: Name: <CI-Class> Categories: - All - <Additional 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
Section titled “1.1 Pages”- Name: Label of the tab in the Agent Zoom.
- Interfaces: Control who sees the tab (Agent, Customer, …).
- Content: List of sections, with position (RowStart, ColumnStart, optionally Span).
1.2 Layout
Section titled “1.2 Layout”- Columns: Number of columns in the tab.
- ColumnWidth: Proportional width specifications (e.g.,
1fr 2fr 1fr).
1.3 Roles
Section titled “1.3 Roles”Roles define reusable sections and field lists:
- Definition: | Sections: General Information: Content: - Header: General Information - DF: System-Name - DF: System-Version Relations: Type: ConfigItemLinks Header: Relations RoleName: CMDB General Fields- RoleName: Unique name of the role.
- Sections: Contains one or more sections with field references (
DF:).
2. DynamicFields and field types
Section titled “2. DynamicFields and field types”With DynamicFields, you can extend your CI classes with individual attributes. Each field receives a name, type, and configuration:
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
Section titled “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
Section titled “2.2 Configuration options”- DefaultValue: Default value when creating a new item.
- MultiValue:
'0'(single selection) or'1'(multiple). - PossibleNone:
'1'to allow an empty selection. - PossibleValues: Key-value pairs for dropdown fields.
- EditFieldMode: e.g.,
Dropdown,AutoComplete. - ReferenceFilterList, ReferencedObjectType: For lookup fields.
3. Example
Section titled “3. Example”- 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
Section titled “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.