Centralized Metrics Management
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 from org-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-source
Service Account that is just created and save it. - Create a policy named
grafana-data-source
that enablesreadMetrics
for the above Service Account.
In org-1
- Log in to
org-1
, and navigate to Grafana by going to Metrics in the Control Plane Console. - Proceed to
Configuration
(available on the sidebar) > Data Sources. - Click on
Add new data source
and then selectPrometheus
as 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-2
with the actual organization’s name). c. Add a custom HTTP Header forauthorization
with the value:Bearer <YOUR-TOKEN-HERE>
. Replace<YOUR-TOKEN-HERE>
with the token from thegrafana-data-source
created in the previous steps. Then, click Save & Test.
After these steps, you should be able to select the org-2
data source when using the Explore
feature in the org-1
Grafana.
Import Dashboard for Multiple Sources
- In your
org-1
Grafana, create a dashboard namedMulti Source Metrics Overview Cloud
to 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
.
You can now select 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
.