kafkametrics

package
v3.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README

GoDoc

Documentation

Overview

Package kafkametrics fetches Kafka broker metrics and posts events to supported metrics backends.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Request string
	Message string
}

APIError wraps backend metric system errors.

func (*APIError) Error

func (e *APIError) Error() string

Error implements the error interface for APIError.

type Broker

type Broker struct {
	// Kafka broker ID.
	ID int
	// Kafka broker hostname.
	Host string
	// Kafka broker instance type.
	InstanceType string
	// Network tx, window avg.
	NetTX float64
	// Network rx, window avg.
	NetRX float64
}

Broker holds metrics and metadata for a Kafka broker.

type BrokerMetrics

type BrokerMetrics map[int]*Broker

BrokerMetrics is a map of broker IDs to *Broker structs.

type Event

type Event struct {
	Title string
	Text  string
	Tags  []string
}

Event is used to post autothrottle events to the backend metrics system.

type Handler

type Handler interface {
	GetMetrics() (BrokerMetrics, []error)
	PostEvent(*Event) error
}

Handler requests broker metrics and posts events.

type NoResults

type NoResults struct {
	Message string
}

NoResults types are returned when incomplete broker metrics or metadata is returned.

func (*NoResults) Error

func (e *NoResults) Error() string

Error implements the error interface for PartialResults.

type PartialResults

type PartialResults struct {
	Message string
}

PartialResults types are returned when incomplete broker metrics or metadata is returned.

func (*PartialResults) Error

func (e *PartialResults) Error() string

Error implements the error interface for PartialResults.

Directories

Path Synopsis
Package datadog implements a kafkametrics Handler.
Package datadog implements a kafkametrics Handler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL