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
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
- Prometheus installed on your machine or server. Visit Download Prometheus for installation instructions.
- Local system permissions to modify the Prometheus configuration file (usually named
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"]
<ENGINE_INSTANCE_IP> with the IP address or hostname of the on-prem Engine instance. Save the configuration file.
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
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.
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.
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.
Updated 4 months ago