Update Steps to Version 3.5

Version 3.5 is a Major Update which updates all required Python Modules and also resolves older problems which can't be resolved staying compatible. So your help is needed for this one.

These steps are only needed for the first time when you update from pre 3.5 Versions. Also when you skip 3.5 or you're working with the git versions.

1) requirements.txt

The Requirements txt is now divided in 3 Files.

  • requirements.txt → All you need to run the Syncer
  • requirements-extras.txt → Modules like ldap/ mysql which not all users need
  • requirements-ansible.txt → Everything needed for the Ansible automations

Note: If you're using Docker, all Modules are installed automatically.

2) Module Updates

Due to Security problems in some of the Modules, we had to upgrade all Modules of the Framework. So after Update of the Syncers code, you need to run the pip install -r requirements.txt again. Nothing more to-do.

3) Inventory Prefix

In the past, inventory values were prefixed like name_ something. This is now changed to name__. The Problem with the old approach: cmk_ vs cmk_svc_. If you now want to clean the cache, and delete everting starting with cmk_, you will also delete the namespace cmk_svc. This effects only rules later, you created based on inventorized data. Normal Attributes from imports are not affected.

Steps for the migration:

  • Delete current Inventory: ./cmdbsyncer sys delete_inventory
  • Run your inventories again
  • Update the rules wich are based on Inventory Data and fix the naming.
    • cmk_ goes cmk__
    • cmk_svc_ goes cmk_svc__
    • csv_ goes csv__
    • and so on

4) Checkmk: Create Tags

The function is now simpler and has more power at the same time. Only Change: Instead specify a for each and refer to {{name}}, you can directly refer to the attribute.

5) dns:service dhcp:service Attributes

In the first Version of the Syncer, there was a limit to key:value for attributes. That lead to lists where key and values were switched, to allow multiple entries. With this Version, attributes can be not only key:string but also key:list or key:dict. You can use that in your plugins, in case you use the outcome in jinja Templates. Example: service:['dns', 'dhcp'] could in jinja be: {{ service[0] }} or: {% for svc in service %} as loop.