TheNetworkGuy / netbox-zabbix-sync

Python script to synchronise Netbox devices to Zabbix.
MIT License
109 stars 27 forks source link

[Question] Specific interface for Config Context #40

Open Domisiding opened 1 year ago

Domisiding commented 1 year ago

Hello, I wanted to ask if you can also select an interface for the individual interfaces with this script in the config context.

Example:

Zabbix Agent on Interface 01 SNMP on interface 02

TheNetworkGuy commented 1 year ago

I think that this is easier then expacted since the interface functionality class is decoupled from the device class. However i'm unavailable for next weekend. Please give me some time to think about it and i'll come back to this suggestion asap :)

Domisiding commented 9 months ago

Hello, I wanted to ask what the status is and whether a possibility has been found.

TheNetworkGuy commented 6 months ago

To follow up on this request: There is a huge difference on whether the individual interfaces should also have unique IP addresses. Is this also something that you want in your use case? Or does the functionallity implemented in https://github.com/netbox-community/netbox/issues/8137 cover that use case?

Furthermore could you give an example of your use case? For example a server with 1 management address and one for IPMI?

Domisiding commented 6 months ago

Hello, For example, if you have a server that is provisioned via "iDRAC". You have one IP for the "iDRAC" and one IP for the regular server.

For example, if you want to monitor the iDRAC and the things on the server. If you have the iDRAC on interface 1, SNMP should be running there and the main (primary) IP of the Zabbix agent on interface 2.

192.0.0.1 (Interface 1 <- SNMP) 192.0.0.2 (Interface 2 | Primary <- Zabbix Agent)

TheNetworkGuy commented 6 months ago

Okay so with the new out-of-band management IP address field this is a lot simpeler. However i'm struggeling with the logic of interface adjustments. When an IP address changes, which one of the 2 interfaces should be adjusted? Or if the protocol switches from agent to SNMP, how would the sync script have any idea which interface to adjust? Stretching this issue further templates are linked to interfaces for certain functons. So Zabbix could complain about resetting an interface (or both interfaces.) I'll look into this but unfortunately i can't promise much.

A workaround for now (although a bit cumbersome) would be to have 2 hosts for a server. One for the agent coming from Netbox and 1 manually configured for the IPMI.