Populate number of related CIs to a attribute

Hi,

I am trying to populate number of CPUs discovered for Unix node to a custom attribute(For Unix, CPU will be discovered as related CI). How can I achieve this.

Regards,

Sridhara.

  • Suggested Answer

    0  

    Hi Sridhara,

    Usually, the Enrichment Rule is aimed to do this. However, for your request, it cannot be achieved by a single enrichment rule. Here is an 'ugly' approach. 

    Create an enrichment rule with the following query conditions.

    • The value of the custom attribute does not equal to '2' (as an example)
    • The cardinality from Node to CPU is 2..2

    Define a rule to update the custom attribute to 2. 

    The above enrichment rule will detect nodes which have exactly 2 related CPU CIs and set the custom attribute on node to 2. Since this is hardcoded, you need to create multiple enrichment rules for different cardinality. 

    Below is the enrichment rule I created for your reference. 

    Custom_Enrichment Rules.zip

    Thanks,

    Leslie