To use Airlock Microgateway, a valid license is required. Airlock Microgateway is available in a Premium and a free Community edition. The available editions are compared in the article Airlock Microgateway license editions.
Configure and change the license
- Store the license in the Microgateway Operator namespace, in a Kubernetes secret with the name
airlock-microgateway-license
and the keymicrogateway-license.txt
. Use the following command: - To change a license (e.g. when upgrading from Community to Premium), use
kubectl apply
to apply the new license to the airlock-microgateway-license secret in the airlock-microgateway-system namespace.
There is no need to restart the Airlock Microgateway Operator. Kubernetes Secrets are updated at intervals of about one minute. Wait for the new license to become active.
Monitor license information with metrics and logs
Apart from the Community edition license, you should always order a Premium edition license that covers your (calendar-based) monthly request count.
We have implemented a set of license-related metrics. Use them to monitor if your current Airlock Microgateway license is still sufficient and to update/change your license in time.
- Metrics:
- License-related metrics with explanations are listed below in this article.
For a detailed list of available metrics with a short description, see available metrics in Prometheus format.
- Operator logs:
- License information on a daily base for
- license expiration due date,
- on expired license,
- when license is missing or invalid.
- License details at every start of the Microgateway Operator or after license exchange/upgrade.
Behavior with invalid or expired licenses
Licenses are treated either as valid, invalid or expired. Differences between invalid and expired licenses are shown in the following table.
- Corresponding metrics:
microgateway_license_valid
microgateway_license_expiry_timestamp_seconds
License validity | Definition and behavior |
---|---|
Valid license |
|
Invalid license |
|
Expired license |
|
- Operator and Pods are not affected by the license status:
- The Airlock Microgateway Operator runs normally for sidecar-based and sidecarless installations.
- For sidecar-based installations, the Airlock Microgateway Operator injects the Microgateway Engine sidecar container into Pods based on labels. Therefore, only labeled Pods are affected. See list of Annotations for the Microgateway Operator.
Monitor the licensed throughput
The Airlock Microgateway premium license model is trust-based and applies to calendar-based monthly request rates and you should upgrade your license if the number of requests exceeds the licensed count. To monitor the requests per calendar month, follow our example Prometheus request configuration and set up a Grafana licensing dashboard or similar.
Note that monitoring the throughput of a Community Edition license is unnecessary, as this edition has a hard limit.
Due to the default Prometheus storage retention, licensing information might get lost. Therefore, we recommend setting up a dedicated Prometheus deployment with a higher storage retention for license monitoring or other Microgateway metrics.
Prometheus query examples
For total request count monitoring, the metric microgateway_license_http_rq_total
is available.
Example A – standard query The following Prometheus query will generate smoothed-out metrics over 30 days. This can be useful for a quick visualization using round(sum(increase(microgateway_license_http_rq_total[30d:15s]))) |
Example B – refined query for Grafana usage As Airlock Microgateway licensing is based on a calendar month, you could use the following Prometheus query to allow for This month and Previous month filtering in Grafana: round(sum(increase(microgateway_license_http_rq_total[$__range:15s]))) |
How to interpret a Grafana licensing dashboard view
Interpreting the metrics to check the licensing situation with a Grafana dashboard is easy if you add a threshold line according to the licensed throughput.
- Prepare a Grafana dashboard:
- Find out the licensed requests limit per month count. For this, either check your premium license order or read out the metric value:
- Configure an absolute threshold line based on the request limit as described in the Grafana thresholds documentation.
- Add the refined Grafana query from Example B:
- Adjust the Grafana Query options, e.g., to 1M/M to visualize the request counts for the last and current calendar month. For more information see Grafana query option documentation.
- Whenever the monthly request count in the chart is below the threshold line, the Airlock Microgateway license is sufficient.
round(sum(increase(microgateway_license_http_rq_total[$__range:15s])))
Further information and links
- Internal links:
- Airlock Microgateway license editions
- Annotations for the Microgateway Operator
- Configuration and monitoring of licenses
- Using Microgateway Prometheus metrics
- External links:
- Request a community license: https://airlock.com/en/microgateway-community
- Request a premium license: https://airlock.com/en/microgateway-premium
- Grafana thresholds documentation
- Grafana query option documentation