Query Monitoring Service Metrics from Your External Grafana Instance
Overview
This tutorial shows how to connect your external Grafana instance (such as Grafana Cloud) to the IONOS CLOUD Monitoring Service. It uses the internal Grafana datasource proxy as a Prometheus-compatible endpoint. No VPN or agent is required.
Target audience
This tutorial benefits developers, DevOps engineers, and platform teams who use an external Grafana instance (such as Grafana Cloud) and want to visualize metrics from the IONOS CLOUD Monitoring Service alongside their existing dashboards. This tutorial assumes basic familiarity with:
Grafana datasource configuration.
HTTP authentication headers.
The IONOS CLOUD Console.
What you will learn
How to create a service account token in the IONOS CLOUD internal Grafana.
How to locate the Grafana Mimir datasource Unique Identifier (UID).
How to configure a different Grafana to query IONOS CLOUD Monitoring Service metrics.
Before you begin
Ensure you have:
An active IONOS CLOUD account with Monitoring Service activated.
An external Grafana instance, for example Grafana Cloud.
Access to the IONOS CLOUD Grafana for monitoring services at
https://grafana.logging.<region>.ionos.com.
Cost considerations
This tutorial uses an existing IONOS CLOUD Monitoring Service subscription. No additional resources are created, so no extra charges apply. If you do not have Monitoring Service activated yet, see Monitoring Service User Guide for pricing information.
Procedure
Create a service account token in the IONOS CLOUD Grafana
Go to
https://grafana.logging.<region>.ionos.com/org/serviceaccounts.Click Add service account button, enter a name such as
metrics-reader, and set role to Viewer.Open the service account, click Add token button, click Generate token button.
Copy the token immediately. It is shown only once. Store it in a password manager.
Add the datasource in your external Grafana
In your external Grafana, go to Connections , Data sources , Add new data source , Prometheus.
Configure it with these values (You will need IONOS CLOUD Grafana service account and Grafana Mimir UID):
Name
ionos-monitoring
Prometheus server URL
https://grafana.logging.<region>.ionos.com/api/datasources/proxy/uid/<mimir-uid>
Prometheus type
Mimir
Authentication method
No Authentication
HTTP Headers — Header 1
Name: Authorization / Value: Bearer <token>
HTTP Headers — Header 2
Name: X-Grafana-Org-Id / Value: org
Click Save & test.
A "Successfully queried the Prometheus API" message confirms the connection.
Troubleshooting
Save & test returns an error
Check that the
Authorizationheader value starts withBearer(note the space).Verify the
<mimir-uid>in the URL matches exactly what appears in the IONOS CLOUD Grafana datasource URL.Make sure the service account token was created in the IONOS CLOUD Grafana, not in your external Grafana.
Metrics do not appear in Grafana Explore
Monitoring Service data collection is opt-in per resource. Verify the resources you want to monitor have Monitoring Service activated.
Check that the datasource test passed successfully before querying.
Decommission resources
When you no longer need the connection, delete the service account token to prevent unauthorized access:
Go to
https://grafana.logging.<region>.ionos.com/org/serviceaccounts.Open the service account , find the token , click Delete token.
You can also delete the entire service account if it is no longer needed.
Next steps
Set a token expiry date and add a calendar reminder to rotate it before it expires.
Explore available metrics using the metrics browser in Grafana Explore.
To add logs alongside metrics, use the Loki datasource UID from the same proxy endpoint.
Last updated
Was this helpful?