---
title: Confluent Cloud Metrics
description: Collect Confluent Cloud metrics for Kafka clusters, connectors, ksqlDB, Schema Registry, and Flink compute pools in Coralogix with only a Cloud API key.
url: https://coralogix.com/docs/integrations/metrics/confluent-cloud/
product: integrations
feature: Inbound Integrations
feature_id: inbound-integrations
feature_identifier: integrations/inbound-integrations
last_updated: '2026-11-30'
---

> Documentation index: https://coralogix.com/docs/llms.txt

# Confluent Cloud Metrics

Collect [Confluent Cloud](https://www.confluent.io/confluent-cloud/) metrics in Coralogix without running a collector. Coralogix reads the [Confluent Cloud Metrics API](https://docs.confluent.io/cloud/current/monitoring/metrics-api.html) once a minute with a Cloud API key that you provide, and writes the metrics to your account.

Use it to:

* Track Kafka cluster throughput, requests, partitions, retained bytes, and consumer lag
* Monitor connectors, ksqlDB applications, Schema Registry, and Flink compute pools
* Build [custom dashboards](https://coralogix.com/docs/user-guides/custom-dashboards/introduction.md) and [alerts](https://coralogix.com/docs/user-guides/alerting/introduction-to-alerts.md) on Confluent metrics next to the rest of your telemetry

Metric names and labels are exactly the ones Confluent publishes, for example `confluent_kafka_server_received_bytes` with the `kafka_id` and `topic` labels. Coralogix adds only the application and subsystem names and any **Resource tags** that you set. Dashboards and alerts built for a self-managed OpenTelemetry collector that scrapes Confluent keep working when you switch to this integration, unless they filter on labels that your collector added, such as a scrape job name.

## What you need

* To create the integration in Coralogix, you need `INTEGRATIONS:DEPLOY` (Data Admin and Platform Admin). See [Permissions](#permissions).

* A Confluent Cloud service account with the **MetricsViewer** role. Grant it at the organization scope:

  ```bash
  confluent iam service-account create coralogix-metrics --description "Coralogix metrics integration"
  confluent iam rbac role-binding create --principal User:<SERVICE_ACCOUNT_ID> --role MetricsViewer
  ```

  If you select resources with **Explicit**, you can grant the role only on the environments that contain the resources you list instead. Run this once per environment:

  ```bash
  confluent iam rbac role-binding create --principal User:<SERVICE_ACCOUNT_ID> --role MetricsViewer \
    --environment <ENVIRONMENT_ID>
  ```

* A **Cloud API key** for that service account. A Kafka cluster API key does not work with the Metrics API.

  ```bash
  confluent api-key create --resource cloud --service-account <SERVICE_ACCOUNT_ID>
  ```

  Save the key and secret. Confluent shows the secret only once.

## Setup

**STEP 1: Navigate to the integration**

From the Coralogix sidebar, go to **Integrations**, then **Integrations**, and select **Confluent Cloud Metrics**.

**STEP 2: Add a new integration**

Select **Add New** and enter the following:

| **Field**                                                                                                                 | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Integration name**                                                                                                      | A name for this integration.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **Application name** and **Subsystem name**                                                                               | Metadata attached to every metric. See [Application and subsystem names](https://coralogix.com/docs/user-guides/account-management/account-settings/application-and-subsystem-names.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Cloud API key** and **Cloud API secret**                                                                                | The Cloud API key and secret from the prerequisites.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Resources**                                                                                                             | **All** collects every resource the service account can see and picks up new resources within about 10 minutes. **Explicit** collects only the IDs you list.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **Kafka cluster IDs**, **Connector IDs**, **ksqlDB application IDs**, **Schema Registry IDs**, **Flink compute pool IDs** | With **Explicit** only. For example `lkc-abc123`, `lcc-abc123`, `lksqlc-abc123`, `lsrc-abc123`, `lfcp-abc123`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Metric allowlist**                                                                                                      | Optional. When set, Coralogix collects only these metrics. Use export names such as `confluent_kafka_server_received_bytes`; names from the Confluent reference such as `io.confluent.kafka.server/received_bytes` are converted to export names. Unknown or blank names are rejected when you create the integration.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **Resource tags**                                                                                                         | Optional. Labels for the metrics of one resource, one entry per tag, as `resource_id:key=value`, for example `lkc-abc123:env=prod`. Keys use letters, digits, and underscores, and start with a letter or an underscore; keys and values are limited to 256 characters, and an integration can have up to 100 tags. A tag is added to the metrics whose resource ID label (such as `kafka_id` or `connector_id`) is that resource, so a connector metric that names its Kafka cluster gets the tags of both. Confluent's own labels are never replaced: if a metric already has a label with the same key, it keeps Confluent's value. If two tags for a resource use the same key, the first one is used. Coralogix rejects an entry in another format when you create the integration. |

**STEP 3: Create**

Select **Create**. Coralogix first tests the key: with **All** it lists the resources the service account can see; with **Explicit** it reads the listed resources and names any resource the key cannot read. For a very long list, it reads only the first part of the list. It also checks the metric allowlist names. Coralogix saves the integration only when the test passes; otherwise an error message explains what to fix (see [Troubleshooting](#troubleshooting)). Metrics appear within about 5 minutes. Confluent publishes each data point about 3 minutes after it occurs.

## Metrics

Coralogix writes every metric that the Metrics API export returns for the selected resources. Common metrics include:

| **Metric**                                                                       | **Description**                                                                                                   |
| -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `confluent_kafka_server_received_bytes`                                          | Bytes produced to the cluster, per topic.                                                                         |
| `confluent_kafka_server_sent_bytes`                                              | Bytes consumed from the cluster, per topic.                                                                       |
| `confluent_kafka_server_received_records`, `confluent_kafka_server_sent_records` | Records produced and consumed, per topic.                                                                         |
| `confluent_kafka_server_consumer_lag_offsets`                                    | Consumer group lag in offsets, per consumer group and topic.                                                      |
| `confluent_kafka_server_retained_bytes`                                          | Bytes retained, per topic.                                                                                        |
| `confluent_kafka_server_partition_count`                                         | Number of partitions in the cluster.                                                                              |
| `confluent_kafka_server_request_count`                                           | Requests received, per request type.                                                                              |
| `confluent_scrape_resource_access_error`                                         | `1` when a selected resource could not be read, `0` when it was read. The `resource_id` label names the resource. |

For the full list, see the [Confluent Cloud Metrics reference](https://api.telemetry.confluent.cloud/docs/descriptors/datasets/cloud).

> **Note:**
>
> Some Confluent metrics, such as `confluent_kafka_server_request_count` and `confluent_kafka_server_connection_info`, include `principal_name` and `principal_id` labels with the names of Confluent users and service accounts. To leave them out, set a **Metric allowlist** without those metrics.

## Limits and considerations

* Coralogix reads the Metrics API over the public internet. Confluent does not offer private networking for the Metrics API, so every reader of it, Coralogix or your own, uses the public internet. If you need the traffic to Coralogix to stay on a private network, run an [OpenTelemetry collector](https://coralogix.com/docs/opentelemetry/getting-started.md) in your own network instead. It still reads the Metrics API over the public internet (for example, through your egress proxy), but it sends to Coralogix over PrivateLink. It produces the same metric names.

* Confluent [limits Metrics API requests](https://api.telemetry.confluent.cloud/docs#section/Client-Considerations-and-Best-Practices/Rate-Limiting) to 160 per resource, per hour, for each service account. One integration reads each resource about once a minute, plus occasional retries, split requests for very large clusters, and the connection test when you create or edit the integration; this stays within the limit. Several integrations, or other tools, that read the same resource with the same service account share the limit and can exceed it; the integration then shows a rate-limit error and resumes when the limit resets. Use one integration per resource, or a separate service account for each consumer.

* Confluent returns at most 60,000 points per resource type per metric in one response and drops the rest. Coralogix requests at most three Kafka clusters at a time and splits a request that reaches the limit, so this matters only when a single cluster has more than 60,000 series of one metric (for example, very many topics or partitions).

  > **Warning:**
  >
  > Confluent drops the points of a metric beyond its 60,000-point limit, so that metric's data above the limit is missing. A **Metric allowlist** doesn't prevent it, because the limit applies to each metric separately.

* History: when you create the integration, Coralogix also fills in the previous 4 hours of each resource's metrics, and it fills in the same way any minutes that collection missed later (for example, while the Metrics API was unreachable or rate limited). Minutes more than 4 hours old are not filled in, so a longer outage leaves a gap. A metric that has had no data since you created the integration is filled in when it starts sending data again, for the minutes that are still within the last 4 hours; until then its history is not shown, and no zero values are added for it. Confluent's query API does not return a few metrics, such as `confluent_kafka_server_active_connection_count`, so they get no filled-in history. Filled-in data usually appears within a few minutes; an organization with many resources can take longer. These requests do not count toward Confluent's limit of 160 requests per resource per hour.

* Confluent Platform (self-managed) and custom connectors are not covered.

## Validate the integration

About 5 minutes after you create the integration:

1. Confirm that the integration shows the status **Active** on the Confluent Cloud Metrics management screen.

2. In [Metric Explorer](https://coralogix.com/docs/user-guides/data_exploration/metric-explorer.md) or a custom dashboard, run this query:

   ```promql
   sum by (kafka_id, topic) (confluent_kafka_server_received_bytes)
   ```

   You should see one series per cluster and topic that receives data.

3. If a selected resource is missing, check `confluent_scrape_resource_access_error{resource_id="<ID>"}`. A value of `1` means the API key cannot read that resource.

## Troubleshooting

| **Message**                                                                                                      | **Cause and fix**                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Confluent Cloud rejected the API key or secret                                                                   | The key or secret is wrong, or it is a Kafka cluster key. Create a Cloud API key (`--resource cloud`).                                                                                                                                                                                                                                                                                                                                               |
| The service account lacks the MetricsViewer role, or none of the selected resource IDs exist in the organization | Grant the MetricsViewer role, and check the resource IDs.                                                                                                                                                                                                                                                                                                                                                                                            |
| Discovery found no Confluent Cloud resources                                                                     | With **All**, the service account sees no resources, and Coralogix does not save the integration. Grant the MetricsViewer role at the organization scope, or create a resource first, then select **Create** again.                                                                                                                                                                                                                                  |
| No Confluent Cloud resources to collect                                                                          | No selected resource exists or is visible to the service account any more. Select resources, or grant the service account the MetricsViewer role. Collection resumes within an hour after a resource is visible again.                                                                                                                                                                                                                               |
| The API key cannot read these resources                                                                          | The listed IDs are wrong or not visible to the service account. Remove them, or grant the service account the MetricsViewer role on them. After creation, the `confluent_scrape_resource_access_error` metric names resources that become unreadable.                                                                                                                                                                                                |
| These metric allowlist names are not Confluent Cloud metrics                                                     | A name in the **Metric allowlist** is misspelled or not exported by Confluent. Use the names from the Confluent metrics reference.                                                                                                                                                                                                                                                                                                                   |
| The export returned *N* series, above the limit of *M*                                                           | One collection run returned more series than an integration writes at once, so Coralogix writes nothing for that run. This limit counts the series of all selected resources and metrics together, and only metrics that pass the **Metric allowlist** count. It is separate from Confluent's limit of 60,000 points per metric (see [Limits and considerations](#limits-and-considerations)). Select fewer resources or set a **Metric allowlist**. |
| The collected metrics with their resource tags are larger than *N* MiB                                           | Each tag is added to every metric of its resource, so many or long tags multiply the size. Use fewer or shorter **Resource tags**, select fewer resources, or set a **Metric allowlist**.                                                                                                                                                                                                                                                            |
| Confluent Metrics API rate limit reached                                                                         | The service account made too many requests for the same resource this hour, often from a second integration or another tool using the same key. Keep one integration per resource, or give each consumer its own service account; collection resumes when the limit resets.                                                                                                                                                                          |

## Manage the integration

Once set up, your integration appears on the Confluent Cloud Metrics management screen. Use the icons on the right to edit or delete it.

To create and manage the integration with Terraform, see [Confluent Cloud Metrics with Terraform](https://coralogix.com/docs/developer-portal/infrastructure-as-code/terraform-provider/integrations/confluent-cloud-metrics-collector.md).

## Permissions

Permissions

| Resource                  | Description                                | System roles                                                  | API presets        |
| ------------------------- | ------------------------------------------ | ------------------------------------------------------------- | ------------------ |
| `INTEGRATIONS:READCONFIG` | View deployed integration packages.        | Data Admin, Observability Lead, Platform Admin, Security User | Integrations, Olly |
| `INTEGRATIONS:DEPLOY`     | Deploy, undeploy, and update integrations. | Data Admin, Platform Admin                                    | Integrations       |

## Related resources

* [Confluent Cloud Metrics API](https://docs.confluent.io/cloud/current/monitoring/metrics-api.html)
* [Confluent Cloud Metrics reference](https://api.telemetry.confluent.cloud/docs/descriptors/datasets/cloud)
* [Custom dashboards](https://coralogix.com/docs/user-guides/custom-dashboards/introduction.md)
* [Alerts](https://coralogix.com/docs/user-guides/alerting/introduction-to-alerts.md)
