Source code for kafka_overwatch.specs.report
# generated by datamodel-codegen:
# filename: report.json
from __future__ import annotations
from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Union
[docs]
@dataclass
class ConsumerGroups:
total: int
"""
Total number of consumer groups
"""
active: int | None = None
"""
Number of active consumer groups (lag = 0) & members > 0
"""
inactive: int | None = None
"""
Number of inactive consumer groups (lag > 0) or groups without members
"""
[docs]
@dataclass
class Statistics:
topics: int
"""
Total count of topics counted at the time of generating the report
"""
partitions: int | None = None
"""
Sum of partitions for the topics
"""
most_active_topics: list[str] | dict[str, Any] | None = None
"""
Topics in the 0.75 percentile of number of messages and new_messages which active consumer groups
"""
consumer_groups: ConsumerGroups | None = None
[docs]
@dataclass
class SchemasWasteEstimates:
detected_unused: list[str] | None = None
detected_unused_count: int | None = None
[docs]
@dataclass
class TopicWasteCategory:
topics: dict[str, int]
topic_partitions_sum: int
description: str
"""
The description of the category
"""
topics_count: int | None = None
cluster_percentage: float | None = None
"""
The percentage of topics fit into that category within the cluster
"""
[docs]
@dataclass
class GovernanceNamingConventionReport:
total: float | None = None
"""
Total number of consumer_groups in the cluster
"""
total_ignored: float | None = None
"""
Total number of consumer_groups ignored via regex
"""
total_measured: float | None = None
"""
Total number of consumer_groups measured
"""
compliant_percentage: float | None = None
"""
Percentage of compliant consumer_groups, out of total_topic_measured
"""
non_compliant_resources: list[str] | None = None
"""
List of non-compliant topic names
"""
[docs]
@dataclass
class Governance:
"""
Governance report structure
"""
topic_naming_convention: GovernanceNamingConventionReport | None = None
consumer_group_naming_convention: GovernanceNamingConventionReport | None = None
[docs]
@dataclass
class EstimatedWaste:
topics: int | None = None
partitions: int | None = None
"""
Sum of partitions for the topics
"""
topic_categories: dict[str, TopicWasteCategory] | None = None
[docs]
@dataclass
class SchemaRegistryReport:
subjects_count: int | None = None
schemas_count: int | None = None
schemas_estimates: SchemasWasteEstimates | None = None
[docs]
@dataclass
class ClusterReport:
cluster_name: str
metadata: Metadata
governance: Governance | None = None
"""
Governance report structure
"""
statistics: Statistics | None = None
estimated_waste: EstimatedWaste | None = None
schema_registry: SchemaRegistryReport | None = None
[docs]
@dataclass
class ClusterUsageReportStructure:
"""
Defines the format of the cluster topics report
"""
cluster: ClusterReport | None = None