Monitor Lightning Tables in Confluent Cloud

Use the Confluent Cloud Metrics API to track the compute, query scanning, and storage that your Lightning Tables use. You can use these metrics to understand and forecast your Lightning Tables costs.

Lightning Tables metrics

The Metrics API reports the following metrics for Lightning Tables. Each metric applies to an Apache Kafka® cluster. To filter or group a metric by Lightning Table, use the metric.topic label.

Metric

Description

io.confluent.rtce/compute_utilization/ccu_minutes

The Confluent Compute Unit (CCU) minutes that a Lightning Table consumes. CCUs reflect the compute and memory used to materialize topic data and to serve queries.

io.confluent.rtce/compute_utilization/dp_scanned_bytes

The number of bytes that queries scan in a Lightning Table.

io.confluent.rtce/storage_utilization/storage_bytes

The cloud storage size of a Lightning Table, in bytes.

The ccu_minutes and dp_scanned_bytes metrics are counters. Each value covers one measurement interval, so the sum of the values over a time range gives the total for that range. The storage_bytes metric is a gauge that reports the size at each sample.

Note

Confluent Compute Units (CCUs) are unrelated to Confluent Consumption Units, which are also abbreviated CCU. Confluent Consumption Units are the billing unit for Confluent Cloud marketplace deployments.

For the full metric definitions, see the Metrics API Reference. For pricing, see Confluent Pricing.

Query a Lightning Tables metric

Before you begin, make sure you have a Cloud API key for a service account with the MetricsViewer role. For more information, see Create an API key to authenticate to the Metrics API.

The following example gets the CCU minutes that each Lightning Table in a cluster consumes, grouped by topic. To query another metric, replace the metric name.

To query a Lightning Tables metric, complete the following steps:

  1. Create a file named ccu_minutes_query.json, like the following example:

    {
      "aggregations": [
        {
          "metric": "io.confluent.rtce/compute_utilization/ccu_minutes"
        }
      ],
      "filter": {
        "field": "resource.kafka.id",
        "op": "EQ",
        "value": "<lkc_id>"
      },
      "granularity": "PT1H",
      "group_by": [
        "metric.topic"
      ],
      "intervals": [
        "<start_time>/<end_time>"
      ]
    }
    

    Replace the following values:

    • <lkc_id>: Your Kafka cluster ID.

    • <start_time> and <end_time>: The start and end of the time range, as ISO 8601 timestamps. For example, 2026-11-04T00:00:00Z and 2026-11-04T03:00:00Z.

  2. Send the query in a POST request:

    curl -X POST 'https://api.telemetry.confluent.cloud/v2/metrics/cloud/query' \
      -u '<api_key>:<api_secret>' \
      -H 'Content-Type: application/json' \
      -d @ccu_minutes_query.json
    

    The response looks like the following example:

    {
      "data": [
        {
          "timestamp": "2026-11-04T00:00:00Z",
          "value": 2.0,
          "metric.topic": "orders"
        },
        {
          "timestamp": "2026-11-04T01:00:00Z",
          "value": 5.0,
          "metric.topic": "orders"
        },
        {
          "timestamp": "2026-11-04T02:00:00Z",
          "value": 3.0,
          "metric.topic": "orders"
        }
      ]
    }
    

    In this example, the Lightning Table for the orders topic consumed 10 CCU minutes over three hours.

For more query examples and options, see Run Example Queries for the Confluent Cloud Metrics API.