Automation
NetBox
Cheat sheet · https://pcornel.dk/topic.php?topic=5872
Answer
NetBox is an open-source source of truth for networks and data centres, modelling sites, racks, devices, interfaces, cables, IP addresses, VLANs and circuits, with a REST and GraphQL API for automation.
Remember
- Model intent in NetBox before configuring devices.
- Use the API or pynetbox for automation.
- Webhooks can trigger automation on changes.
First checks
curl -s -H 'Authorization: Token <t>' https://<netbox>/api/status/— version and plugins- Data model coverage (sites, devices, IPAM, circuits) — usage
- Backups of NetBox DB and media — recovery
Verify in this order
NetBox data → API/webhooks → automation
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5872