TheNetworkGuy / netbox-zabbix-sync

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

add snmp version #32

Closed patricklind closed 1 year ago

patricklind commented 1 year ago

Is it possible to add a select box to snmp v1 / v2c

TheNetworkGuy commented 1 year ago

You can set this with the config context. Can you verify that this works?


{
    "zabbix": {
        "interface_port": 161,
        "interface_type": 2,
        "snmp": {
            "bulk": 1,
            "community": "SecretCommunity",
            "version": 1
        }
    }
}
patricklind commented 1 year ago

2023-04-11 20:29:55,841 - Netbox-Zabbix-sync - WARNING - P5-LB1-SORT-ID1045: Unsupported SNMP version. 2023-04-11 20:29:55,919 - Netbox-Zabbix-sync - WARNING - P5-LB3-GUL-ID1044: Unsupported SNMP version.

TheNetworkGuy commented 1 year ago

Ah i see i made the script expecting SNMPv2 and SNMPv3 but never calculated for SNMPv1. I'll adjust the script to take SNMPv1 as well. However at the same time i would also like to advice to check if the equipment is SNMPv2 or v3 capable :P

TheNetworkGuy commented 1 year ago

if(self.interface["details"]["version"] == '2'):

Should be either 1 or 2. Easy fix.

TheNetworkGuy commented 1 year ago

@patricklind Can you do a pull of the repo and test if SNMP v1 works with the config context? :)