How to deal with device types
with same model
and manufacturer
#14125
Replies: 4 comments 1 reply
-
I see a few possible approaches:
In the case of the Fritz!Box 7590 variants, because they are physically different I'd suggest distinct named models (option 1) so that you can put different interfaces in the device type template, e.g. "AVM", "Fritz!Box 7590 20002929 (ISDN)" has the ISDN interface. |
Beta Was this translation helpful? Give feedback.
-
I agree with zmaster7. Option 2 and 3 are workarounds that oppose the idea where the information should be. Option 1 could result in high human efforts. To avoid this, one approach would be to automatically generate the current model field, which is displayed in the Netbox GUI as “Model Name”, by the following fields:
The new field “model_name” would be the current Model Name (DeviceType: model) field. The Model Name (DeviceType: model) illustrated in the picture cannot be manually entered in this approach. Instead, it is a combination of the above-mentioned fields. This guaranties a unique name. In addition, changes to those fields should automatically adjust the device type Model Name. Description of the fields:
These changes would make it possible to match machine-readable security advisories in CSAF against the Netbox asset database. |
Beta Was this translation helpful? Give feedback.
-
BackgroundTo understand the underlying problem, I add some information about vulnerability management by using the Common Security Advisory Framework (CSAF). CSAF 2.0 makes it possible to have a machine readable format for sharing information about vulnerabilities, the affected products and remediation. But how a product is described? Let look at an excerpt of the security advisory ssa-723487. There, you have 424 affected products. In the current state of netbox data model that would mean 424 device type. Since the device type is identified only by manufacturer + model number in netbox we would see this:
the manufacturer is always the same. Well then, add product family as an additional category to get it more readable:
Now we have a distinguished presentation of product families of the manufacturer Siemens, right? However, SC-600 is also a device family which let's to:
Lets do this further...
Note: the part number might be changed also. This however might also not be true always and even further not true for a different vendor which does not need device families at all. In that way, you can add specifications that would be otherwise fix and not variable. Like hardware version. SolutionAs a conclusion, a dynamic model is needed to handle the different levels of hierarchy of manufacturer product description. There might be an easier solution to this problem as previously suggested. The solution is derived in more detail here
In netbox, the concept of parent and child are already implemented. An additional field
Open issues with this solution
Benefits
|
Beta Was this translation helpful? Give feedback.
-
Discussion of two Plausible SolutionsTwo suitable solutions were mentioned above. With this post, possible implementations are compared. Solution Child/Parent (dynamic model)Necessary changes:
Solution Create Individual Names (Option 1) as PluginNecessary changes:
Solution Create Individual Names (Option 1) as core updateNecessary changes:
ComparisonThe recursive structure comes with a steeper learning curve but more flexibility for power users. It is the most suitable solution for CSAF matching. On the contrary, "Option 1" is easier to implement and only small user behavior changes.
Usability for Creating a new Device Typechild/parent: The user has to choose the parent from a list. Implications for Downstream DependenciesExisting databases such as device type library have to be checked for data quality and be reprocessed as no guidance was given in previous NetBox versions. For implementing "Option 1" as plugin, existing databases can not assumed that the plugin exists. Therefore, the maintainer of the databases either have to create two versions or still use the old format which hinders matching CSAF security advisories. Sustainabilitychild/parent: The fields become part of the core model. Implementationchild/parent: The overview of device types would need a proper modification. Usability for CSAFchild/parent: This solution reflects the CSAF structure. Illustration of Option 1To illustration the Option 1 solution both, creating a device type and showing the device types list, are presented below: Creating a Device TypeOption 1 as PluginThe tab "create model name" would only be necessary within the plugin solution. Option 1 in CoreRulesThe rules for generating the model name.
Results are shown in the device types overview Model and Model NameNetBox is using model (creating and editing) and model name (view) both for naming the device type as illustrated in the view of device types and editing one. Above, the names have different meaning. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
According to the documentation (and the error message), the
model
must be unique for amanufacturer
. Unfortunately, I come across many instance where this is not the case. See some examples below:So the question is: How should we deal with this?
If we append some explaining string to the
model
it can't be used to programmatically (reliably) match against security advisories. Should we then introduce custom fields to separate the data, e.g.,hardware version
andmodel name
?Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions