Metrics (Prometheus, OpenMetrics)

Airlock IAM provides a metrics endpoint that can be used for monitoring and other operational tasks.

This article outlines the available metrics and how to enable and configure the metrics endpoint.

Available metrics

The following lists outline the metrics available as of Airlock IAM 8.6. The metrics are provided by the Prometheus Java client library. More metrics may be added in later releases.

 
Info

To get the full list of metrics with names, types, and descriptions, call the metric endpoint in the web browser. It lists all available metrics in the Prometheus text format.

The URL depends on the IAM host and the metrics port in the instance configuration (see further below).

Example URL: http://iam-host:5555/metrics

 
Notice

For histograms, the maximum value is calculated on a per–time window basis. If no new measurements occur within a given time window, the reported maximum resets to “0”. This behavior is intentional and by design.

JVM-related metrics:

  • Buffer pool
  • Class loading and compilation
  • Garbage collection
  • Memory and memory pool allocation
  • Runtime information
  • Thread metrics

Process-related metrics:

  • CPU usage
  • File descriptor usage
  • Memory

License-related metrics:

Metric name

Metric type

Description

iam_license_expiry_in_seconds

gauge

The number of seconds in which the active license expires.

iam_license_max_instances

gauge

The maximum number of licensed instances on this system.

iam_license_max_users

gauge

The maximum number of licensed users on this system.

iam_license_valid

gauge

Whether the license is valid (“1”) or not (“0”).

iam_license_valid_from_timestamp_seconds

gauge

Unix epoch time (seconds) at which the active license becomes valid.

Metric formats and filters

The IAM metrics endpoint supports the following formats:

  • OpenMetrics text
  • Prometheus text
  • Prometheus protobuf

Single metrics names can be filtered using the URL query parameter name[] and the metric name.

Example: http://iam-host:5555/metrics?name[]=jvm_threads_current

Activation and configuration

The metric endpoint needs to be activated. It is disabled by default.

To activate the metric endpoint:

  1. Open the instance configuration (instance.properties) in an editor.
  2. Add (or uncomment) property iam.metrics.port and choose a free port.
  3. ### METRICS
    ## If a port is set, a metrics endpoint will be exposed on that port
    ##  (http://host:port/metrics).
    iam.metrics.port = 5555
    
  4.  
    Info

    When starting IAM, the metrics may also be activated (and the port configured) by setting the environment variable IAM_METRICS_PORT.