Discovery Pattern Step-Create Relationship not happening

SNowUser11
Kilo Guru

Hello Experts,

I was looking to create relationship between a cmdb_ci_computer and cmdb_ci_service Using relation Depends On:: UsedBy

cmdb_ci_computer table contains a field u_service which is same as cmdb_ci_service table. Eg:

On Table cmdb_ci_computer

--------------------------------

Name                 u_service(String field) getting this via Discovery

COMPUTER1      Acrobat

 

On Table cmdb_ci_service 

-------------------------------

Name

Acrobat

 

Then on Table 'cmdb_rel_ci' want to create a relation

Parent             Type                            Child

Acrobat            Depends On::UsedBy     COMPUTER1

It does not give me error but does not create result when i do TEST . Any step I am missing please guide.  Thanks

find_real_file.png

 

30 REPLIES 30

Also I quite not sure what I did is I created another STEP before Create Relationship to insert the Service Value (Adobe) into the cmdb_ci_service.name

HOping that here pattern will consider the cmdb_ci_service table . When I test in debug get the relationship but when i run discovery it does not create relationship actually. 

So not sure if that should work because still i am discovering (Adobe) via discovery but as string in cmdb_ci_computer and not in cmdb_ci_service as said in my POST .

Any thoughts please highly appreciated if this should work?

Thanks

Hi,

I am not sure what you are trying to achieve. You should have a reference or variable present in this pattern to allow creation of relationship as per suggested relationship and also as per containment and hosting rules.


Thanks,
Ashutosh

Hi,

I am trying to create relation between cmdb_ci_service and cmdb_ci_computer although the discovery is not populating the 'Service' in cmdb_ci_service instead we are updating in cmdb_ci_computer.u_service field via registry key. THis service value is also available in cmdb_ci_service as a record. As example in my question (Acrobat)

Here what I did step by step and I am getting TEST results which shows RELATIONSHIP but it does not insert in cmdb_rel_ci. Please find the snap shots step by step and need community expertise guidance what went wrong it is not creating relationship in cmdb_rel_ci even though it shows in test result.  Thanks

1) I am fetching 'Service' from registry key

find_real_file.png

2) Then I am updating it in cmdb_ci_computer .u_service field

find_real_file.png

3) I am updating the service in cmdb_ci_service also to  make it available in pattern

find_real_file.png

4) Now building relationship between cmdb_ci_service and cmdb_ci_computer 

find_real_file.png

find_real_file.png

5) I can see this below

find_real_file.png

find_real_file.png

find_real_file.png

6)Pattern Log as below:

find_real_file.png

find_real_file.png

 

HI,

So what i see in this mapping is you are trying to make computer parent and service child which is not suggested relationship in this case.

So you should try other way round and make service parent and computer child in step 4 above which you have shown.

Thanks,
Ashutosh

Hi Ashutosh,

Yes I already tried reversing the parent-child but its same showing me in TEST but actually not happening.Thanks