NAPALM Integration Features

946 views
Skip to first unread message

bsa...@turnitin.com

unread,
Aug 15, 2017, 3:39:10 PM8/15/17
to NetBox
I finally got upgraded to v2.1.2 and have spent quite a few hours trying to figure out how to make some of the new NAPALM integrations to work (web interface only, at this point). 

The short version of my question... Has anyone gotten LLDP information to populate for Cisco devices? If you have, did you have to do anything special to make it work? 

So far, after installing NAPALM:
 - I've been able to get the device facts to fully populate and the environment to somewhat populate, under the status tab of Cisco ISR's. 
    - On Cisco 3850's, I get the following error: {"detail":"Error connecting to the device at <mgmt_ip>: local variable 'proc_used_mem' referenced before assignment"}

 - I can see the configurations of all my Cisco devices, except NX-OS devices. 

 - I don't see any LLDP information for any device, only the Netbox configured interface information. There are no errors, it just doesn't populate LLDP information. 

 - For any NAPALM integration, when looking at an NX-OS device, I get a connection refused error, so I know I need to figure that out (I suspect something to do with it appearing to attempt a connection on port 443).

To get to this point, I created a new configuration.py file, so it had the updated NAPALM parameters. 
I've added NAPALM_ARGS = {'secret': NAPALM_PASSWORD,} to configuration.py because, if I read the Netbox documentation correctly, this may be required by some Cisco devices.
If necessary, I changed the platform NAPALM driver to match the NAPALM driver name per the documentation.

Hopefully, I'm at least on the right track?

Jeremy Stretch

unread,
Aug 15, 2017, 3:48:28 PM8/15/17
to bsa...@turnitin.com, NetBox
> I don't see any LLDP information for any device, only the Netbox configured interface information.

Check that the interface names you've defined in NetBox match the interface names on the device. For instance, "Gi0/1" is not the same as "GigabitEthernet0/1". You can try issuing the LLDP request manually with the following command to see what the device is returning:

    https://<netbox>/api/dcim/devices/<pk>/napalm/?method=get_lldp_neighbors

Hope that helps!

Jeremy


--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/64945b55-a8d0-4889-93ce-451e810eba6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bsa...@turnitin.com

unread,
Aug 15, 2017, 3:59:02 PM8/15/17
to NetBox
Here is what I get when I issue https://<netbox>/api/dcim/devices/<pk>/napalm/?method=get_lldp_neighbors

HTTP 503 Service Unavailable
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "detail": "Error connecting to the device at <ip_addr>: local variable 'local_int_brief' referenced before assignment"
}

I am guessing it is a simple solution, as that is very similar to what I see with the status tab, but I'm not sure where I've gone wrong.

On Tuesday, August 15, 2017 at 1:48:28 PM UTC-6, Jeremy Stretch wrote:
> I don't see any LLDP information for any device, only the Netbox configured interface information.

Check that the interface names you've defined in NetBox match the interface names on the device. For instance, "Gi0/1" is not the same as "GigabitEthernet0/1". You can try issuing the LLDP request manually with the following command to see what the device is returning:

    https://<netbox>/api/dcim/devices/<pk>/napalm/?method=get_lldp_neighbors

Hope that helps!

Jeremy

On Tue, Aug 15, 2017 at 3:39 PM, <bsa...@turnitin.com> wrote:
I finally got upgraded to v2.1.2 and have spent quite a few hours trying to figure out how to make some of the new NAPALM integrations to work (web interface only, at this point). 

The short version of my question... Has anyone gotten LLDP information to populate for Cisco devices? If you have, did you have to do anything special to make it work? 

So far, after installing NAPALM:
 - I've been able to get the device facts to fully populate and the environment to somewhat populate, under the status tab of Cisco ISR's. 
    - On Cisco 3850's, I get the following error: {"detail":"Error connecting to the device at <mgmt_ip>: local variable 'proc_used_mem' referenced before assignment"}

 - I can see the configurations of all my Cisco devices, except NX-OS devices. 

 - I don't see any LLDP information for any device, only the Netbox configured interface information. There are no errors, it just doesn't populate LLDP information. 

 - For any NAPALM integration, when looking at an NX-OS device, I get a connection refused error, so I know I need to figure that out (I suspect something to do with it appearing to attempt a connection on port 443).

To get to this point, I created a new configuration.py file, so it had the updated NAPALM parameters. 
I've added NAPALM_ARGS = {'secret': NAPALM_PASSWORD,} to configuration.py because, if I read the Netbox documentation correctly, this may be required by some Cisco devices.
If necessary, I changed the platform NAPALM driver to match the NAPALM driver name per the documentation.

Hopefully, I'm at least on the right track?

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.

Jeremy Stretch

unread,
Aug 15, 2017, 4:04:10 PM8/15/17
to bsa...@turnitin.com, NetBox
Unfortunately that error comes directly from NAPALM; nothing we can do about it in NetBox. Looks like it might be related to this issue: https://github.com/napalm-automation/napalm-ios/issues/141


To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/738024bb-b826-48bf-a776-6a3aa9bba742%40googlegroups.com.

bsa...@turnitin.com

unread,
Aug 15, 2017, 5:26:34 PM8/15/17
to NetBox
I did verify that does seem to be the issue. It just so happened that every device I tested for LLDP had an LLDP neighbor device with a space in the name (i.e. "Cisco IP Phone"). Devices that only have neighbors without a space in the LLDP Device ID show up just fine in Netbox, as you mentioned, as long as the Interface name is the same (i.e. GigabitEthernet1/0/46, instead of Gi1/0/46)

Thanks
Reply all
Reply to author
Forward
0 new messages