jolokia

package
v0.0.0-...-5655933 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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
	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, slist *types.SampleList) 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   `toml:"name"`
	Mbean          string   `toml:"mbean"`
	Paths          []string `toml:"paths"`
	FieldName      *string  `toml:"field_name"`
	FieldPrefix    *string  `toml:"field_prefix"`
	FieldSeparator *string  `toml:"field_separator"`
	TagPrefix      *string  `toml:"tag_prefix"`
	TagKeys        []string `toml:"tag_keys"`
}

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