burrow_exporter

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KafkaConsumerPartitionLag = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "kafka_burrow_partition_lag",
			Help: "The lag of the latest offset commit on a partition as reported by burrow.",
		},
		[]string{"cluster", "group", "topic", "partition"},
	)
	KafkaConsumerTotalLag = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "kafka_burrow_total_lag",
			Help: "The total amount of lag for the consumer group as reported by burrow",
		},
		[]string{"cluster", "group"},
	)
)

Functions

This section is empty.

Types

type BurrowClient

type BurrowClient struct {
	// contains filtered or unexported fields
}

func MakeBurrowClient

func MakeBurrowClient(baseUrl string) *BurrowClient

func (*BurrowClient) ClusterDetails

func (bc *BurrowClient) ClusterDetails(cluster string) (*ClusterDetailsResp, error)

func (*BurrowClient) ClusterTopicDetails

func (bc *BurrowClient) ClusterTopicDetails(cluster, topic string) (*ClusterTopicDetailsResp, error)

func (*BurrowClient) ConsumerGroupLag

func (bc *BurrowClient) ConsumerGroupLag(cluster, consumerGroup string) (*ConsumerGroupStatusResp, error)

func (*BurrowClient) ConsumerGroupStatus

func (bc *BurrowClient) ConsumerGroupStatus(cluster, consumerGroup string) (*ConsumerGroupStatusResp, error)

func (*BurrowClient) ConsumerGroupTopicDetails

func (bc *BurrowClient) ConsumerGroupTopicDetails(cluster, consumerGroup, topic string) (*ConsumerGroupTopicDetailsResp, error)

func (*BurrowClient) HealthCheck

func (bc *BurrowClient) HealthCheck() (bool, error)

func (*BurrowClient) ListClusters

func (bc *BurrowClient) ListClusters() (*ClustersResp, error)

func (*BurrowClient) ListConsumerTopics

func (bc *BurrowClient) ListConsumerTopics(cluster, consumerGroup string) (*ConsumerGroupTopicsResp, error)

func (*BurrowClient) ListConsumers

func (bc *BurrowClient) ListConsumers(cluster string) (*ConsumerGroupsResp, error)

type BurrowExporter

type BurrowExporter struct {
	// contains filtered or unexported fields
}

func MakeBurrowExporter

func MakeBurrowExporter(burrowUrl string, metricsAddr string, interval int) *BurrowExporter

func (*BurrowExporter) Close

func (be *BurrowExporter) Close()

func (*BurrowExporter) Start

func (be *BurrowExporter) Start(ctx context.Context)

type BurrowResp

type BurrowResp struct {
	Error   bool   `json:"error"`
	Message string `json:"message"`
}

type ClusterDetails

type ClusterDetails struct {
	Brokers       []string `json:"brokers"`
	Zookeepers    []string `json:"zookeepers"`
	BrokerPort    int      `json:"broker_port"`
	ZookeeperPort int      `json:"zookeeper_port"`
	OffsetsTopic  string   `json:"offsets_topic"`
}

type ClusterDetailsResp

type ClusterDetailsResp struct {
	BurrowResp
	Cluster ClusterDetails `json:"cluster"`
}

type ClusterTopicDetailsResp

type ClusterTopicDetailsResp struct {
	BurrowResp
	Offsets []int64 `json:"offsets"`
}

type ClustersResp

type ClustersResp struct {
	BurrowResp
	Clusters []string `json:"clusters"`
}

type ConsumerGroupStatus

type ConsumerGroupStatus struct {
	Cluster    string      `json:"cluster"`
	Group      string      `json:"group"`
	Status     string      `json:"status"`
	Complete   bool        `json:"complete"`
	MaxLag     Partition   `json:"maxlag"`
	Partitions []Partition `json:"partitions"`
	TotalLag   int64       `json:"total_lag"`
}

type ConsumerGroupStatusResp

type ConsumerGroupStatusResp struct {
	BurrowResp
	Status ConsumerGroupStatus `json:"status"`
}

type ConsumerGroupTopicDetailsResp

type ConsumerGroupTopicDetailsResp struct {
	BurrowResp
	Offsets []int64 `json:"offsets"`
}

type ConsumerGroupTopicsResp

type ConsumerGroupTopicsResp struct {
	BurrowResp
	Topics []string `json:"topics"`
}

type ConsumerGroupsResp

type ConsumerGroupsResp struct {
	BurrowResp
	ConsumerGroups []string `json:"consumers"`
}

type Offset

type Offset struct {
	Offset    int64 `json:"offset"`
	Timestamp int64 `json:"timestamp"`
	Lag       int64 `json:"lag"`
}

type Partition

type Partition struct {
	Topic     string `json:"topic"`
	Partition int32  `json:"partition"`
	Status    string `json:"status"`
	Start     Offset `json:"start"`
	End       Offset `json:"end"`
}

Jump to

Keyboard shortcuts

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