kcp report metrics
kcp report metrics¶
Generate a report of metrics for given cluster(s)
Synopsis¶
Generate a report of metrics for the given cluster(s) based on the data collected by kcp discover or kcp scan clusters.
--start and --end must be provided together if specified. If neither --cluster-id nor --source-type is given, metrics for all clusters (both MSK and Apache Kafka) are included. --cluster-id and --source-type are mutually exclusive.
Output: writes a metric_report_YYYY-MM-DD_HH-MM-SS.md file in the current working directory with metrics analysis for the selected clusters and time period.
Examples¶
# All clusters (MSK and Apache Kafka) in the state file
kcp report metrics --state-file kcp-state.json
# Specific clusters (supports both MSK ARNs and Apache Kafka cluster IDs)
kcp report metrics --state-file kcp-state.json \
--cluster-id arn:aws:kafka:us-east-1:123456789012:cluster/my-cluster/abc123 \
--cluster-id prod-kafka-cluster
# All MSK clusters only
kcp report metrics --state-file kcp-state.json --source-type msk
# All Apache Kafka clusters, custom date range
kcp report metrics --state-file kcp-state.json --source-type apache-kafka \
--start 2024-01-01 --end 2024-01-31
Options¶
--cluster-id strings The cluster identifier(s) to include in the report (comma separated list or repeated flag). Accepts both MSK ARNs and Apache Kafka cluster IDs.
--end string exclusive end date for metrics report (YYYY-MM-DD). (Defaults to today).
-h, --help help for metrics
--source-type string Source type filter: 'msk' (MSK only) or 'apache-kafka' (Apache Kafka only). Returns all clusters from the specified source.
--start string inclusive start date for metrics report (YYYY-MM-DD). (Defaults to 31 days prior to today)
--state-file string The path to the kcp state file where the MSK cluster discovery reports have been written to.
Options inherited from parent commands¶
SEE ALSO¶
- kcp report - Generate reports (costs, metrics, migration plan) from kcp scan data