jmx

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateMBeanConfig added in v0.8.4

type AggregateMBeanConfig struct {
	Name      string
	MBean     string
	Attribute string
}

AggregateMBeanConfig defines a MBean that requires wildcard pattern + aggregation.

type CounterMBeanConfig added in v0.8.4

type CounterMBeanConfig struct {
	Name  string
	MBean string
}

CounterMBeanConfig defines a rate MBean whose Count field is a monotonic counter.

type GaugeMBeanConfig added in v0.8.4

type GaugeMBeanConfig struct {
	Name     string
	MBean    string
	ValueKey string
}

GaugeMBeanConfig defines a MBean that returns a point-in-time gauge value.

type JMXService

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

JMXService collects JMX metrics from Kafka brokers via Jolokia

func NewJMXService

func NewJMXService(endpoints []string, defs MetricDefinitions, entityName string, opts ...client.JolokiaOption) *JMXService

NewJMXService creates a new JMX service with Jolokia clients for each endpoint. entityName describes the endpoint type for query info descriptions (e.g. "broker" or "worker").

func (*JMXService) CollectOverDuration

func (s *JMXService) CollectOverDuration(ctx context.Context, duration, interval time.Duration) (*types.ProcessedClusterMetrics, error)

CollectOverDuration collects JMX metrics over a specified duration at regular intervals and returns them in ProcessedClusterMetrics format for direct use by the UI.

type MetricDefinitions added in v0.8.4

type MetricDefinitions struct {
	Counters        []CounterMBeanConfig
	Gauges          []GaugeMBeanConfig
	Controller      []GaugeMBeanConfig
	Aggregates      []AggregateMBeanConfig
	UnitConversions map[string]float64
}

MetricDefinitions holds all metric definitions for a JMX collection target.

func BrokerMetricDefinitions added in v0.8.4

func BrokerMetricDefinitions() MetricDefinitions

BrokerMetricDefinitions returns the standard Kafka broker metric definitions.

func ConnectMetricDefinitions added in v0.8.4

func ConnectMetricDefinitions() MetricDefinitions

ConnectMetricDefinitions returns metric definitions for Kafka Connect workers.

Jump to

Keyboard shortcuts

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