Overview
To access metrics from multiple ORGs using a centralized Grafana, it is necessary to add a data source for each Org. This method is also applicable for integrating external Prometheus data sources with Control Plane’s Grafana, enabling centralized metrics management. In this guide, we will demonstrate adding the Prometheus data source fromorg-2 to the Grafana instance of org-1. This integration will enable the observation of metrics from both org-1 and org-2 using the Grafana interface of org-1.
Note: Replace org-1 and org-2 with the actual names of your organizations.
Follow the steps below
In org-2
- Log in to
org-2, and create a new Service Account namedgrafana-data-source. - Create a new key for the
grafana-data-sourceService Account that is just created and save it. - Create a policy named
grafana-data-sourcethat enablesreadMetricsfor the above Service Account.
YAML
In org-1
- Log in to
org-1, and navigate to Grafana by going to Metrics in the Control Plane Console. - Proceed to
Connections(available on the sidebar) > Data Sources. - Click on
Add new data sourceand then selectPrometheusas the type of the data source. - Complete the configuration:
a. Name: Use a descriptive name. For example, the name of the target organization,
org-2. b. URL:https://metrics.cpln.io/metrics/org/org-2(Note: Replaceorg-2with the actual organization’s name). c. Add a custom HTTP Header forauthorizationwith the value:Bearer <YOUR-TOKEN-HERE>. Replace<YOUR-TOKEN-HERE>with the token from thegrafana-data-sourcecreated in the previous steps. Then, click Save & Test.
org-2 data source when using the Explore feature in the org-1 Grafana.
Import Dashboard for Multiple Sources
- In your
org-1Grafana, create a dashboard namedMulti Source Metrics Overview Cloudto view metrics from various data sources. This is achieved by importing the dashboard.- Download the dashboard JSON file from this link.
- Import the downloaded dashboard into Grafana in
org-1.
org-2 as the data source in the Multi Source Metrics Overview Cloud dashboard you imported into org-1. Additional data sources, including those external or from other organizations, can be added by following the instructions in steps 1-4 under org-1.