Skip to main content

consumers_lag_summary

Creates, updates, deletes, gets or lists a consumers_lag_summary resource.

Overview

Nameconsumers_lag_summary
TypeResource
Idconfluent.kafka.consumers_lag_summary

Fields

The following fields are returned by SELECT queries:

The max and total consumer lag in a consumer group.

NameDatatypeDescription
cluster_idstring
consumer_group_idstring
max_lag_client_idstring
max_lag_consumer_idstring
max_lag_instance_idstring
max_lag_partition_idinteger
max_lag_topic_namestring
kindstring
max_laginteger (int64)
max_lag_consumerobject
max_lag_partitionobject
metadataobject
total_laginteger (int64)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_kafka_consumer_group_lag_summaryselectcluster_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.

NameDatatypeDescription
cloud_providerstringCloud provider, lowercase: aws, gcp, or azure (from the cluster spec.cloud). (default: cloud)
cluster_idstringThe Kafka cluster ID. (example: cluster-1)
consumer_group_idstringThe consumer group ID. (example: consumer-group-1)
kafka_endpoint_idstringPer-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)
regionstringCloud region the cluster runs in, e.g. ap-southeast-2 (from the cluster spec.region). (default: region)

SELECT examples

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
;