Configure Prometheus

Access Gateway currently supports monitoring metrics using Prometheus.

During this task you will configure Access Gateway targets for Prometheus.

Before you begin

You must configure Access Gateway to support monitoring. See Configure metrics monitoring.

Download and install Prometheus. See the getting started section in the Prometheus documentation.
Other methods also are supported such as brew install prometheus.

Define Access Gateway targets for Prometheus

Prometheus can be installed in a number of different locations. This page assume an install directory of /usr/local/prometheus/2.32.1.

To configure prometheus to monitor Access Gateway

  1. Determine the IP address of all instances of Access Gateway being monitored. See Determine Access Gateway IP address.
  2. Open a command prompt and navigate to the directory containing the prometheus.yml file.
    cd /usr/local/prometheus/2.32.1.
    ls prometheus.yml
    . . .

  3. Using your preferred text editor open the configuration file.
    nano prometheus.yml
  4. Within the scrape_configs: section, add a new static_configs: subsection and a set of appropriate targets.
    The updates should resemble:scrape_configs: - job_name: "prometheus" scrape_interval: 5s # # Other configuration # . . . static_configs: - targets: ['192.168.x.x:8889'] - targets: ['192.168.x.y:8889'] - targets: ['192.168.x.z:8889']
  5. Add as many targets as required.
  6. Save the changes and exit the editor.
  7. Restart prometheus normally using a command similar to:
    bin/prometheus -config=prometheus.yml