Discovery Pattern Extension doesn't create CI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2023 07:16 AM
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!
- Labels:
-
Discovery
-
Orchestration (ITOM)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2023 08:46 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 05:10 AM
Nothing, also with sync CI still not created.
The one highlighted is the extension I've added,
Below the result in the pattern log of the step that is supposed to create CI, no errors detected in previous or following steps.
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 07:01 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 07:36 AM
Okay, starting from the bottom, I have defined those dependent relations
and for identifiers
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)
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."