Skip to content
Examples on how to use the licenses service.
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
configs
test
.editorconfig
.gitattributes
.gitignore
LICENSE
README.md
docker-compose.engine-and-license-service.yml
docker-compose.metrics.yml
docker-compose.only-engine.yml
go.mod
go.sum
renovate.json

README.md

Qlik Core Licensing Examples

CircleCI

This repository contains several examples that show you how to set up the Qlik Licenses service with or without a license, and how to use licenses service metrics to monitor your license usage. Each example includes a runnable test to verify the setup. To run these tests, you must have Go installed.

Using Qlik Core community version without a license

The docker-compose.only-engine.yml file contains an example configuration of the Qlik Associative Engine without a license.

To start it, run the following command:

ACCEPT_EULA=<yes/no> docker-compose -f docker-compose.only-engine.yml up -d

You can verify that the Qlik Associtaive Engine only allows five concurrent sessions by running the following command:

go test test/no_license_test.go test/utils_test.go -count=1

Using Qlik Core with a license

The docker-compose.engine-and-license-service.yml file contains an example configuration of the Qlik Associative Engine and the Qlik Licenses service.

The yml file contains an address parameter: -S LicenseServiceUrl=http://licenses:9200. This tells Qlik Associative Engine where to find the licenses service.

The yml file also contains an environment variable LICENSE_KEY. This variable should be set to your license key. You also need to specify your cost per session and your total license time as specified in your license on line 74 and 75 in the file test/with_license_test.go

To start it, run the following command:

ACCEPT_EULA=<yes/no> docker-compose -f docker-compose.engine-and-license-service.yml up -d

A valid license allows you to run more than five concurrent sessions. You can verify the license and that the correct amount of the license has been consumed by running the follow command:

go test test/with_license_test.go test/utils_test.go -count=1

Using the Qlik Licenses service metrics to monitor your license usage

Both the Qlik Associative Engine and the Qlik Licenses service expose metrics endpoints that can you can use to monitor the current license status.

The docker-compose.metrics.yaml sets up Prometheus and Grafana. In this example, these two services will be configured on startup. Prometheus is set up to scrape the relevant license metrics and Grafana is set up with a preconfigured dashboard for license monitoring.

To start the monitoring example, run the following command:

ACCEPT_EULA=<yes/no> docker-compose -f docker-compose.engine-and-license-service.yml -f docker-compose.metrics.yml up -d

You should now be able to monitor the current license consumption in the preconfigured Grafana dashboard here.

By default, the dashboard updates every 5 seconds. You can try out the monitoring by either using the test case mentioned in previous section, or by opening sessions using enigma-go or enigma.js.

You can’t perform that action at this time.