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 /graph, the built-in Prometheus expression browser:

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.

  1. Prepare a Grafana dashboard:
  2. Find out the licensed requests limit per month count. For this, either check your premium license order or read out the metric value:
  3. copy
    microgateway_license_max_rq_count_per_month
  4. Configure an absolute threshold line based on the request limit as described in the Grafana thresholds documentation.
  5. Add the refined Grafana query from Example B:
  6. round(sum(increase(microgateway_license_http_rq_total[$__range:15s])))
  7. 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.
  8. Whenever the monthly request count in the chart is below the threshold line, the Airlock Microgateway license is sufficient.