Command: license inspect
Enterprise
This command is only present in Nomad Enterprise.
The license inspect
command is used to inspect and validate a Nomad Enterprise
license. It will read the license from a file on disk or an environment variable
and exit non-0 if the license is not valid with the Nomad binary.
This command should always be run with the new binary before upgrading Nomad on a server, as the server agent will not start with an invalid license.
Usage
nomad license inspect [/path/to/license.hclic]
Examples
With a license file argument:
$ nomad license inspect /path/to/nomad/license.hclicSource: /path/to/nomad/license.hclicProduct: nomadLicense ID: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaaCustomer ID: bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbbInstallation ID: *Issue Time: 2021-12-01 17:49:23.021041516 +0000 UTCStart Time: 2021-12-01 00:00:00 +0000 UTCExpiration Time: 2023-12-01 00:00:00 +0000 UTCTermination Time: 2024-01-01 00:00:00 +0000 UTCBuild Date: 2000-01-01 00:00:00 +0000 UTCFlags: { "modules": [ "multicluster-and-efficiency", "governance-policy" ]} License is valid
With a license file environment variable:
$ export NOMAD_LICENSE_PATH=/path/to/nomad/license.hclic$ nomad license inspectSource: /path/to/nomad/license.hclic (path from the NOMAD_LICENSE_PATH environment variable)Product: nomad.....License is valid
With a license string environment variable:
$ export NOMAD_LICENSE=full-license-text-string$ nomad license inspectSource: NOMAD_LICENSE environment variable.....License is valid
Example error
$ nomad license inspect license.hclic...Validation Errors: * license is no longer valid * license expiration date is before version build date: expiration=2023-01-13T23:59:59Z build=2023-03-17T00:00:00Z