Configure Prometheus

Configure Access Gateway targets to use Prometheus for monitoring metrics.

Before you begin

Configure Access Gateway to support monitoring. See Configure metrics monitoring.

Download and install Prometheus. You can also install Prometheus using: brew install prometheus.

Define Access Gateway targets for Prometheus

Prometheus can be installed in various locations. This page assumes an installation 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 go to the directory that contains prometheus.yml.cd /usr/local/prometheus/2.32.1. ls prometheus.yml . . .
  3. Open the prometheus.yml configuration file in your preferred text editor.
  4. In the scrape_configs: section, add a static_configs: subsection and a set of appropriate targets.

    These updates should resemble the following:

    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 using a command similar to:bin/prometheus -config=prometheus.yml