Hello,
I use this one GitHub - sol1/icingaweb2-module-netbox: Netbox importer for director, and integration with netbox
Yes I flat the custom field with the propertie modifier as shown on the screenshot (but maybe it’s not the good way)
Here the first line of the preview
{
"id": 303,
"url": "https://netbox_url/api/dcim/devices/303/",
"display": "tt",
"name": "tt",
"device_type": {
"id": 1123,
"url": "https://netbox_url/api/dcim/device-types/1123/",
"display": "tt",
"manufacturer": {
"id": 52,
"url": "https://netbox_url/api/dcim/manufacturers/52/",
"display": "tt",
"name": "tt",
"slug": "tt"
},
"model": "tt",
"slug": "tt-tt"
},
"role": {
"id": 28,
"url": "https://netbox_url/api/dcim/device-roles/28/",
"display": "WLC",
"name": "WLC",
"slug": "wlc"
},
"device_role": {
"id": 28,
"url": "https://netbox_url/api/dcim/device-roles/28/",
"display": "WLC",
"name": "WLC",
"slug": "wlc"
},
"tenant": null,
"platform": null,
"serial": "102346878197",
"asset_tag": null,
"site": {
"id": 7,
"url": "https://netbox_url/api/dcim/sites/7/",
"display": "lyo01",
"name": "lyo01",
"slug": "lyo01"
},
"location": {
"id": 15,
"url": "https://netbox_url/api/dcim/locations/15/",
"display": "SS1",
"name": "SS1",
"slug": "ss1",
"_depth": 0
},
"rack": {
"id": 50,
"url": "https://netbox_url/api/dcim/racks/50/",
"display": "tt",
"name": "tt"
},
"position": 1,
"face": {
"value": "front",
"label": "Front"
},
"latitude": null,
"longitude": null,
"parent_device": null,
"status": {
"value": "active",
"label": "Active"
},
"airflow": null,
"primary_ip": {
"id": 621,
"url": "https://netbox_url/api/ipam/ip-addresses/621/",
"display": "x.x.x.x/xx",
"family": 4,
"address": "x.x.x.x/xx"
},
"primary_ip4": {
"id": 621,
"url": "https://netbox_url/api/ipam/ip-addresses/621/",
"display": "x.x.x.x/xx",
"family": 4,
"address": "x.x.x.x/xx"
},
"primary_ip6": null,
"oob_ip": null,
"cluster": null,
"virtual_chassis": null,
"vc_position": null,
"vc_priority": null,
"description": "tt",
"comments": "",
"config_template": null,
"config_context": {},
"local_context_data": null,
"tags": [],
"custom_fields": {
"bgp_asn_priv_16b": null,
"bgp_asn_private_16b": null,
"customer": "corp",
"environment": "corp",
"ip_anycast_vtep": null,
"ipmi_type": null,
"os_family": null,
"os_version": null,
"supervision_tag": null,
"vpc_id": null
},
"created": "2024-04-10T12:49:19.507389Z",
"last_updated": "2024-06-07T11:58:08.856831Z",
"console_port_count": 1,
"console_server_port_count": 0,
"power_port_count": 1,
"power_outlet_count": 0,
"interface_count": 13,
"front_port_count": 0,
"rear_port_count": 0,
"device_bay_count": 0,
"module_bay_count": 0,
"inventory_item_count": 0,
"keyid": "nbdevice tt",
"primary_ip_address": "x.x.x.x",
"primary_ip4_address": "x.x.x.x",
"primary_ip6_address": null,
"tag_slugs": [],
"device_role_keyid": "nbdevice_role wlc",
"device_keyid": null,
"platform_keyid": null,
"location_keyid": "nblocation ss1",
"rack_keyid": "nbrack tt",
"cluster_keyid": null,
"site_keyid": "nbsite tt",
"tenant_keyid": null,
"device_model_keyid": "nbmodel tt",
"device_model": "tt",
"device_manufacturer_keyid": "nbmanufacturer tt",
"device_manufacturer": "tt",
"role_keyid": "nbrole wlc",
"icinga_satellite_client_zone": null,
"icinga_satellite_parent_endpoint": null,
"icinga_satellite_parent_fqdn": null,
"icinga_satellite_parent_zone": null,
"icinga_host_zone": null,
"icinga_service": null,
"icinga_service_type": null,
"icinga_var": null,
"icinga_var_type": null,
"ip_range_keyid": null,
"ip_range_zone": null,
"contacts": [],
"contact_keyids": [],
"services": {},
"service_names": [],
"manufacturer": "tt",
"os_family": null,
"supervision_tag": null,
"ipmi_type": null,
"device_type-slug": "tt",
"environment": "corp",
"customer": "corp"
},
The filter expression I use in the import source is : status=active&environment=cust
When I use similar custom expression in the sync rule it’s working (but I have to import all the netbox database for nothing…)