core

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DftPromLogLevel = &promlog.AllowedLevel{}
	DftPromLogFmt   = &promlog.AllowedFormat{}
)

Functions

func StartNodeExporter

func StartNodeExporter(conf *NodeExporterConfig)

StartNodeExporter access for quick integration NOT FORGET to run with goroutine

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler wraps an unfiltered http.Handler but uses a filtered handler, created on the fly, if filtering is requested. Create instances with newHandler.

func NewHandler

func NewHandler(includeExporterMetrics bool, maxRequests int, logger log.Logger) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler.

type NodeExporterConfig

type NodeExporterConfig struct {
	// such as info
	PromLogLevel string
	// such as logfmt
	PromLogFmt string
	// such as 9100
	ListenPort int
	// such as /metrics
	MetricsPath string
	// such as /
	ExporterPath string
	// such as false
	DisableExporterMetrics bool
	// such as 40
	MaxRequests int
	// such as false
	DisableDefaultCollectors bool
	// such as ""
	ConfigFile string
}

Jump to

Keyboard shortcuts

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