Documentation Index
Fetch the complete documentation index at: https://docs.conduktor.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
This tutorial sets up Chargeback in Console, including the optional sources required for ingress and egress metrics:- Confluent Cloud throughput — calls the Confluent Cloud Metrics API hourly
- Gateway throughput — relies on the observability Interceptor deployed on Gateway
Prerequisites
| Requirement | Details |
|---|---|
| Console | v1.45.0 or above |
| Gateway (optional) | v3.4.0 or above, required only for Gateway throughput |
| Confluent Cloud (optional) | API key with Metrics API access, required only for Confluent Cloud throughput |
| Permissions | PlatformChargebackManage to set cost rates and configure Chargeback Labels |
Environment variables
Set these on Console before starting it.| Environment variable | Type | Default | Description |
|---|---|---|---|
CDK_CHARGEBACKV2_ENABLED | Boolean | false | Set to true to enable Chargeback |
CDK_CHARGEBACKV2_METRICSUPDATEFREQUENCY | Long (seconds) | 3600 | How often Console snapshots topic storage and partition counts |
CDK_CHARGEBACK_FLUSHMETRICSEVERYSECONDS | Long (seconds) | 300 | How often Gateway throughput is flushed from the observability stream into the Chargeback tables |
CDK_CHARGEBACK_CCTHROUGHPUT_ENABLED | Boolean | true | Set to false to skip Confluent Cloud throughput collection |
CDK_CHARGEBACK_CCTHROUGHPUT_FREQUENCYSECONDS | Long (seconds) | 3600 | How often the Confluent Cloud Metrics API is queried for throughput |
The same
CDK_CHARGEBACKV2_ENABLED flag is used by the Chargeback feature regardless of cluster type.Enable Chargeback in Console
Run the onboarding wizard
Open the Chargeback page. As an administrator, you’ll be guided through:
- Setting the per-cluster unit costs (storage, partitions, ingress, egress)
- Selecting which label keys are eligible as Chargeback Labels
Collect Gateway throughput
Ingress and egress for Gateway clusters are produced by the observability Interceptor running on Gateway. If you only need storage and partition metrics for Gateway clusters, you can skip this section.Connect Gateway to Console
In Console, go to Settings > Clusters and select your cluster. In the Provider tab, select Gateway and enter the Gateway API details with the Virtual Cluster value of 
passthrough.
Observability Interceptor reference
| Name | Type | Default | Description |
|---|---|---|---|
topicName | String | Topic used to store observability metrics. If the topic exists, it has to have only one partition. If it doesn’t exist, Gateway creates it. | |
replicationFactor | Int | Replication factor used when Gateway creates the topic. | |
flushIntervalInSecond | Int | 300 | Frequency at which metrics are flushed to the topic. |
Collect Confluent Cloud throughput
Confluent Cloud ingress and egress are pulled hourly through the Confluent Cloud Metrics API. Collection is on by default. To enable collection on a cluster, configure the cluster in Console with API credentials that include Metrics API access. No further setup is needed. To turn collection off globally, set:Verify
Wait for the first collection tick
Storage and partition metrics appear after the first snapshot (default: one hour). Confluent Cloud throughput appears after the first hourly tick. Gateway throughput appears once the observability Interceptor has flushed to the metrics topic (default: every five minutes).
Open the Chargeback page
Cluster rows show non-zero values for the axes that match the cluster type.
Console begins collecting metrics immediately after the feature flag is set, but data only appears after the first collection interval.