UCMDB 9.0x Enrichment to add relationship to existing non-related CI

Hello everyone,

 

Is it possible with an enrichment to add a relationship into a pattern to an existing CI that does not have an existing relationship to anything in the pattern?

 

For example the attached image is what I am trying to do.

 

I have 12 workstations within a specific IP range, and an existing "FunctionalGroup" called "Students" that I would like to add with a "Usage" relationship over those computers.  We are taught to just "add a new" functional group with the same parameters as the existing one but that seems kludgy.

 

One workaround is to add a dummy relationship to anything in the graph (for example to the subnet) so that I could add it in query mode, and then add the new usage relationship in enrichment mode to the computers themselves.  This works, but there should be a way to just specify a specific CI that I want to add a relationship to in enrichment mode without having to try to recreate it.

 

Attached is the example of what I'm trying to do.  The "Usage(1)" relationship upper left is the dummy one required to make it work.  Is there any other way?

 

Thanks for your help!

Parents
  • Hi,

    Do you mean 1 CI os Students to be linked to all the 12 Computers?

     

    I have tried enrichment for this

    In the query mode add your TQL with your filters to select your worksations

    In the enrichment mode add your FunctionalGroup CIT and create a relation to the Workstation CIT, this will defininitly create  a NEW CIs for each one, to prevent this behavior Edit your FunctionalGroup CIT and add in the mandatory attributes the same values in your Students CI.

     

    The system will try to create a new CI and when I fails because of existance, it will link

  • Hi

     

    This is great - someone else trying to use uCMDB the same way we are:

    We are trying to do a very similar thing with enrichment - but was told its not possible to create a relationship between CIs using enrichment?

     

    We are trying to relate nodes to a location.  Each node has the name of the location as an attribute, so I thought it would be a simple thing to create that relationship from the node to the location using enrichment.

    Do you know if it is possible in uCMDB8 or CMS9?

     

    __Update__

    Mahmoud, i took a look at your site, and i see you have an example of almost exactly what I am after.. I followed your steps, but on saving the TQL in enrichment manager - I get "class not in class model".

     

    I have included all the required attributes in Location for creating a new location, so I'm a bit stumped.

     

    Cheers for your input.

    Rob.

     

     

     

  • Hi

    In terms of keeping this clean over time;

     

    Any ideas on how to remove a relationship if the attribute of Location on a Node no longer matches the related Location (ie the Location attribute has been updated on the Node, so now there are two relationships to separate locations) ?

     

    I can't seem to find the "if Location attribute != Location CI Name then delete relationship" option in enrichment 8)

     

    Thanks,

    Rob.

     

  • Just use a "Join Relationship" between the CITs in the Query Mode:

     

     

    This is an example between Node and Location; now that I see the screenshot the relationship direction is probably backwards.  The point is that you can set a relationship that is dependant on relationship criteria between the two CIs.  On the assumption that the `Location` attribute of Node will hold the same value as the Location CI's `Name` attribute then you can set this to only create a result if they do not match.  Once that is set then you can switch to `Enrichment Mode` and delete the relationship.

     

    If this helped you please pass along your `Kudos` :)

  • Just use a "Join Relationship" between the CITs in the Query Mode:

     

     

    This is an example between Node and Location; now that I see the screenshot the relationship direction is probably backwards.  The point is that you can set a relationship that is dependant on relationship criteria between the two CIs.  On the assumption that the `Location` attribute of Node will hold the same value as the Location CI's `Name` attribute then you can set this to only create a result if they do not match.  Once that is set then you can switch to `Enrichment Mode` and delete the relationship.

     

    If this helped you please pass along your `Kudos` :)

  • Just use a "Join Relationship" between the CITs in the Query Mode:

     

     

    This is an example between Node and Location; now that I see the screenshot the relationship direction is probably backwards.  The point is that you can set a relationship that is dependant on relationship criteria between the two CIs.  On the assumption that the `Location` attribute of Node will hold the same value as the Location CI's `Name` attribute then you can set this to only create a result if they do not match.  Once that is set then you can switch to `Enrichment Mode` and delete the relationship.

     

    If this helped you please pass along your `Kudos` :)

  • Thanks for your help - thats exactly what i was after.

    if I could click more kudos i would 8)

     

    Edit: So I have created that Join in query mode, which works, however on setting this to Enrichment mode, and selecting to delete the relationship, on save i get: ERROR: Enrichment Definition link is virtual.

     

    I am not sure I would want to do this enrichment in this fashion now that i have seen the results before saving anyway.  The number of relationships that are created between nodes and locations to delete looks enormous.  Given 10 nodes only and 20 locations only, it looks like this (i think i would have a black screen with thousands of nodes and hundreds of locations, and probably kill the enrichment model for uCMDB:

     

    I have come up with a different approach: remove any relationships where the number of locations for a node is >1 using the cardinality rule, and set the location to "empty" for those nodes, then when the import happens again, the location attribute is updated to the correct location, and a new location relationship created.  Seems more friendly to the uCMDB engine 

     

    Cheers

    Rob.

     

  • Thanks for your help - thats exactly what i was after.

    if I could click more kudos i would 8)

     

    Edit: So I have created that Join in query mode, which works, however on setting this to Enrichment mode, and selecting to delete the relationship, on save i get: ERROR: Enrichment Definition link is virtual.

     

    I am not sure I would want to do this enrichment in this fashion now that i have seen the results before saving anyway.  The number of relationships that are created between nodes and locations to delete looks enormous.  Given 10 nodes only and 20 locations only, it looks like this (i think i would have a black screen with thousands of nodes and hundreds of locations, and probably kill the enrichment model for uCMDB:

     

    I have come up with a different approach: remove any relationships where the number of locations for a node is >1 using the cardinality rule, and set the location to "empty" for those nodes, then when the import happens again, the location attribute is updated to the correct location, and a new location relationship created.  Seems more friendly to the uCMDB engine 

     

    Cheers

    Rob.

     

  • Thanks for your help - thats exactly what i was after.

    if I could click more kudos i would 8)

     

    Edit: So I have created that Join in query mode, which works, however on setting this to Enrichment mode, and selecting to delete the relationship, on save i get: ERROR: Enrichment Definition link is virtual.

     

    I am not sure I would want to do this enrichment in this fashion now that i have seen the results before saving anyway.  The number of relationships that are created between nodes and locations to delete looks enormous.  Given 10 nodes only and 20 locations only, it looks like this (i think i would have a black screen with thousands of nodes and hundreds of locations, and probably kill the enrichment model for uCMDB:

     

    I have come up with a different approach: remove any relationships where the number of locations for a node is >1 using the cardinality rule, and set the location to "empty" for those nodes, then when the import happens again, the location attribute is updated to the correct location, and a new location relationship created.  Seems more friendly to the uCMDB engine 

     

    Cheers

    Rob.

     

  • Well hang on - why are there so many location relationships in the first place? From your graph it appears that every Node has a relationship to every Location - why is this?

     

    You may be better to delete all location relationships and then recreate the proper ones.

  • Well hang on - why are there so many location relationships in the first place? From your graph it appears that every Node has a relationship to every Location - why is this?

     

    You may be better to delete all location relationships and then recreate the proper ones.

  • Well hang on - why are there so many location relationships in the first place? From your graph it appears that every Node has a relationship to every Location - why is this?

     

    You may be better to delete all location relationships and then recreate the proper ones.

Reply Children
  • Hi

     

    Those location relationships don't actually exist. It looks like uCMDB creates the virtual relationship to see if it should delete it for real. Following the logic, delete any relationship where the Location name doesnt equal the Node attribute for location - thats all relationships that are wrong bar the one that is right. If you create that enrichment, and click on the report button to see what it will be doing before you save it, I'm pretty sure you will see the same enrichment relationships that ucmdb intends to delete (if they exist).

     

    cheers

    Rob.