Categorygithub.com/RedHatInsights/insights-kafka-monitor
modulepackage
0.0.0-20231016113404-676c24ac5ce6
Repository: https://github.com/redhatinsights/insights-kafka-monitor.git
Documentation: pkg.go.dev

# README

insights-kafka-monitor

Simple service for monitoring Kafka topic usage

Usage of ./insights-kafka-monitor: -authors show authors -check-kafka check connection to Kafka -show-configuration show configuration -version show version

# Functions

GetBrokerConfiguration returns broker configuration.
GetLoggingConfiguration returns logging configuration.
GetOutputConfiguration returns output configuration.
LoadConfiguration loads configuration from defaultConfigFile, file set in configFileEnvVariableName or from env.
NewConsumer constructs new implementation of Consumer interface.
NewWithSaramaConfig constructs new implementation of Consumer interface with custom sarama config.

# Constants

ExitStatusConsumerError is returned in case of any consumer-related error.
ExitStatusError is a general error code.
ExitStatusKafkaError is returned in case of any Kafka-related error.
ExitStatusOK means that the tool finished with success.

# Variables

DefaultSaramaConfig is a config which will be used by default here you can use specific version of a protocol for example useful for testing.

# Structs

BrokerConfiguration represents configuration for the broker.
CliFlags represents structure holding all command line arguments and flags.
ConfigStruct is a structure holding the whole notification service configuration.
KafkaConsumer in an implementation of Consumer interface Example: kafkaConsumer, err := consumer.New(brokerCfg, storage) if err != nil { panic(err) } kafkaConsumer.Serve() err := kafkaConsumer.Stop() if err != nil { panic(err) }.
LoggingConfiguration represents configuration for logging in general.
OutputConfiguration configures which log messages to use.

# Interfaces

Consumer represents any consumer of insights-rules messages.