> For the complete documentation index, see [llms.txt](https://docs.pagerly.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pagerly.io/sre-ai-agent/data-sources/kafka.md).

# Kafka (Confluent)

## What the Agent Can Do

* List Kafka topics — partition counts, replication factors
* Describe topic details — partition leaders, ISR distribution
* List consumer groups and their states (Stable, Rebalancing, Dead, Empty)
* Get consumer lag — how far behind each partition is (critical for diagnosing delays)

## Setup Instructions

1. Log into **Confluent Cloud** at <https://confluent.cloud>
2. Select your cluster > **API keys**
3. Click **Create key** > select **Global access** or **Granular access**
4. Copy the **API Key** and **API Secret**
5. Copy the **REST endpoint** from Cluster Settings > Endpoints
6. Paste all three in the Pagerly dashboard

## Required Credentials

| Field             | Description                 | Example                                               |
| ----------------- | --------------------------- | ----------------------------------------------------- |
| **API Key**       | Confluent Cloud API key     | `ABCDEFGHIJKLMNOP`                                    |
| **API Secret**    | Confluent Cloud API secret  | `your-api-secret`                                     |
| **REST Endpoint** | Confluent REST endpoint URL | `https://pkc-xxxxx.us-east-1.aws.confluent.cloud:443` |

## Context Prompt Tips

> *"Main topics: orders, payments, notifications. Consumer groups: order-processor, payment-handler. Production cluster is in us-east-1."*

## Docs

* [Confluent Cloud REST API](https://docs.confluent.io/cloud/current/api.html)
