Updating Netbox via API device interfaces #20112
Unanswered
tmrmoonil
asked this question in
Help Wanted!
Replies: 1 comment
-
I think I resolve it, it was an unrelated error that was causing it. Closing question. I was missing a vlan for the site I was updating any I think that was breaking some of my API calls. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
NetBox Community v4.3.0-Docker-3.2.1
I am running into an issues where I am querying my switches and I am lookup to update my switch interfaces via the API. I was trying to look for patterns to see what is the max I can send and how often. I've tried:
Increase Delays Between Switches - 30 secs
Increase Delays Between Chunks - 25 seconds (chuck size is 3), example:
2025-08-16 15:43:59,017 - BandwidthDataCollector - DEBUG - Chunk 2 payload preview: [
{
"id": 2094,
"mode": "access",
"untagged_vlan": 31,
"tagged_vlans": []
},
{
"id": 2095,
"mode": "access"
}
]...
Sometimes it updates:
2025-08-16 15:43:59,016 - BandwidthDataCollector - INFO - Sending chunk 2/4 with 3 updates for switchA.
2025-08-16 15:43:59,017 - BandwidthDataCollector - DEBUG - Chunk 2 payload preview: [
{
"id": 2094,
"mode": "access",
"untagged_vlan": 31,
"tagged_vlans": []
},
{
"id": 2095,
"mode": "access"
}
]...
2025-08-16 15:43:59,017 - BandwidthDataCollector - DEBUG - Attempt 1/3 for batch_update_objects with timeout 60s
2025-08-16 15:43:59,017 - urllib3.connectionpool - DEBUG - Resetting dropped connection: netbox-mcp-green
2025-08-16 15:43:59,312 - urllib3.connectionpool - DEBUG - http://netbox-mcp-green:8002 "POST /tools/call HTTP/1.1" 200 5368
2025-08-16 15:43:59,313 - BandwidthDataCollector - DEBUG - Successfully called batch_update_objects on attempt 1
2025-08-16 15:43:59,313 - BandwidthDataCollector - INFO - ✓ Successfully sent chunk 2/4 for SwitchA
2025-08-16 15:43:59,313 - BandwidthDataCollector - INFO - Some failures detected. Waiting 25s before next chunk...
2025-08-16 15:44:24,313 - BandwidthDataCollector - INFO - Sending chunk 3/4 with 3 updates for SwitchA
Sometimes it fails.
2025-08-16 15:43:59,313 - BandwidthDataCollector - INFO - Some failures detected. Waiting 25s before next chunk...
2025-08-16 15:44:24,313 - BandwidthDataCollector - INFO - Sending chunk 3/4 with 3 updates for SwitchA.
2025-08-16 15:44:24,313 - BandwidthDataCollector - DEBUG - Chunk 3 payload preview: [
{
"id": 3559,
"custom_fields": {
"is_safe_port": true
},
"mode": "access"
},
{
"id": 3560,
"custom_fields": {
"is_safe_port": false
},
"mode": "tagged",
"tagged_vlans": [
37,
38,
39,
41,
43,
48,
52,
57,
25
],
"untagged_vlan": null
}
]...
2025-08-16 15:44:24,314 - BandwidthDataCollector - DEBUG - Attempt 1/3 for batch_update_objects with timeout 60s
2025-08-16 15:44:24,314 - urllib3.connectionpool - DEBUG - Resetting dropped connection: netbox-mcp-green
2025-08-16 15:44:24,491 - urllib3.connectionpool - DEBUG - http://netbox-mcp-green:8002 "POST /tools/call HTTP/1.1" 503 158
2025-08-16 15:44:24,491 - BandwidthDataCollector - WARNING - Service unavailable (503). Retrying in 10s... (attempt 1)
2025-08-16 15:44:34,491 - BandwidthDataCollector - DEBUG - Attempt 2/3 for batch_update_objects with timeout 90s
2025-08-16 15:44:34,492 - urllib3.connectionpool - DEBUG - Resetting dropped connection: netbox-mcp-green
2025-08-16 15:44:34,654 - urllib3.connectionpool - DEBUG - http://netbox-mcp-green:8002 "POST /tools/call HTTP/1.1" 503 158
2025-08-16 15:44:34,654 - BandwidthDataCollector - WARNING - Service unavailable (503). Retrying in 20s... (attempt 2)
2025-08-16 15:44:54,654 - BandwidthDataCollector - DEBUG - Attempt 3/3 for batch_update_objects with timeout 120s
2025-08-16 15:44:54,655 - urllib3.connectionpool - DEBUG - Resetting dropped connection: netbox-mcp-green
2025-08-16 15:44:54,805 - urllib3.connectionpool - DEBUG - http://netbox-mcp-green:8002 "POST /tools/call HTTP/1.1" 503 158
2025-08-16 15:44:54,805 - BandwidthDataCollector - ERROR - Service unavailable after 3 attempts. Giving up.
2025-08-16 15:44:54,805 - BandwidthDataCollector - WARNING - ⚠ Chunk 3 returned no results. Response: None
2025-08-16 15:44:54,806 - BandwidthDataCollector - INFO - Waiting 15s before retry...
Has anyone experienced this issue. Is there some type of limit I'm hitting. I'm trying to update my netbox with all my device information (over 700 devices) first before I can make my netbox my source of truth. Any help will be appreciate or alternatives way of doing this.
Beta Was this translation helpful? Give feedback.
All reactions