Pattern Designer model_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hello,
I would like to set the model for an SNMP device in Pattern Designer.
I can read the model via sysdescr, but I can’t enter this value directly under $cmdb_ci_ip_switch[*].model_id. To do that, I would need to know the model_id.
This is, of course, difficult because the model may not have existed previously, and even if it did, I can’t find a way to determine the model_id in Pattern Designer.
Unfortunately, the Pattern Designer does not have the MakeAndModelJS function, as is available for probes/sensors.
Does anyone know of a way to enter the model in plain text?
I would appreciate a response.
Best regards,
Achim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi,
take a look in the Pre Post Processing scripts, there are pre processing scripts like 'Handle Model and Manufacturer for HMC' which you can use as example.
You find it directly in the menu with 'pre post' or sa_pattern_prepost_script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Thanks for your answer.
I'm a little bit confused, because ServiceNow is doing it directly, for example in the Network Switch pattern -> discovery -> Step 3 Insert model to cmdb_ci_ip_switch.
If I'm doing the same in a pattern extension it doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
@AchimM279672093
I assumed you get the model name, which you can't enter directly in the pattern as you need to look up the value. This would be possible with pre post scripts as MakeAndModelJS function can be used there.
If you have the value available you can add it in the pattern. When there is need to transform it you can use EVAL scripts.
This is the kb article: KB0647736 a good explanation video is: https://youtu.be/wuuG85XtL1s?si=wMhS103STTfa9nMj
