netenglabs / suzieq

Using network observability to operate and design healthier networks
https://www.stardustsystems.net/
Apache License 2.0
787 stars 104 forks source link

Netbox: handle different host url in 'next' section of the response #850

Closed LucaNicosia closed 1 year ago

LucaNicosia commented 1 year ago

Related Issue

Fixes #848

Description

The Netbox source retrieves the devices one page a time. The next page url to fetch is retrieved via the 'next' section of the Netbox response (see Netbox pagination docs). It may happen that this 'next' section contains a different host or protocol or port if there is a reverse proxy between SuzieQ and Netbox.

This PR substitutes the host, port and protocol of the 'next' url with the host, port and protocol of the previous request.

Type of change

Double Check