Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 31 additions & 5 deletions 08.Server-installation/07.Device-license-count/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ The Device Authentication service gathers data about devices. It also provides a
to count the number of accepted devices and store it as licensing data: `license-count`.

```shell
# deviceauth-enterprise license-count --help
# deviceauth license-count --help
NAME:
deviceauth-enterprise license-count - Count licenses and store the results
deviceauth license-count - Count licenses and store the results

USAGE:
deviceauth-enterprise license-count [arguments...]
deviceauth license-count [arguments...]

DESCRIPTION:
Counts the devices licenses and stores the result for later processing.
Expand All @@ -27,6 +27,32 @@ It saves the device count daily for future inspection and otherwise does not inf

For production installations with Kubernetes, the cronjob is already prepared and will be running daily
<!--AUTOVERSION: "at [3am](https://github.com/mendersoftware/mender-helm/blob/%/mender/templates/device-auth-cron-license-count.yaml)."/ignore-->
at [3am](https://github.com/mendersoftware/mender-helm/blob/master/mender/templates/device-auth-cron-license-count.yaml).
at [3am](https://github.com/mendersoftware/mender-helm/blob/master/mender/templates/device-auth/cronjob_license_count.yaml).

You can download the device count and licenses report from the Mender UI in the Organization view by clicking on the link "Download license report".
You can download the device count and licenses report from the Mender UI in the Organization view by clicking on the link "Download license report":

![Mender logo](download_license_report.jpg)

Alternatively, if you have kubernetes access, you can run the report yourself:

```bash
DEVICEAUTH_POD=$(kubectl get pod -l 'app.kubernetes.io/component=device-auth' -o name | head -1)

kubectl exec -it $DEVICEAUTH_POD -- /usr/bin/deviceauth license-count
```

The output will look like this:

```text
INFO[2025-05-30T13:51:02Z] scanning deviceauth-xxxxx database caller="cmd.LicenseCount.countLicenses.func1@commands_enterprise.go:38"
INFO[2025-05-30T13:51:02Z] scanning deviceauth-xxxxx database finished; accepted devices count: 424242 caller="cmd.LicenseCount.countLicenses.func1@commands_enterprise.go:92"
INFO[2025-05-30T13:51:02Z] scanning deviceauth-yyyyy database caller="cmd.LicenseCount.countLicenses.func1@commands_enterprise.go:38"
INFO[2025-05-30T13:51:02Z] scanning deviceauth-yyyyy database finished; accepted devices count: 4242 caller="cmd.LicenseCount.countLicenses.func1@commands_enterprise.go:92"
```

!!! If you have Mender Server installed with the Mender Helm Chart older than v6.4.3,
!!! then you need to activate the license counting cronjob by defining it in the `values.yaml` file:
!!! ```yaml
!!! device_license_count:
!!! enabled: true
!!! ```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.