Monitoring Microgateway licenses

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 License editions.

License validity and behavior

Licenses are treated either as valid, invalid or expired. The differences between valid, invalid and expired licenses are described in the following table.

License validity

Definition

Microgateway Engine behavior

Valid license

  • Valid license (metric microgateway_license_valid = 1).
  • Traffic is secured according to the configuration and the kind and scope of the license.

Invalid license

  • Missing or invalid signed license (metric microgateway_license_valid = 0).
  • All traffic is blocked.

Expired license

  • The license is expired (metric microgateway_license_valid = 0) as soon as the license expiry timestamp metric value is reached. Use microgateway_license_expiry_timestamp_seconds to monitor the license expiry date.
  • Pods created before the license expiry timestamp run normally.
  • Pods created after the license expiry timestamp block all traffic.

Monitor the licensed throughput

The Airlock Microgateway premium license model is trust-based and applies to calendar-based monthly request rates. You should upgrade your license if the number of requests exceeds the licensed count. Monitoring the throughput of a Community Edition license is not necessary, as this edition has a hard limit.

 
Info

Due to the default Prometheus storage retention, metrics data might not cover the required time range. Therefore, we recommend setting up a dedicated Prometheus deployment with a higher storage retention for metrics that monitor license throughput.

Microgateway license dashboard

The easiest way to get an estimate of the license relevant request count, use the Microgateway licensing dashboard, which is created and maintained by Airlock. For more information see Grafana dashboards for metrics and log visualization.

With your own tooling

To monitor license usage with your own monitoring stack, use the following Prometheus metrics exposed by the Microgateway Operator:

  • microgateway_license_http_rq_total (counter): Total number of license relevant HTTP requests processed. To determine license usage, calculate the increase of the number of requests within a calendar month.
  • microgateway_license_max_rq_count_per_month (gauge): The licensed request count per month.