For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Note: Review your metric labels before exporting. Metric values are typically aggregates, but metric labels can contain personal data. For example IP addresses, user or account identifiers, e-mail addresses, or hostnames that identify individuals. Check which label sets you expose through the data source proxy and involve your data protection officer where they contain such fields.

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.

Note: Metrics and logs collection is opt-in per resource. If Monitoring Service is not activated for a specific resource, no data will appear in Grafana for that resource.

Procedure

1

Create a service account token in the IONOS CLOUD Grafana

  1. Go to https://grafana.logging.<region>.ionos.com/org/serviceaccounts.

  2. Click Add service account button, enter a name such as metrics-reader, and set role to Viewer.

  3. Open the service account, click Add token button, click Generate token button.

  4. Copy the token immediately. It is shown only once. Store it in a password manager.

2

Get the Grafana Mimir datasource UID

In the IONOS CLOUD Grafana, go to Connections > Data sources > Mimir. The UID is in the browser URL:

Note: The Grafana Mimir datasource UID differs per region. Always look it up in the IONOS CLOUD Grafana instance for the region you are connecting to.

3

Add the datasource in your external Grafana

Important: If you are using Grafana Cloud, do not edit the provisioned grafanacloud-*-prom datasource. That one is locked. Add a new datasource instead.

  1. In your external Grafana, go to Connections , Data sources , Add new data source , Prometheus.

  2. Configure it with these values (You will need IONOS CLOUD Grafana service account and Grafana Mimir UID):

Field
Value

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

  1. Click Save & test.

A "Successfully queried the Prometheus API" message confirms the connection.

4

Query your metrics

Go to Explore, select the ionos-monitoring datasource.

Troubleshooting

Save & test returns an error

  • Check that the Authorization header value starts with Bearer (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:

  1. Go to https://grafana.logging.<region>.ionos.com/org/serviceaccounts.

  2. 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?