Werk #14836: HW/SW Inventory: Add cluster property if the tree is not empty

Komponente HW/SW inventory
Titel HW/SW Inventory: Add cluster property if the tree is not empty
Datum 12.10.2022
Checkmk-Editon Checkmk Raw (CRE)
Checkmk-Version 2.2.0i1
Level Kleine Änderung
Klasse Bugfix
Kompatibilität Inkompatibel - Manuelle Interaktion könnte erforderlich sein

Previously the cluster property was added in any case even if the newly computed tree was empty (ie. no data or inventory plugins did not add any entries).

This led to a rather confusing result message of the {{HW/SW Inventory}} service: {{Cannot update tree, Found 1 inventory entries, Got no data, ...}}.

Moreover there was no possibility for removing the {{HW/SW Inventory}} tree at all, ie. the icon {{Show hardware/software inventory of this host}} in the dropdown menu of the {{HW/SW Inventory}} stays all the time.

Now the mechanism works as follows:

  • Apply all related inventory plugins
  • Apply configured retention intervals
  • If the tree is not empty then set the cluster property and store the tree.
  • Otherwise remove the icon which means: no current inventory tree

Note: The retention intervals worked incidentally before because the tree never was empty. Thus they were always applied.

Zur Liste aller Werks