Documentation ¶
Index ¶
- type Config
- type PrometheusOutput
- func (p *PrometheusOutput) Close() error
- func (p *PrometheusOutput) Collect(ch chan<- prometheus.Metric)
- func (p *PrometheusOutput) Describe(ch chan<- *prometheus.Desc)
- func (p *PrometheusOutput) Init(ctx context.Context, name string, cfg map[string]interface{}, ...) error
- func (p *PrometheusOutput) RegisterMetrics(reg *prometheus.Registry)
- func (p *PrometheusOutput) SetClusterName(name string)
- func (p *PrometheusOutput) SetEventProcessors(ps map[string]map[string]interface{}, logger *log.Logger, ...)
- func (p *PrometheusOutput) SetLogger(logger *log.Logger)
- func (p *PrometheusOutput) SetName(name string)
- func (p *PrometheusOutput) String() string
- func (p *PrometheusOutput) Write(ctx context.Context, rsp proto.Message, meta outputs.Meta)
- func (p *PrometheusOutput) WriteEvent(ctx context.Context, ev *formatters.EventMsg)
- type ServiceRegistration
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 ¶
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) 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 (*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) 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 }
Click to show internal directories.
Click to hide internal directories.