prometheus

package
Version: v1.2.23 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupPrometheusPaths

func SetupPrometheusPaths(r *mux.Router, handler http.Handler, endpoint string)

SetupPrometheusPaths tells the router which paths the given handler should handle

Types

type Config

type Config struct {
	ListenAddr      *string
	ListenPath      *string
	Timeout         *time.Duration
	StartingContext context.Context
	HealthCheck     *string
	HTTPChain       web.NextConstructor
	Logger          log.Logger
}

Config controls optional parameters for collectd listeners

type Server

type Server struct {
	protocol.CloseableHealthCheck
	// contains filtered or unexported fields
}

Server is the prometheus server

func NewListener

func NewListener(sink dpsink.Sink, passedConf *Config) (*Server, error)

NewListener serves http prometheus requests

func (*Server) Close

func (s *Server) Close() error

Close the socket currently open for collectd JSON connections

func (*Server) Datapoints

func (s *Server) Datapoints() []*datapoint.Datapoint

Datapoints returns decoder datapoints

func (*Server) DebugDatapoints added in v1.2.11

func (s *Server) DebugDatapoints() []*datapoint.Datapoint

DebugDatapoints returns datapoints that are used for debugging the listener

func (*Server) DefaultDatapoints added in v1.2.11

func (s *Server) DefaultDatapoints() []*datapoint.Datapoint

DefaultDatapoints returns datapoints that should always be reported from the listener

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL