Documentation Index
Fetch the complete documentation index at: https://docs.controlplane.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
This guide demonstrates how to export metrics from multiple organizations using the Prometheus/federate endpoint. This setup allows you to centralize metrics collection by federating Control Plane metrics into a single external Prometheus instance or service that can collect data using a Prometheus scrape job.
Prerequisites
- Superuser access to the Control Plane Console for each organization.
- A Prometheus instance configured to scrape metrics or a third-party service that can collect metrics using a Prometheus scrape job.
Steps
In the Source Organization
Create a Service Account
- Log in to the Console.
- Create a new service account named
prometheus-federate.
Generate a Key
- Click
Keysand create a new key for theprometheus-federateservice account and store it securely.
Create a Policy
Grant the service account created above the
readMetrics permission by creating a policy using one of the following methods:-
Using the Console, create a policy named
prometheus-federatethat grants thereadMetricspermission to the service account.- Click
Policiesin the left menu. - Click
Newand fill in the details:- Name:
prometheus-federate - Description:
prometheus-federate
- Name:
- Click
Target.- Target Kind:
org
- Target Kind:
- Click
Binding. - Click
Add Binding:- On the
Permissionstab, checkreadMetrics - On the
Service Accountstab, checkprometheus-federate
- On the
- Click
Ok. - Click
Create.
- Click
-
Using YAML
- Apply the YAML manifest below using the cpln apply command. Substitute
ORG_NAMEwith your org name.
YAML - Apply the YAML manifest below using the cpln apply command. Substitute
In the Prometheus Configuration
-
Configure Scrape Job:
- Add the following scrape configuration to your Prometheus instance:
- Replace
${org}with the actual organization name. - Ensure
${CPLN_SERVICE_ACCOUNT_TOKEN}is set as an environment variable containing the token from theprometheus-federateservice account.
Verification
- After configuring the scrape job, verify that Prometheus is successfully collecting metrics from the source organization by checking the Prometheus UI.
- You should be able to see the same metrics in the Prometheus UI as you would in the Control Plane managed Grafana instance.
Additional Notes
- Adjust the
match[]parameter in the scrape configuration to filter the metrics as needed. - Repeat the steps for additional organizations by creating separate service accounts and policies.
- Egress charges apply to metrics scraped from Control Plane.
Cleanup
- Delete the scrape job in the Prometheus instance.
- Delete the policy and service account in the source organization.