sol1 / icingaweb2-module-netbox

Netbox importer for director, and integration with netbox
28 stars 6 forks source link

Convenience headings missing #21

Closed sol1-matt closed 1 year ago

sol1-matt commented 1 year ago

Some datasets are missing the generated convenience headings even though some row would contain values. eg: platform_keyid doesn't exist as a heading even though some rows contain a plaform.

sol1-matt commented 1 year ago

This is due to the way the import module works.

There is a separate call to fetchData for column headings. This means Netbox needs to respond when data is requested and when column headings are requested. For very large queries involving 1000's of devices this can take a long time and is very expensive.
As a result the import module limits the fetchData call for column headings to a single row.

The bug is caused when the limited return row data doesn't include values that are used to generate convenience data.

The fix for this 46e2d4e06a53761e46c1a40b2b13bd54cdcfe76d is to create the column headings by default by specifying columns that should have default linked values in the type_map of each import.

This is something that will need to be maintained going forward.