kentik / ktranslate

System for pulling and pushing network data.
Apache License 2.0
56 stars 25 forks source link

Adding optional meraki bw limit info #718

Closed Rajupln917 closed 2 months ago

Rajupln917 commented 3 months ago

When we try to set the preference provided in the below issue, it completely stopped reporting data for that Meraki org with no errors in the logs.

preferences: show_uplink_bandwidth_limits: true

Issue refernce link: https://github.com/kentik/ktranslate/pull/686

Please check on this.

i3149 commented 2 months ago

The problem here is that this call is per network, not per organization like all of the others. This means iterating over all the networks you have while respecting the API timing limits meraki enforces. End result is that things can take a long time when there are a non trivial number of networks to go over.

Looking at the code, there's a cache so that subsequent calls will be fast, but the first time around will take a long time and block results, which is what you are seeing. Let me try to have it load the data in the background without blocking results. Then when the data is set, it will show up in the results. Seem resonable?

Rajupln917 commented 2 months ago

Yes, that helps! If you can shift the data load to the background