exporter

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultListenPort        = 7777
	DefaultListenAddress     = "0.0.0.0"
	DefaultScrapePath        = "/metrics"
	DefaultMonitorURL        = "http://localhost:8222"
	DefaultRetryIntervalSecs = 30
)

Defaults

Functions

This section is empty.

Types

type NATSExporter

type NATSExporter struct {
	sync.Mutex
	// contains filtered or unexported fields
}

NATSExporter collects NATS metrics

func NewExporter

func NewExporter(opts *NATSExporterOptions) *NATSExporter

NewExporter creates a new NATS exporter

func (*NATSExporter) AddServer

func (ne *NATSExporter) AddServer(id, url string) error

AddServer is an advanced API; normally the NATS server should be set through the options. Adding more than one server will violate Prometheus.io guidelines.

func (*NATSExporter) Start

func (ne *NATSExporter) Start() error

Start runs the exporter process.

func (*NATSExporter) Stop

func (ne *NATSExporter) Stop()

Stop stops the collector.

func (*NATSExporter) WaitUntilDone

func (ne *NATSExporter) WaitUntilDone()

WaitUntilDone blocks until the collector is stopped.

type NATSExporterOptions

type NATSExporterOptions struct {
	collector.LoggerOptions
	ListenAddress        string
	ListenPort           int
	ScrapePath           string
	GetConnz             bool
	GetVarz              bool
	GetSubz              bool
	GetRoutez            bool
	GetReplicatorVarz    bool
	GetStreamingChannelz bool
	GetStreamingServerz  bool
	RetryInterval        time.Duration
	CertFile             string
	KeyFile              string
	CaFile               string
	NATSServerURL        string
	NATSServerTag        string
	HTTPUser             string // User in metrics scrape by prometheus.
	HTTPPassword         string
	Prefix               string
	UseInternalServerID  bool
}

NATSExporterOptions are options to configure the NATS collector

func GetDefaultExporterOptions

func GetDefaultExporterOptions() *NATSExporterOptions

GetDefaultExporterOptions returns the default set of exporter options The NATS server url must be set

Jump to

Keyboard shortcuts

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