Model Id is setting to "Unknown" and empty.

Riya25
Giga Contributor

Hello Experts,

 

I have some questions regarding the Model ID of CI as i am new to this.

1.What is the difference between "unknown" and "Empty" Model Ids.How they are setting to Unknown and empty respectively,i know about Unknown its through the script include "Asset and CI" in SN 

2. If we want to include model ids of some CI so that from next discovery discover them correctly where we have to make entry in one of the Product Table as it a reference field or somewhere else.

3.And last,can it be possible to allow discovery to set only the "Empty" records of fields like "Location" and "Model Id" so that after the manual updation of these fields discovery doesn't touch them again?

 

Thank You in Advance.

 

5 REPLIES 5

Sandeep132
Kilo Sage

Hi Riya,

Is the issue happening with custom pattern or OOB pattern? To handle the Model information in the patterns, Pre Post Processing scripts are used where in MakeAndModelJS API is called which either creates a new Model Record or uses the existing one. You can check "OSs - Pre Sensor" https://YOURInstance.service-now.com/nav_to.do?uri=sa_pattern_prepost_script.do?sys_id=59e84c5b9f2322001d753758442e70f3 to see how Model information is handled.

And coming to your 3rd point, yes we can achieve it by Pre Sensor script to remove/use the model information from the payload. In our custom pattern implementation we use the below steps to remove the location value if its already populated

if (payloadItems[i].values.location) {
if (gr.location != '') {
delete payloadItems[i].values.location;
}
}

Hope this helps.

Thanks

Hello Sandeep,

Thanks for the reply.

Actually till now we are using the Probes only.

Is there any way through which we can customize them for now. 

And would also like to know why is this happening and is there any table where we can add the values so that discovery populates them correctly.

 

Regards,

Riya

I never worked with Probes and so I am not sure how it works. But you can try creating Model information in cmdb_model table with the information you are receiving. Try discovery after creating a record and see if it fixes the issue.

Hello Sandeep,

Thank you for the reply.

Suppose if we  replaced models in the Product model table having Unknown to something else say "ABC" then discovery should not change it right or we have to create new records in that table.

And how the records in the Product Model is being created.

Do discovery automatically creates them on the basis of Model Category or it has to be created by us.

What is the difference between "Empty" and Unknown Model Ids and in which scenarios both are created.

Lastly,as you told we can customize the Pattern ,the way in which Location is customized we have to follow the same thing or anything extra has to be done from our side.

Regards,

Riya