icingaweb2-module-netboximport icon indicating copy to clipboard operation
icingaweb2-module-netboximport copied to clipboard

Allow non unique object names

Open bb-Ricardo opened this issue 5 years ago • 3 comments

NetBox allows to assign the same name for different objects as long as there is a secondary unique key.

Descussion on this issue: https://github.com/netbox-community/netbox/issues/2669

bb-Ricardo avatar Oct 19 '20 21:10 bb-Ricardo

I think this may be out of scope, because Icinga requires unique host names. The Import source also required a unique attribute for identification.

We could work-around this with a Boolean config option, which appends _1,_2,... on any duplicate host name, if that's applicable.

joni1993 avatar Oct 19 '20 21:10 joni1993

I faced the same issue in another project and solved it by appending the site in brackets if site was set and object name not unique.

Would this be a possible solution?

bb-Ricardo avatar Oct 19 '20 23:10 bb-Ricardo

As @joni1993 already mentioned for Icinga is an unique object_name mandatory.

So the problem which are you facing needs to be solved by creating a joined object_name consisting of multiple field values. Of course under the hood it isn't pretty but you can override ui with display_name attribute.

Since Director offers this solution by modifiers for an import source. I don't see any reason to implement this to the module. The modules purpose is to deliver data from a foreign source as modifiable as possible to Director.

cannotcodetm avatar Feb 20 '21 09:02 cannotcodetm