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 ¶
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) 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 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 }
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
Click to show internal directories.
Click to hide internal directories.