Skip to content

Feature request - tenant/site config for agent #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sepetuks opened this issue Mar 24, 2025 · 6 comments
Open

Feature request - tenant/site config for agent #81

sepetuks opened this issue Mar 24, 2025 · 6 comments

Comments

@sepetuks
Copy link

sepetuks commented Mar 24, 2025

We have multiple customers in separate L2 domains/VRFs.
Any of them can use same subnet in their network (kind of duplicate prefixes)
Would it be possible to have config parameter for agent that it explicitly define for which tenant/site this agent is collecting data? Or maybe VRF?

@leoparente
Copy link
Contributor

leoparente commented Mar 24, 2025

hi @sepetuks we are currently working to support more data models on diode SDK. Therefore, it will improve the supported netbox types on orb-agent and its backends. If applicable for your use case, a temporary solution would be to add this information as Tags in the agent policy : https://github.com/netboxlabs/orb-agent/blob/develop/docs/backends/network_discovery.md#defaults

@sepetuks
Copy link
Author

hi @sepetuks we are currently working to support more data models on diode SDK. Therefore, it will improve the supported netbox types on orb-agent and its backends. If applicable for your use case, a temporary solution would be to add this information as Tags in the agent policy : https://github.com/netboxlabs/orb-agent/blob/develop/docs/backends/network_discovery.md#defaults

Hi, thanks for proposal but that will not solve issue if same subnets are being used in 2 different VRFs. Netbox will not be able to distinguish into which one to assign collected data. So I just need to wait untill data models are expanded.

@Marcussjogren
Copy link

hi @sepetuks we are currently working to support more data models on diode SDK. Therefore, it will improve the supported netbox types on orb-agent and its backends. If applicable for your use case, a temporary solution would be to add this information as Tags in the agent policy : https://github.com/netboxlabs/orb-agent/blob/develop/docs/backends/network_discovery.md#defaults

Hi, thanks for proposal but that will not solve issue if same subnets are being used in 2 different VRFs. Netbox will not be able to distinguish into which one to assign collected data. So I just need to wait untill data models are expanded.

What you probably could do is to tag them in the orb agent, and then have a script running that looks for tag "customer1" and then checking if the address has "customer1" configured as tenant. If not, it will add it.

But thats just a workaround until proper modelling of Diode data has been developed.

@sepetuks
Copy link
Author

if I use following config:

network_discovery:
  policy_1:
    config:
      defaults:
        tenant: Customer 1
        vrf: VRF1
      schedule: "*/5 * * * *"
      timeout: 5
    scope:
      targets:
         - 10.10.10.0/24
         - 10.10.10.254

The defaults are not passed to diode server. The data load simply do not get that data,
based on code https://github.com/netboxlabs/orb-discovery/blob/develop/network-discovery/config/config.go#L53 it looks it should be possible to pass vrf and tenant?

@leoparente
Copy link
Contributor

hi @sepetuks can you try to pull latest develop image with docker pull netboxlabs/orb-agent:develop and run agent using this image to validate this feature?

@sepetuks
Copy link
Author

It looks there is still some errors:

  • For some reason it also tries to populate data where RD is also same as VRF name. Which is not expected behavior. I would expect only VRF name to be passed. Now result was that new VRF was created.
  • Another issue with tenant: my tenant has required custom field and I get error because required data was not provided (for custom field)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants