Software - edmozley/freeitsm GitHub Wiki
Software
Folder: software/
Colour: Indigo #5c6bc0
Software inventory tracking across the estate, plus a licence management database.
Inventory
Software inventory data is collected via the external API (api/external/software-inventory/submit/ or the more comprehensive api/external/system-info/submit/). Both endpoints authenticate with an API key generated at Software → Settings → API Keys.
The typical collection path is the PowerShell agent (scripts/Invoke-AssetInventory.ps1) — it enumerates installed software from the registry and posts to the system-info endpoint, which in turn updates the software inventory tables.
The inventory list shows each application with its publisher and two counts, each sortable: Installations - how many machines it was found on - and Licence seats - the seats on its active licences, added up. They are separate on purpose: a cloud application is installed on nothing, so 0 installations says nothing about whether anyone uses it; its licence seats do. (The headings read "Installed On" and "Seats" before PR #300.)
Dashboard (software/dashboard/)
Customisable Chart.js widget dashboard.
- Widget types: version distribution per application, top installed applications, publisher distribution
- Chart types: bar, pie, doughnut
- Drill-down: click any chart segment to see the underlying machines / details in a modal
- Cog icon for inline widget editing (open a modal to edit properties without leaving the dashboard)
- Drag-and-drop reordering
- Widget library for creating, editing, duplicating, and deleting widget definitions
Licences (software/licences/)
Software licence management database — record licences against applications in the software inventory.
Counted by, and term (5.11.0)
A licence answers two separate questions, so it has two fields. Before 5.11.0 there was one list - Per User, Per Device, Site, Concurrent, Subscription, Other - and a Microsoft volume licence, which is per device and perpetual, fitted none of it. (Asked for by a supporter of the project.)
Counted by - how many you may use: Per User, Per Device, Site, Concurrent, Other.
Term - how long it lasts:
| Term | Means | Renewal date |
|---|---|---|
| Subscription | Stops when you stop paying | The renewal; reminders on Watchtower and in the Calendar |
| Perpetual | Yours to keep; nothing renews | None - the field is hidden, and the list says No renewal |
| Perpetual with maintenance | Yours to keep, with support or upgrades that renew (Microsoft Software Assurance, say) | Labelled Maintenance renews; the reminders follow it. If maintenance lapses you still own the licence |
Term is optional: a licence with no term behaves as before.
Upgrading. Database Verification moves every licence whose type was Subscription to Term = Subscription, and any typed Perpetual (a word some installs and the old demo data used) to Perpetual - or Perpetual with maintenance when it had a renewal date. How those licences are counted was never recorded, so their Counted by shows Not set in the list until somebody picks one; opening and saving the licence asks for it. Nothing else changes, and running Database Verification again moves nothing.
REST API. licence_term on every licence (subscription | perpetual | perpetual_maintenance | null), on create and PATCH too. licence_type or licence_term is required. A client that still sends licence_type: "Subscription" gets Term = Subscription. A perpetual licence's renewal_date and notice_period_days are cleared.
Tracked fields
- Licence key (encrypted at rest)
- Cost, in any currency (see Currencies)
- Renewal date — colour-coded warnings (overdue / approaching / OK)
- Portal URL (for the vendor's renewal/admin portal)
- Vendor contact
- Notes
- Status (Active / Expired / Cancelled)
Listing
Searchable and sortable table with status badges. CSV export of all licence data for spreadsheet analysis.
Seats (#437)
Open a licence: Seats says who uses it.
- Give a seat: search for a person or a device to give them one, and use Remove to take it back. Per user licences take people, Per device take devices, and any other kind takes either.
- Used: the list's Used column says 22 of 25 used. Giving out more seats than the licence has is allowed, because the software is usually in use already while a true-up is ordered, and it shows in red.
- History: a removed seat is kept under Earlier holders.
Where seats show:
- A person's page in People lists the licences they use, both their own seats and those on a device they hold.
- A device's Software tab lists its seats.
- The portal: with System → Self-service portal → Show licences and software on My equipment (off by default), people see their licences on My equipment. Only the names are shown, never a key or a cost.
Software by hand. The inventory agent and Intune record what is installed and keep it up to date. For a machine they can't reach, a device's Software tab can Add software by hand from the applications in Software. It's marked Added by hand, stays until someone removes it, and only those rows can be removed there.
How it works: Licence seats - Developer Guide.
Settings
- API Keys: generate and revoke keys for the external software-inventory submission API and the browser extension
- Rate limit configurable in System Settings (default 60 requests/min per key)
Help
Interactive guide at software/help.php covering software inventory, dashboard widgets, licence management, data collection, settings.
Key Tables
| Table | Purpose |
|---|---|
software_inventory |
One row per machine × installed application |
software_licences |
Licence records. licence_type = how it is counted; licence_term (5.11.0) = how long it lasts. SoftwareService (includes/services/software.php) is the one place they are written: TERMS, legacyTerm() (the old "Subscription" type, sent), migrateLegacyTerms() (Database Verification), termReady() (the column exists yet). Test: tests/software-licence-term.php |
software_licence_assignments |
(#437) A licence's seats: a person (user_id) or a device (asset_id); removed_datetime set = an earlier holder. SoftwareSeats (includes/services/software_seats.php) |
apikeys |
Generated API keys with usage tracking. ⚠️ Note the spelling: apikeys, not api_keys, which is the separate REST API v1 key store behind System → API. Two different key systems, and only this one authenticates the inventory agent |