kafka_overwatch.config package

Submodules

kafka_overwatch.config.config module

class kafka_overwatch.config.config. OverwatchConfig ( config , prometheus_dir ) [source]

Bases: object

Class to store in-memory the clusters and their configurations, derived from the input configuration classes.

init_notification_channels ( ) [source]
init_schema_registries ( ) [source]

Initializes the Schema Registries client if setup in the configuration

property input_config
property prometheus_registry_dir : TemporaryDirectory

kafka_overwatch.config.logging module

class kafka_overwatch.config.logging. ErrorFilter ( name = '' ) [source]

Bases: Filter

Inspired from https://stackoverflow.com/a/16066513

filter ( rec ) [source]

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

class kafka_overwatch.config.logging. InfoFilter ( name = '' ) [source]

Bases: Filter

Inspired from https://stackoverflow.com/a/16066513

filter ( rec ) [source]

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

class kafka_overwatch.config.logging. MyFormatter ( fmt = None , datefmt = None , style = '%' , validate = True , * , defaults = None ) [source]

Bases: Formatter

date_format = '%Y-%m-%d %H:%M:%S'
debug_format = '%(asctime)s %(thread_id)d [%(levelname)8s] (%(filename)s.%(lineno)d , %(funcName)s,) %(message)s'
default_format = '%(asctime)s %(thread_id)d [%(levelname)8s] %(message)s'
format ( record ) [source]

Format the specified record as text.

The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.

Return type :

str

kafka_overwatch.config.logging. setup_logging ( logger_name = 'kafka' ) [source]
kafka_overwatch.config.logging. thread_id_filter ( record ) [source]

Inject thread_id to log records

kafka_overwatch.config.threads_settings module

Module contents

kafka_overwatch.config. load_config_file ( file_path ) [source]
Return type :

kafka_overwatch.specs.config.KafkaOverwatchInputConfiguration