prometheus_output

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 24 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 {
	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"`
}

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) SetEventProcessors added in v0.6.0

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

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)

Jump to

Keyboard shortcuts

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