During your installation, you have the option to deploy a Gloo Prometheus server alongside the Gloo telemetry pipeline that you can use to monitor the health of Gloo Mesh Gateway components and the Istio resources in your cluster. Prometheus is a powerful time series database that you can use to visualize, analyze, and operate on metrics that are collected from your environment.

Figure: Prometheus UI

Enable/disable the built-in Prometheus server

The built-in Prometheus server is automatically enabled for you when you follow the Get started guide. To manually enable or disable the Prometheus server, add the following configuration to your Helm values file.

To enable the Prometheus server:

  
prometheus:
  enabled: true
  

To disable the Prometheus server:

  
prometheus:
  enabled: false
  

Default Prometheus setup

The Prometheus server is configured to scrape the Gloo telemetry collector agent (single cluster), or the Gloo telemetry gateway and collector agent (multicluster) to receive the default pipeline metrics. These metrics are used to feed Gloo observability tools, such as the Gloo UI and the Gloo operations dashboard.

To view the default Prometheus configuration:

  1. Get the secret that holds the Prometheus server configuration.

    Example output:

      apiVersion: v1
    data:
      alerting_rules.yml: Z3JvdXBzOgotIG5hbWU6IEdsb29QbGF0Zm9ybUFsZXJ0cwogIHJ1bGVzOgogIC0gYWxlcnQ6IEdsb29QbGF0Zm9ybVRyYW5zbGF0aW9uTGF0ZW5jeUlzSGlnaAogICAgYW5ub3RhdGlvbnM6CiAgICAgIHJ1bmJvb2s6IGh0dHBzOi8vZG9jcy5zb2xvLmlvL2dsb28tbWVzaC1lbnRlcnByaXNlL21haW4vdHJvdWJsZXNob290aW5nL2dsb28vCiAgICAgIHN1bW1hcnk6IFRoZSB0cmFuc2xhdGlvbiB0aW1lIGhhcyBpbmNyZWFzZWQgYWJvdmUgMTAgc2VjLiBJdCdzIGN1cnJlbnRseSB7eyAkdmFsdWUgfCBodW1hbml6ZSB9fS4KICAgIGV4cHI6IGhpc3RvZ3JhbV9xdWFudGlsZSgwLjk5LCBzdW0ocmF0ZShnbG9vX21lc2hfdHJhbnNsYXRpb25fdGltZV9zZWNfYnVja2V0WzVtXSkpIGJ5KGxlKSkgPiAxMAogICAgZm9yOiAxNW0KICAgIGxhYmVsczoKICAgICAgc2V2ZXJpdHk6IHd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RlbXBsYXRlX2hhc2gK
    kind: Secret
    metadata:
      annotations:
        meta.helm.sh/release-name: gloo-platform
        meta.helm.sh/release-namespace: gloo-mesh
      creationTimestamp: "2023-10-26T14:11:44Z"
      labels:
        app.kubernetes.io/managed-by: Helm
      name: gloo-prometheus-server
      namespace: gloo-mesh
      resourceVersion: "3195993"
      uid: 6585b914-8d49-4623-a62f-d9bec09a4448
    type: Opaque 
      
  2. Decode the alert.yml and prometheus.yml configurations.

      echo "Z3JvdXBzOgotIG5hbWU6IEdsb29QbGF0Zm..." | base64 -D
      

Scraping interval

Metrics are scraped every 15 seconds. The scraping action times out after 10 seconds if no connection to the metrics endpoint could be established or no traffic was received from the metrics endpoint.

After metrics are scraped and available to the Prometheus server, you can view these metrics by accessing the Prometheus expression browser and running PromQL queries. PromQL is a functional query language that lets you select and aggregate time series, and you can visualize the results of your query in a graph or table.

Retention period for metrics

Metrics are available for as long as the prometheus-server pod runs in your management cluster, but are lost between restarts or when you scale down the deployment.

To keep metrics for a longer period of time, you can replace the built-in Prometheus server with your own production Prometheus server. For more information, see the Customization options.

Metrics provide important information about the performance and health of your resources. For example, you can monitor the time a request takes to be routed from the gateway to your app, the number of successful and failed requests that were processed, or the Gloo custom resources that could not be translated into Istio resources. You can use these metrics to detect failures and troubleshoot bottlenecks.

Default metrics

The built-in Prometheus server automatically scrapes a set of default metrics from Gloo components, such as the Gloo management server and agents. You can access these metrics by using the Prometheus expression browser. To open the Prometheus expression browser and find an overview of default metrics that are available to you, see Metrics.

You can optionally add more metrics by setting up your own receivers in the Gloo telemetry pipeline.

Default alerts

To monitor the Gloo Mesh Gateway components more easily, Gloo automatically sets up alerts in Prometheus for certain Gloo metrics and observes these metrics over time. Alerts are automatically surfaced in the [operations dashboard](

/gloo-mesh-gateway/2.4.x//observability/tools/grafana/overview/#operations-dashboard

), but can also be accessed by using the Prometheus expression browser directly.

To find a detailed overview of the alerts that are automatically configured in Gloo, see Alerts.

Observability tools that use Prometheus metrics

Several Gloo observability tools use the Prometheus metrics to visualize them in a more consumable way.

  • Gloo UI: The Gloo UI monitors certain workload metrics in Prometheus and how they change over time. This data is shown in the Gloo UI Graph. For more information, see Monitored metrics in the Gloo UI.
  • Operations dashboard: The Gloo operations dashboard uses the data in Prometheus to visualizes key metrics and critical alerts for Gloo Mesh Gateway components. For more information, see [Operations dashboard](

    /gloo-mesh-gateway/2.4.x//observability/tools/grafana/overview/#operations-dashboard

    ).