Discovery Pattern Extension doesn't create CI.

Au_an
Tera Expert

Hi everyone,

 

I've created a custom pattern extension linked to the already existing Linux Server pattern in order to discover OVM virtual machines and create new entries in a custom table (ci class type) also created by me, child of Virtual Machine Instance class.

 

The discovery log reports the creation step as completed and VMs are being discovered, but the table is still empty. I used "Transform Table" to create the entries into the custom table, with source table the one in which I stored all the VMs during the pattern execution and target table the custom table.

Did I missed some steps? Is there anything else to do when creating a custom class in order to enable discovery to create an entry?

 

Moreover, I don't know if it can help, but when I try to search that custom class into filter navigator, it doesn't appear. I need to access it by using its full name.list. But I can see it in CI Class Manager.

 

Thank you very much for your help!

12 REPLIES 12

SiD2
ServiceNow Employee
ServiceNow Employee

Hi @Au_an 

 

I guess nothing else is required but just sync the patterns to mid before running discovery.

 

Can you share a screenshot of the pattern log highlighted with that new steps and do you see any errors in the log?

 

Please mark Helpful / Accept Solution so that it helps others with similar questions.

Nothing, also with sync CI still not created. 

The one highlighted is the extension I've added, 

Au_an_0-1674046316156.png

Below the result in the pattern log of the step that is supposed to create CI, no errors detected in previous or following steps.

Au_an_1-1674046595804.pngAu_an_2-1674046700088.png

vms is a table I used in the pattern to store VMs information retrieved by the hypervisor.

 

Also, in Creating CI step (the one that appears on the first pic) it seems like it creates just the hypervisor in CMDB, nothing about the new CI. Moreover, can't seem to get the CI to ever show up in the payload, it has just the info about cmdb_ci_linux_server and all related CIs but nothing about the new class. Is it something about pre/post sensor script?

SiD2
ServiceNow Employee
ServiceNow Employee

Hi @Au_an 

 

This is really strange!

Can you try the "Generate Payload" option in pattern debug in a dummy step in your extension section after the last step and see if the payload is having your new CI or not.

 

You can also check if the new CI is listed in the Creating CI step in pattern log.

 

Also I hope you have defined the identifiers and any dependent relations properly for your new CI class. Also I hope when you do a Test on the above transform table, it does succeed.

 

Please mark Helpful / Accept Solution so that it helps others with similar questions.

Okay, starting from the bottom, I have defined those dependent relations

Au_an_0-1674055221852.png

and for identifiers

Au_an_1-1674055292800.png

The test on the transform table step does succeed, this is what the result looks like (don't know why sys_id column is filled in that way, as sys_id is not one of the fields I specify in the transform table)

Au_an_2-1674056044108.png

 

The CI is not listed in Creating CI step in pattern log nor in Payload.

 

I don't know if this information can help, but when trying to create the dependent relation shown above, just after the step with transform table, gives me the error "Test failed: Reference and relation tables must be a CI Type, change u_cmdb_ci_ovm_virtual_machine_instance to a correct type."