====== NetBox ====== NetBox ist eine inventarisierungssoftware (Datacenter Inventory Management oder DCIM) bzw. IP Address Management (IPAM): * Präfixe / IP-Adressen * physischer Ressourcen wie Server, Racks, RZ-Räume, Switches, PDUs oder ähnlicher Geräte * virtuelle Maschinen Abhängigkeiten: * device -> interfaces -> IPs -> prefix -> VLAN * virtualmachine -> vminterfaces -> IPs -> prefix -> VLAN https://www.youtube.com/watch?v=D5iDdjZMUeo ===== Links ===== * [[https://docs.netbox.dev/en/stable/|NetBox]] * https://docs.ansible.com/ansible/latest/collections/netbox/netbox/index.html| * https://www.youtube.com/watch?v=AmFu0UL6Hrs * [[https://gist.github.com/decoupca/d4ceef8d1bfa1fed04b07eb87558f9a3|Multiple AD LDAP authentication backends]] ===== ansible ===== * **Installation**: [[https://github.com/selfhostx/ansible/blob/main/roles/netbox|Rolle für ansible]]: [[https://github.com/selfhostx/ansible/blob/main/roles/netbox/playbook.yml|playbook]]. * **[[https://docs.ansible.com/ansible/latest/collections/netbox/netbox/index.html|Community collection für netbox]]**: * [[https://docs.ansible.com/ansible/latest/collections/netbox/netbox/nb_inventory_inventory.html#ansible-collections-netbox-netbox-nb-inventory-inventory|nb_inventory inventory NetBox inventory source]] * [[https://docs.ansible.com/ansible/latest/collections/netbox/netbox/nb_lookup_lookup.html#ansible-collections-netbox-netbox-nb-lookup-lookup|nb_lookup lookup Queries and returns elements from NetBox]] ===== plugins ===== * [[https://github.com/jeremyschulman/netbox-plugin-auth-saml2|Netbox Plugin for SSO using SAML2]] * [[https://github.com/networktocode/ntc-netbox-plugin-onboarding|bulk create]] * [[https://github.com/lopes/netbox-scanner|A scanner util for NetBox, because certain networks can be updated automagically]] * [[https://github.com/tobiasge/netbox-initializers|Load data from YAML files into Netbox]] * [[https://github.com/netdevopsbr/netbox-proxbox|Netbox Plugin for integration between Proxmox and Netbox]] * [[https://github.com/TheNetworkGuy/netbox-zabbix-sync|Netbox to Zabbix synchronization (das guck ich mir mal an)]] ===== API ===== abfragen: ''curl -H "Authorization: Token $TOKEN" -H "Accept: application/json; indent=4" https://$FQDN_NETBOX/api/dcim/sites/'' Beispiel IP-Adressen eines Präfix 1.2.3.4/24 anzeigen: ''curl -H "Authorization: Token $TOKEN" -H "Accept: application/json; indent=4" https://$FQDN_NETBOX/api/ipam/ip-addresses/?parent=1.2.3.4/24''