Configuring Grafana Prometheus

The Grafana Prometheus integration allows you to push response time metrics from your Uptime.com checks directly into Grafana Cloud via the Prometheus service and endpoint. Once configured, your check performance data will appear alongside the rest of your metrics in Grafana, giving your team a unified view of system health.

 

Table of Contents

Integration Functionality

Return

  • Response time metrics are passed from Uptime.com checks to Grafana and are visible in your Grafana instance.

 

Integration Setup

Return

Login to your Grafana account. In the main menu, click Administration > Users and access > Cloud access policies:

On the Cloud access policies page, click Create access policy

Configure your policy with a name and any other necessary options. Ensure the policy has write access for metrics:

Back on the Cloud access policies page, click Add token next to the new policy:

Enter your token name and click Create:

In the main menu, click Connections > Data Sources:

In your Data Sources configuration, locate the necessary fields that will be copied into Uptime when creating the integration. You’ll need the following:

  • Metrics Instance ID, located in the User field under the HTTP section:

  • Metrics API Token, created from the Cloud access policy, displayed under the ID field for the token:

Back in Uptime, click Notification > Integrations. Click Add next to the Grafana Prometheus integration. The configuration window appears:

Enter a Name for the Integration and use Assign to Contacts to associate the integration with existing contacts.

Enter the values for the Prometheus Remote Write URL, Metrics Instance ID, and Metrics API Token that were retrieved from Grafana.

Note: when entering the Prometheus Remote Write URL, it is necessary to append /push to the end of the URL that was copied from Grafana. So if your URL is:

https://prometheus-prod-XX-prod-XX-grafana.net/api/prom

Enter the following in the Prometheus Remote Write URL field:

https://prometheus-prod-XX-prod-XX-grafana.net/api/prom/push

Use the Labels field to define labels that will be passed to Prometheus through the integration. Enter these as key=value pairs, either one pair on each line or comma separated:

source=uptime_com
env=prod
source=uptime_com,env=prod


Setting Up Contacts for Metrics Communication

Return
 

The Grafana Prometheus integration works by pushing check metrics to your Grafana instance based on the contacts that are associated with the check and integration. To send data from your Uptime.com checks to your Grafana instance, you’ll need to add a Contact to the integration, then add that Contact to the checks that will report to Grafana.

Create New Contacts for the Integration

Return

Adding a new contact cannot be done within the integration setup menu. To create a contact, click Notification > Contacts. In the Integrations field, select the Grafana integration:

 

Assign Integration to Existing Contacts

Return

To add your integration to an existing contact, click on or type the name of the contact into the Assign to Contacts field within the integration setup screen. 
 

Assign Integration Contact to a Check

Return

Once a Contact is associated with the integration, you’ll need to assign it to the checks that will send metrics data to Grafana.

Navigate to your check’s Edit screen. Under the General tab, assign the integration contact to the Contacts field.

Please note: Response time data is stored based on plan usage. Uptime.com stores hourly data for a maximum of 90 days, and daily check data for a period of up to 24 months. On initial setup, metric data may take up to 30 minutes to initially appear.

 

Test Your Integration

Return

Test your integration with one of the following methods:

  1. Click Notification > Contacts. Click More Actions > Test to send a test notification to the Contact.
  2. Click Notification > Integrations. Under the Active tab, locate your integration and click More Actions > Test. This will test to confirm that the connection is set up properly.

This test can also be viewed in the metrics data in Grafana by selecting the uptime_integration_test option in Grafana to confirm that the data is being passed:



 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.

Have more questions?
Submit a request
Share it, if you like it.