<a id="lightning-tables-monitor"></a>

# 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.

<a id="lightning-tables-monitor-metrics"></a>

## 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<br/>consumes. CCUs reflect the compute and memory used to materialize<br/>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](https://api.telemetry.confluent.cloud/docs/descriptors/datasets/cloud).
For pricing, see
[Confluent Pricing](https://www.confluent.io/pricing/?pillar=process&clusters=general&product=flink).

<a id="lightning-tables-monitor-query"></a>

## 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](../monitoring/metrics-api.md#ccloud-add-metricsviewer-role-to-new-service-account).

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:
   ```json
   {
     "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:
   ```bash
   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:
   ```json
   {
     "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](../monitoring/metrics-api-examples.md#metrics-examples).

## Related content

- [Confluent Cloud Metrics](../monitoring/metrics-api.md#metrics-api)
- [Run Example Queries for the Confluent Cloud Metrics API](../monitoring/metrics-api-examples.md#metrics-examples)
- [Manage Lightning Tables in Confluent Cloud](manage.md#rtce-manage-topics)

#### NOTE
This website includes content developed at the [Apache Software Foundation](https://www.apache.org/)
under the terms of the [Apache License v2](https://www.apache.org/licenses/LICENSE-2.0.html).
