NetBox Software Discovery¶
netbox-software-discovery adds a software inventory to NetBox. An agent in each guest reports its packages and services every 15 minutes, and NetBox keeps the version history.
ansible-playbook playbooks/software_discovery.yml:
- Plugin (
--tags plugin, rolenetbox_software_discovery). On the first install the NetBox LXC is snapshotted first (pre_software_discovery; undo withpct rollback 158 pre_software_discoveryon node11). Then pip into/opt/netbox/venv, a line inlocal_requirements.txtso NetBox upgrades keep it,PLUGINS/PLUGINS_CONFIG, migrate, and a restart. - Service account
software-agent. Its only permission is to view, add and change software-discovery objects. Its token is created once and kept in/root/netbox-software-agent.tokenon the NetBox LXC. - Agents (
--tags agents, rolenetbox_software_agent) in every managed guest with Python 3.12 or newer (Debian 13, Ubuntu 24.04). Guests with older Python are skipped. Each agent is bound to its NetBox VM by ID and runs as the unprivileged usernetbox-agent. Container discovery is off because it needs root-level socket access.
Results: NetBox → Plugins → Software Discovery, or /api/plugins/software-discovery/api/software/.
NetBox here has no API_TOKEN_PEPPERS, so the agents use a classic (v1) token.