A customized NetBox agent to run on Hosterra's servers
- Python 99.9%
- Shell 0.1%
| netbox_agent | ||
| tests | ||
| .gitignore | ||
| dev-requirements.txt | ||
| LICENSE | ||
| netbox_agent.yaml.example | ||
| README.md | ||
| renovate.json | ||
| requirements.txt | ||
| setup.py | ||
| tox.ini | ||
Netbox agent
This project aims to create hardware automatically into Netbox based on standard tools (dmidecode, lldpd, parsing /sys/, etc).
The goal is to generate an existing infrastructure on Netbox and have the ability to update it regularly by executing the agent.
Features
- Create servers, chassis and blade through standard tools (
dmidecode) - Create physical network interfaces with IPs
- Generic ability to guess datacenters and rack location through drivers (
cmdandfileand custom ones) - Update existing
DeviceandInterfaces - Handle blade moving (new slot, new chassis)
Known limitations
- The project is only compatible with Linux.
Since it uses
ethtooland parses/sys/directory, it's not compatible with *BSD distributions. - Netbox
>=2.6.0,<=2.6.2has a caching problem ; if the cache lifetime is too high, the script can get stale data after modification.
Configuration
netbox:
url: 'http://netbox.internal.company.com'
token: supersecrettoken
datacenter_location:
# driver_file: /opt/netbox_driver_dc.py
driver: file:/etc/qualification
regex: "datacenter: (?P<datacenter>[A-Za-z0-9]+)"
# driver: 'cmd:lldpctl'
# regex = 'SysName: .*\.(?P<datacenter>[A-Za-z0-9]+)'```
Hardware
Tested on:
Dell Inc.
Blades
- PowerEdge M1000e (your
DeviceTypeshould have slots namedSlot 01and so on) - PowerEdge M640
- PowerEdge M630
- PowerEdge M620
- PowerEdge M610
Pizzas
- DSS7500
HP
Blades
- HP BladeSystem c7000 Enclosure G2 / G3 (your
DeviceTypeshould have slots namedBay 1and so on) - HP ProLiant BL460c Gen8
- HP ProLiant BL460c Gen9
Pizzas
- ProLiant DL380p Gen8
HPE
- HPE ProLiant XL450 Gen10
TODO
- Handle switch <> NIC connections (using lldp)
- CPU, RAID Card(s), RAM, Disks in
Device'sInventory CustomFieldssupport with firmware versions for Device (BIOS), RAID Cards and disks