Skip to content

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:

  1. Plugin (--tags plugin, role netbox_software_discovery). On the first install the NetBox LXC is snapshotted first (pre_software_discovery; undo with pct rollback 158 pre_software_discovery on node11). Then pip into /opt/netbox/venv, a line in local_requirements.txt so NetBox upgrades keep it, PLUGINS / PLUGINS_CONFIG, migrate, and a restart.
  2. 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.token on the NetBox LXC.
  3. Agents (--tags agents, role netbox_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 user netbox-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.