Prometheus Integration

Prometheus is a powerful monitoring and alerting toolkit, often used for collecting and querying various system metrics. This guide outlines the steps required to integrate Prometheus with an on-prem instance that has a metrics endpoint /metrics on port 9991.

Prerequisites

Before proceeding, ensure that you have the following:

  • Access to the on-prem instance with the metrics endpoint exposed. See the Metrics Guide for details. Note that this guide assumes you chose port 9991 for the HOST_PORT.
  • Prometheus installed on your machine or server. Visit Download Prometheus for installation instructions.
  • Local system permissions to modify the Prometheus configuration file (usually named prometheus.yml)

Integrate with Deepgram Engine

Step 1: Add Prometheus Target

Add the target to the Prometheus configuration file in the prometheus.yml file. Locate the scrape_configs section, and add a new job with the on-prem Engine container instance as a target:

scrape_configs:
  - job_name: "on_prem_instance"
    static_configs:
      - targets: ["<ENGINE_INSTANCE_IP>:9991"]

Replace <ENGINE_INSTANCE_IP> with the IP address or hostname of the on-prem Engine instance. Save the configuration file.

Step 2: Reload Prometheus Configuration

To apply the changes made to the prometheus.yml file, you need to reload the Prometheus configuration. You can do this by restarting the Prometheus service:

sudo systemctl restart prometheus

Step 3: Verify the Integration

Open the Prometheus web interface, usually accessible at http://localhost:9090, and navigate to the "Targets" page (under the "Status" menu). You should see the on_prem_instance job listed with a status of "UP", indicating that Prometheus is successfully scraping metrics from the on-prem instance.

Querying Metrics

With the integration complete, you can now query the collected metrics using the Prometheus web interface or API. To access the metrics endpoint directly, visit http://<ENGINE_INSTANCE_IP>:9991/metrics in your browser or use a tool like curl to fetch the data.

Summary

You've now successfully integrated your on-prem Engine instance with a Prometheus. You can now monitor and query the on-prem Engine system metrics collected from the instance using the Prometheus web interface or API.