consumers_lag_summary
Creates, updates, deletes, gets or lists a consumers_lag_summary resource.
Overview
| Name | consumers_lag_summary |
| Type | Resource |
| Id | confluent.kafka.consumers_lag_summary |
Fields
The following fields are returned by SELECT queries:
- get_kafka_consumer_group_lag_summary
The max and total consumer lag in a consumer group.
| Name | Datatype | Description |
|---|---|---|
cluster_id | string | |
consumer_group_id | string | |
max_lag_client_id | string | |
max_lag_consumer_id | string | |
max_lag_instance_id | string | |
max_lag_partition_id | integer | |
max_lag_topic_name | string | |
kind | string | |
max_lag | integer (int64) | |
max_lag_consumer | object | |
max_lag_partition | object | |
metadata | object | |
total_lag | integer (int64) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_kafka_consumer_group_lag_summary | select | cluster_id, consumer_group_id, kafka_endpoint_id, region, cloud_provider | Return the maximum and total lag of the consumers belonging to the specified consumer group. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
cloud_provider | string | Cloud provider, lowercase: aws, gcp, or azure (from the cluster spec.cloud). (default: cloud) |
cluster_id | string | The Kafka cluster ID. (example: cluster-1) |
consumer_group_id | string | The consumer group ID. (example: consumer-group-1) |
kafka_endpoint_id | string | Per-cluster Kafka REST endpoint ID (the pkc-* host prefix from the Confluent UI Cluster -> Overview -> REST endpoint, or extract from confluent.managed_kafka_clusters.clusters spec.http_endpoint). (default: pkc-00000) |
region | string | Cloud region the cluster runs in, e.g. ap-southeast-2 (from the cluster spec.region). (default: region) |
SELECT examples
- get_kafka_consumer_group_lag_summary
Return the maximum and total lag of the consumers belonging to the
specified consumer group.
SELECT
cluster_id,
consumer_group_id,
max_lag_client_id,
max_lag_consumer_id,
max_lag_instance_id,
max_lag_partition_id,
max_lag_topic_name,
kind,
max_lag,
max_lag_consumer,
max_lag_partition,
metadata,
total_lag
FROM confluent.kafka.consumers_lag_summary
WHERE cluster_id = '{{ cluster_id }}' -- required
AND consumer_group_id = '{{ consumer_group_id }}' -- required
AND kafka_endpoint_id = '{{ kafka_endpoint_id }}' -- required
AND region = '{{ region }}' -- required
AND cloud_provider = '{{ cloud_provider }}' -- required
;