jolokia2

package
v1.29.4 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPointBuilder

func NewPointBuilder(metric Metric, attributes []string, path string) *pointBuilder

Types

type Client

type Client struct {
	URL string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(address string, config *ClientConfig) (*Client, error)

type ClientConfig

type ClientConfig struct {
	ResponseTimeout time.Duration
	Username        string
	Password        string
	Origin          string
	ProxyConfig     *ProxyConfig
	tls.ClientConfig
}

type Gatherer

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

func NewGatherer

func NewGatherer(metrics []Metric) *Gatherer

func (*Gatherer) Gather

func (g *Gatherer) Gather(client *Client, acc telegraf.Accumulator) error

Gather adds points to an accumulator from responses returned by a Jolokia agent.

type Metric

type Metric struct {
	Name           string
	Mbean          string
	Paths          []string
	FieldName      string
	FieldPrefix    string
	FieldSeparator string
	TagPrefix      string
	TagKeys        []string
	// contains filtered or unexported fields
}

A Metric represents a specification for a Jolokia read request, and the transformations to apply to points generated from the responses.

func NewMetric

func NewMetric(config MetricConfig, defaultFieldPrefix, defaultFieldSeparator, defaultTagPrefix string) Metric

func (Metric) MatchAttributeAndPath

func (m Metric) MatchAttributeAndPath(attribute, innerPath string) bool

func (Metric) MatchObjectName

func (m Metric) MatchObjectName(name string) bool

type MetricConfig

type MetricConfig struct {
	Name           string
	Mbean          string
	Paths          []string
	FieldName      *string
	FieldPrefix    *string
	FieldSeparator *string
	TagPrefix      *string
	TagKeys        []string
}

A MetricConfig represents a TOML form of a Metric with some optional fields.

type ProxyConfig

type ProxyConfig struct {
	DefaultTargetUsername string
	DefaultTargetPassword string
	Targets               []ProxyTargetConfig
}

type ProxyTargetConfig

type ProxyTargetConfig struct {
	Username string
	Password string
	URL      string
}

type ReadRequest

type ReadRequest struct {
	Mbean      string
	Attributes []string
	Path       string
}

type ReadResponse

type ReadResponse struct {
	Status            int
	Value             interface{}
	RequestMbean      string
	RequestAttributes []string
	RequestPath       string
	RequestTarget     string
}

Jump to

Keyboard shortcuts

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