scaleway / netbox-netprod-importer

Poll data from network devices in production and import it into netbox
GNU General Public License v3.0
101 stars 31 forks source link

Unable to Poll JunOs Devices #54

Open mhonicat opened 3 years ago

mhonicat commented 3 years ago

Not shure if this is a Bug, or if i simply have some Error in my Config, but i am struggling to get this running. We have several Juniper EX4200 and some QFX5110 Junipers which i'd like to inventorize to Netbox but this always fails with an list index out of rangeError. I tried it on my Mint 20 Workstation, which is basically Ubuntu 20.04 with Python 3.8.5.

My Configs:

########################
#### Global options ####
########################

## Be more verbose ##
debug: False

################
#### Netbox ####
################

netbox:
  # Netbox API URL
  url: "https://netbox.labs/api"
  # username: "user"
  # password: "password"
  # or to use a token instead
  token: "{redacted}"

##########################
#### Interconnections ####
##########################

# On some devices, LLDP will expose the host FQDN. If devices are stored on
# Netbox only by their hostname, the interconnection process will not be able
# to find them. Fill this list to strip the domain name from exposed names.
#remove_domains:
#  - "foo.tld"
#  - "bar.tld"

# vim: set ts=2 sw=2:
import/juniper.yml:

j3-ixion.labs:
  driver: "junos"
./netbox-netprod-importer import -u mho -p -f import/juniper.yml
Password: 
Initializing importers...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 562.09it/s]
Fetching and pushing data...
  0%|                                                                                                                                                                                                                   | 0/1 [00:00<?, ?it/s]ERROR: netbox_importer: Error when polling device j3-ixion.labs: list index out of range
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:15<00:00, 15.51s/it]

Tried to query the Switch with napalm directly which is working fine. Any Ideas? Thanks!