To view the detailed information for a single consumer group, you can use the Google Cloud console, the Google Cloud CLI, the client library, the Managed Kafka API, or the open source Apache Kafka APIs.
Required roles and permissions to view a consumer group
To get the permissions that you need to view your consumer groups,
ask your administrator to grant you the
Managed Kafka Viewer (roles/managedkafka.viewer
) IAM role on your project.
For more information about granting roles, see Manage access to projects, folders, and organizations.
This predefined role contains the permissions required to view your consumer groups. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to view your consumer groups:
-
List consumer groups:
managedkafka.consumerGroups.list
-
Get consumer group details:
managedkafka.consumerGroups.get
You might also be able to get these permissions with custom roles or other predefined roles.
For more information about the Managed Kafka Viewer role, see Managed Service for Apache Kafka predefined roles.
View a consumer group
To view the detailed information for a consumer group for a specific cluster, follow these steps:
Console
In the Google Cloud console, go to the Cluster page.
- Click the cluster for which you want to see the consumer groups.
The Cluster details page is displayed. In the Cluster details page, under the Resources tab, the consumer groups are listed.
- Click the consumer group.
The Consumer group details page opens.
- Configuration: This tab displays the name of the consumer group. It also shows the topic to which the consumer group is attached.
- Monitoring: This tab displays the offset lag by partition monitoring chart.
The page contains the following details:
gcloud
-
In the Google Cloud console, activate Cloud Shell.
At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.
Run the
gcloud managed-kafka consumer-groups describe
command:gcloud managed-kafka consumer-groups describe CONSUMER_GROUP_ID \ --cluster=CLUSTER \ --location=LOCATION
This command provides detailed information about a specific Managed Service for Apache Kafka consumer group. It includes information about the consumer group, including its name, group ID, creation time, and update time.
Replace the following:
-
CONSUMER_GROUP_ID: The ID or name of the consumer group.
-
CLUSTER: The ID or name of the cluster.
-
LOCATION: The location of the cluster.
-