Configure GAS for Prometheus

Although the Genero Application Server can provide metrics to Prometheus, it is disabled by default. You must enable metrics in the GAS configuration file.

The Genero Application Server supports Prometheus metrics from all proxies, Genero applications, and Genero web services started by the GAS via the Genero BDL Prometheus API and the dispatcher itself.

The Genero BDL Prometheus API works only via the GAS; it is not activated for direct connections.

You enable Prometheus in the GAS configuration file (as.xcf) by setting resources. Once enabled, metrics from Genero applications and services launched by this GAS are automatically enabled if the BDL Prometheus API is used in the code.

Steps to configure the GAS for Prometheus

  1. Set the resource res.prometheus.enabled to TRUE (FALSE by default)
    Important:

    TRUE or FALSE must be in uppercase! Case is important.

  2. Optional: Set the resource res.prometheus.address to the address of the Prometheus server.
  3. Optional: Set the resource res.prometheus.port to the port where the Prometheus metrics are collected.

    By default the dispatcher collects the Prometheus metrics on port number 8451.

What to do next:

With the Prometheus feature enabled, the GAS opens an endpoint for the Prometheus server to fetch all metrics. The endpoint is in the form http[s]://host:port/gas/metrics, where "gas" specifies the connector.uri part of the URL provided by the GAS when accessed through a web server (IIS, Apache, and so on). Applications running on standalone GAS (httpdispatch) have no connector.uri in the URL.