dainok / netdoc

Automatic Network Documentation plugin for NetBox
GNU General Public License v3.0
89 stars 13 forks source link

Ability to re-run discovery on failed connection/1 log devices #13

Closed andyb2000 closed 1 year ago

andyb2000 commented 1 year ago

I'm seeing on my bulk run some devices seem to get timeouts/unable to connect first time round. If I search for them and run a single discover they succeed (suspect too many concurrent connections to device, etc).

On those devices, netdoc shows: ID Created Discoverable Device Command Order Configuration Supported Success Parsed Ingested
135576 2023-06-13 02:55 194.x.x.x via netmiko_cisco_ios — show running-config | include hostname 0 ✘ ✔ ✘ ✘ ✘

I'm going to look at creating a script/option to detect a discoverable with only 1 failed hostname discovery job so that I can do a bulk re-run (unless any better suggestions?)

andyb2000 commented 1 year ago

(more of a feature, but I can't add a label to the repo)

dainok commented 1 year ago

Can you please check in discoverable if you have a last_discovered_at date?

Seems to me a bug not a feature. last_discovered_at should help but maybe it's not working as expected.

andyb2000 commented 1 year ago

Oh interesting, yes you're right it shows a last_discovered despite it clearly failing:

image

dainok commented 1 year ago

Bug confirmed. Should check Nornir API.

dainok commented 1 year ago

@andyb2000 could you check https://github.com/dainok/netdoc/pull/14

andyb2000 commented 1 year ago

Testing now (Have had to re-base my changes and do a lot to merge any custom stuff I've done, so taking time to get back on track to be able to pull from master!)

Will report back asap on this and others