Export telemetry to Grafana Cloud
This tutorial shows you how to export metrics from your Datum platform to Grafana Cloud using an ExportPolicy and Secret.
Before you begin
This tutorial assumes you have already:
- Registered a Datum account
- Installed and configured the necessary tools
- Created a Datum project
- Configured a kubeconfig context for your project
- A Grafana Cloud account with an active instance
Overview
You will configure metric export by:
- Accessing your Grafana Cloud instance
- Generating Prometheus remote write configuration
- Creating Datum Secret and ExportPolicy resources
The process extracts connection details from Grafana Cloud’s generated configuration and creates the necessary Datum resources automatically.
Step 1: Access your Grafana Cloud instance
If you don’t have a Grafana Cloud account, create one at grafana.com.
- Sign in to Grafana Cloud
- Navigate to your desired instance
- Copy your instance URL (for example:
https://play.grafana.net
)
Step 2: Generate connection URL
Use this form to generate the Grafana Cloud connection URL:
Grafana Cloud Connection URL Generator
Step 3: Get Prometheus configuration
- Click the generated connection URL above
- Choose whether to create a new API token or use an existing one
- Complete the form and submit it
- Copy the generated Prometheus configuration YAML
The configuration looks similar to this:
remote_write:
- url: https://prometheus-prod-56-prod-us-east-2.grafana.net/api/prom/push
basic_auth:
username: 123456
password: glc_eyJvIjoiNzA2...
Step 4: Generate and apply Datum resources
Paste your Prometheus configuration below to generate the Secret and ExportPolicy. Use the tabs to choose between applying from stdin or saving to files:
Datum Resource Generator
Secret
Provide your Prometheus configuration above to generate the Secret manifest
ExportPolicy
Provide your Prometheus configuration above to generate the ExportPolicy manifest
Step 5: Verify the configuration
Check that your resources were created successfully using the names you specified:
Verify the Secret:
kubectl get secret grafana-cloud-credentials
Verify the ExportPolicy:
kubectl get exportpolicy export-datum-telemetry
Step 6: View your metrics
You can view your metrics in Grafana Cloud by visiting the Metrics Drill Down app at the link below:
Enter your Grafana Cloud instance URL in Step 2 above to generate the metrics link
Alternatively, you can access your metrics through your Grafana Cloud instance’s Explore section or create custom dashboards to visualize the data.
Troubleshooting
If metrics aren’t appearing in Grafana Cloud:
- Check Secret encoding: Ensure username and password are correctly base64 encoded
- Verify endpoint URL: Confirm the Prometheus remote write endpoint is accessible
- Review ExportPolicy: Check that the
metricsql
selector matches your services - Check authentication: Verify your API token has write permissions for Prometheus
For additional help, consult the Grafana Cloud documentation.