Monitor the licensed throughput

Prometheus metrics as the preferred source

The following two Prometheus metrics provided by Airlock Microgateway can be used to ensure that you are properly licensed:

  • airlock_throughput
  • airlock_throughput_licensed

Using for example Grafana as the dashboard generator, the above metrics can be used for building a licensing dashboard.
The following metric definitions use the time-series format in Grafana with Prometheus as the data source with Microgateway's in a Kubernetes cluster:

Legend:   Licensed
Metrics:  max(airlock_throughput_licensed{kubernetes_service_name=~".+"}) 

Legend:   Total
Metrics:  sum(airlock_throughput{kubernetes_service_name=~".+"})   

How to interpret a licensing dashboard view

Interpreting the metrics to verify the licensing situation using a Grafana or Prometheus dashboard is easy. Whenever Total is below the red Licensed line, the Microgateway license is sufficient.

In this Grafana example, a license upgrade is required:

Figure: Grafana dashboard showing licensed and actual throughput of all Microgateway pods.

Log aggregation as alternative solution

The Microgateway runtime container periodically logs the request throughput. The logged throughput req_rate can be aggregated over all running Microgateways to compare it to the licensed throughput.

   "message":"Request statistics"}

Using Prometheus metrics to monitor the licensed throughput might be easier than building a solution on the log messages. In case that Prometheus is absent, aggregating logs could be a fallback.