> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/observability/monitoring-as-a-service/api-how-tos/grafana-integration.md). Agents can also search and read this documentation through its [MCP server](https://docs.ionos.com/cloud/~gitbook/mcp).

# Grafana Integration

Grafana is an open source platform for data visualization, monitoring, and analysis. You may integrate this software with the Monitoring as a Service for more convenient use.

{% hint style="info" %}
**Note:** This page covers Grafana integration for [<mark style="color:blue;">**Monitoring as a Service**</mark>](https://docs.ionos.com/cloud/observability/monitoring-as-a-service.md) (legacy). If you use the [<mark style="color:blue;">**Monitoring Service**</mark>](https://docs.ionos.com/cloud/observability/monitoring-service.md), see [<mark style="color:blue;">**Integration with IONOS CLOUD Telemetry API**</mark>](https://docs.ionos.com/cloud/observability/monitoring-service/api-how-tos/telemetry-api.md) instead. The Telemetry API page lists the available metrics with their types and units, and describes the pre-configured datasource in the managed Grafana.
{% endhint %}

1. Go to the [<mark style="color:blue;">API reference</mark>](https://api.ionos.com/docs/monitoring/v1/)
2. Install [<mark style="color:blue;">grafana</mark>](https://grafana.com/docs/grafana/latest/setup-grafana/installation/debian/)
3. Generate the first token
4. curl -uusername:password [<mark style="color:blue;">https://api.ionos.com/auth/v1/tokens/generate</mark>](https://api.ionos.com/auth/v1/tokens/generate) or -n if you use [<mark style="color:blue;">netrc</mark>](https://everything.curl.dev/usingcurl/netrc.html)
5. It is also possible to query the metrics using curl:

`curl -H "Authorization: Bearer ${TOKEN}" https://api.ionos.com/telemetry/api/v1/query?query=instance\_cpu\_utilization\_average`

## Add data source to Grafana <a href="#maasapigrafana-adddatasourcetografana" id="maasapigrafana-adddatasourcetografana"></a>

* Login to Grafana
* Configuration (on the left side)
* Data source

![Integration icon](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-f363c2c685557729ccb74031401183ccb5aa612a%2Fgrafana_integration.png?alt=media\&token=474cc297-5271-4dbb-a7e4-4ae53cd574f3)

## Data source

**HTTP**

* **URL:** `https://api.ionos.com/telemetry/`

{% hint style="warning" %}
**Configuration requirements:** Ensure that you update the URL with the required query string parameters and include a valid `Authorization` header. The Telemetry API is modeled after the Prometheus Query API. For more information, refer to the [<mark style="color:blue;">Prometheus Documentation</mark>](https://prometheus.io/docs/prometheus/latest/querying/api/).
{% endhint %}

**Custom HTTP Headers**

* **Authorization Value:** `Bearer eyJ0eXAiOiJK`
* **HTTP Methods:** `GET` and `POST`
* Save and test
* Go to Explore (on the left side)
* Choose the new Data source
* In the **Metrics Browser,** write instance
* Choose one of the metrics
* Run query

![Integration icon](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-daa165fba7952281180dba0a9927f40be7041f0f%2Fgrafana_integration_2.png?alt=media\&token=6ced33c9-4833-428f-91e1-351a20817a9e)

You can query on these metrics now:

**series whitelist**:

`- instance_cpu_utilization_average`

`- instance_network_in_packets`

`- instance_network_out_bytes`

`- instance_network_in_bytes`

`- instance_network_out_packets`

`- instance_volumes_read_bytes`

`- instance_volumes_write_bytes`

`- instance_volumes_read_ops`

`- instance_volumes_write_ops`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ionos.com/cloud/observability/monitoring-as-a-service/api-how-tos/grafana-integration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
