prometheus_output

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name                   string               `mapstructure:"name,omitempty"`
	Listen                 string               `mapstructure:"listen,omitempty"`
	Path                   string               `mapstructure:"path,omitempty"`
	Expiration             time.Duration        `mapstructure:"expiration,omitempty"`
	MetricPrefix           string               `mapstructure:"metric-prefix,omitempty"`
	AppendSubscriptionName bool                 `mapstructure:"append-subscription-name,omitempty"`
	ExportTimestamps       bool                 `mapstructure:"export-timestamps,omitempty"`
	StringsAsLabels        bool                 `mapstructure:"strings-as-labels,omitempty"`
	Debug                  bool                 `mapstructure:"debug,omitempty"`
	EventProcessors        []string             `mapstructure:"event-processors,omitempty"`
	ServiceRegistration    *ServiceRegistration `mapstructure:"service-registration,omitempty"`
	// contains filtered or unexported fields
}

type PrometheusOutput

type PrometheusOutput struct {
	Cfg *Config

	sync.Mutex
	// contains filtered or unexported fields
}

func (*PrometheusOutput) Close

func (p *PrometheusOutput) Close() error

func (*PrometheusOutput) Collect

func (p *PrometheusOutput) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector

func (*PrometheusOutput) Describe

func (p *PrometheusOutput) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector

func (*PrometheusOutput) Init

func (p *PrometheusOutput) Init(ctx context.Context, name string, cfg map[string]interface{}, opts ...outputs.Option) error

func (*PrometheusOutput) RegisterMetrics added in v0.7.0

func (p *PrometheusOutput) RegisterMetrics(reg *prometheus.Registry)

func (*PrometheusOutput) SetClusterName added in v0.8.0

func (p *PrometheusOutput) SetClusterName(name string)

func (*PrometheusOutput) SetEventProcessors added in v0.6.0

func (p *PrometheusOutput) SetEventProcessors(ps map[string]map[string]interface{}, logger *log.Logger, tcs map[string]interface{})

func (*PrometheusOutput) SetLogger added in v0.5.2

func (p *PrometheusOutput) SetLogger(logger *log.Logger)

func (*PrometheusOutput) SetName added in v0.7.0

func (p *PrometheusOutput) SetName(name string)

func (*PrometheusOutput) String

func (p *PrometheusOutput) String() string

func (*PrometheusOutput) Write

func (p *PrometheusOutput) Write(ctx context.Context, rsp proto.Message, meta outputs.Meta)

Write implements the outputs.Output interface

func (*PrometheusOutput) WriteEvent added in v0.7.0

func (p *PrometheusOutput) WriteEvent(ctx context.Context, ev *formatters.EventMsg)

type ServiceRegistration added in v0.8.0

type ServiceRegistration struct {
	Address    string `mapstructure:"address,omitempty"`
	Datacenter string `mapstructure:"datacenter,omitempty"`
	Username   string `mapstructure:"username,omitempty"`
	Password   string `mapstructure:"password,omitempty"`
	Token      string `mapstructure:"token,omitempty"`

	Name             string        `mapstructure:"name,omitempty"`
	CheckInterval    time.Duration `mapstructure:"check-interval,omitempty"`
	MaxFail          int           `mapstructure:"max-fail,omitempty"`
	Tags             []string      `mapstructure:"tags,omitempty"`
	EnableHTTPCheck  bool          `mapstructure:"enable-http-check,omitempty"`
	HTTPCheckAddress string        `mapstructure:"http-check-address,omitempty"`
	UseLock          bool          `mapstructure:"use-lock,omitempty"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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